version 1.1, 2010/03/09 15:16:26
|
version 1.2, 2013/01/21 15:29:30
|
Line 9 use warnings;
|
Line 9 use warnings;
|
#### Checks, if there are similar keys in the inputfile (for example de.pm) |
#### Checks, if there are similar keys in the inputfile (for example de.pm) |
#### |
#### |
|
|
|
####--------Configuration--------#### |
|
# Include check for similar phrases -> set to 1 |
|
my $inclphrases = 0; |
|
|
|
|
####--------Subroutines--------#### |
####--------Subroutines--------#### |
Line 29 sub read {
|
Line 32 sub read {
|
return %filecontent; |
return %filecontent; |
} |
} |
|
|
sub similarities{ |
sub similarities { |
my $text = shift; |
my $text = shift; |
$text =~ s/[.,\_\-?!:]//g; |
$text =~ s/\[_\d\]//g; # translation parameters |
|
$text =~ s/[.,\_\-?!: \/]//g; # punctuation |
|
if ($inclphrases) { |
|
$text =~ s/course/X002X/gi; |
|
$text =~ s/community/X002X/gi; |
|
$text =~ s/communities/X001X/gi; |
|
$text =~ s/member/X003X/gi; |
|
$text =~ s/student/X003X/gi; |
|
$text =~ s/students/X003X/gi; |
|
} |
return $text; |
return $text; |
} |
} |
|
|