diff options
author | phikoehn <pkoehn@inf.ed.ac.uk> | 2012-07-06 08:12:50 +0400 |
---|---|---|
committer | phikoehn <pkoehn@inf.ed.ac.uk> | 2012-07-06 08:12:50 +0400 |
commit | 51589a25e7c8e10028b3ccaa375e3a260b49ad98 (patch) | |
tree | 1ca052a1dfa7978127a38170a169bc3af9ccc332 /scripts | |
parent | 34c07e0ca8d539b227a783ab61fe1aa9b5580976 (diff) |
fix for leading, trailing, and multiple spaces, suggested by Yang Gao
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/generic/multi-bleu.perl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/generic/multi-bleu.perl b/scripts/generic/multi-bleu.perl index 06f01acff..137117647 100755 --- a/scripts/generic/multi-bleu.perl +++ b/scripts/generic/multi-bleu.perl @@ -49,7 +49,7 @@ while(<STDIN>) { foreach my $reference (@{$REF[$s]}) { # print "$s $_ <=> $reference\n"; $reference = lc($reference) if $lowercase; - my @WORD = split(/ /,$reference); + my @WORD = split(' ',$reference); my $length = scalar(@WORD); my $diff = abs($length_translation_this_sentence-$length); if ($diff < $closest_diff) { |