diff options
author | bojar <bojar@1f5c12ca-751b-0410-a591-d2e778427230> | 2006-08-10 05:37:29 +0400 |
---|---|---|
committer | bojar <bojar@1f5c12ca-751b-0410-a591-d2e778427230> | 2006-08-10 05:37:29 +0400 |
commit | af1be612597987e01c98b823d370785818142948 (patch) | |
tree | 8243d6db4c9594fdbd47d2a59ff3612ff039106c /scripts | |
parent | f484bd529c5368b4e802621216a08365595e68cb (diff) |
die when there are no phrases in input
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@611 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/training/filter-model-given-input.pl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/training/filter-model-given-input.pl b/scripts/training/filter-model-given-input.pl index 318b15960..0e65b1640 100755 --- a/scripts/training/filter-model-given-input.pl +++ b/scripts/training/filter-model-given-input.pl @@ -158,6 +158,7 @@ for(my $i=0;$i<=$#TABLE;$i++) { } close(FILE); close(FILE_OUT); + die "No phrases found in $file!" if $total == 0; printf STDERR "$used of $total phrases pairs used (%.2f%s) - note: max length $MAX_LENGTH\n",(100*$used/$total),'%'; } |