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:
Hieu Hoang 2018-07-05 14:02:10 +01:00 committed by GitHub
commit 3545225c0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 = ();