Skip to content

Commit 7d8ff21

Browse files
committed
(trunk/wsj) Previous version of the script wer_ops_details.pl didn't calculate the number of fields correctly
git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@4864 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
1 parent 7daf0d2 commit 7d8ff21

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

egs/wsj/s5/utils/scoring/wer_ops_details.pl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@
5151
my @entries = split(" ", $_);
5252
next if @entries < 2;
5353
next if ($entries[1] ne "hyp") and ($entries[1] ne "ref") ;
54-
die "Incompatible entry $_ parsed as " . $#entries . "\n" if scalar $#entries <= 2;
54+
if (scalar @entries <= 2 ) {
55+
print STDERR "Warning: skipping entry \"$_\", either an empty phrase or incompatible format\n" ;
56+
next;
57+
}
5558

5659
die "The input stream contains duplicate entry $entries[0] $entries[1]\n"
5760
if exists $UTT{$entries[0]}->{$entries[1]};

0 commit comments

Comments
 (0)