Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbojar <bojar@1f5c12ca-751b-0410-a591-d2e778427230>2006-08-10 05:37:29 +0400
committerbojar <bojar@1f5c12ca-751b-0410-a591-d2e778427230>2006-08-10 05:37:29 +0400
commitaf1be612597987e01c98b823d370785818142948 (patch)
tree8243d6db4c9594fdbd47d2a59ff3612ff039106c /scripts
parentf484bd529c5368b4e802621216a08365595e68cb (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-xscripts/training/filter-model-given-input.pl1
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),'%';
}