[LON-CAPA-cvs] cvs: loncom /localize/localize checksimilar_2files.pl

bisitz bisitz at source.lon-capa.org
Fri Dec 20 09:27:54 EST 2013


bisitz		Fri Dec 20 14:27:54 2013 EDT

  Modified files:              
    /loncom/localize/localize	checksimilar_2files.pl 
  Log:
  Also ignore HTML tags
  
  
Index: loncom/localize/localize/checksimilar_2files.pl
diff -u loncom/localize/localize/checksimilar_2files.pl:1.7 loncom/localize/localize/checksimilar_2files.pl:1.8
--- loncom/localize/localize/checksimilar_2files.pl:1.7	Wed Sep 25 13:22:42 2013
+++ loncom/localize/localize/checksimilar_2files.pl	Fri Dec 20 14:27:54 2013
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # The LearningOnline Network with CAPA
-# $Id: checksimilar_2files.pl,v 1.7 2013/09/25 13:22:42 bisitz Exp $
+# $Id: checksimilar_2files.pl,v 1.8 2013/12/20 14:27:54 bisitz Exp $
 
 use strict;
 use warnings;
@@ -36,6 +36,7 @@
 
 sub similar_chars {
     my $text = shift;
+    $text =~ s/<\/*\w+ *\/*>//g; # HTML tags
     $text =~ s/\[_\d\]//g; # translation parameters
     $text =~ s/[.,\_\-?!: \/\(\)]//g; # punctuation
     return $text;




More information about the LON-CAPA-cvs mailing list