mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-27 05:55:02 +03:00
Merge pull request #201 from louismartin/bleu-fix-newline
[BLEU] Fix multi-bleu.perl bug (no newline at end of file)
This commit is contained in:
commit
3545225c0b
@ -48,7 +48,7 @@ sub add_to_ref {
|
||||
open(REF,$file) or die "Can't read $file";
|
||||
}
|
||||
while(<REF>) {
|
||||
chop;
|
||||
chomp;
|
||||
push @{$$REF[$s++]}, $_;
|
||||
}
|
||||
close(REF);
|
||||
@ -57,7 +57,7 @@ sub add_to_ref {
|
||||
my(@CORRECT,@TOTAL,$length_translation,$length_reference);
|
||||
my $s=0;
|
||||
while(<STDIN>) {
|
||||
chop;
|
||||
chomp;
|
||||
$_ = lc if $lowercase;
|
||||
my @WORD = split;
|
||||
my %REF_NGRAM = ();
|
||||
|
Loading…
Reference in New Issue
Block a user