exit on error

This commit is contained in:
Hieu Hoang 2014-04-04 15:30:48 +01:00
parent 9d09b4a6e6
commit f2d3052627

View File

@ -103,6 +103,7 @@ while(my $chunkLine = <CHUNKED>) {
if (scalar(@chunkToks) != 3) {
# parse error
print STDERR "CHUNK LINES SHOULD BE 3 TOKS\n";
exit(1);
}
if ($wordPos >= $numWords) {
@ -125,6 +126,7 @@ while(my $chunkLine = <CHUNKED>) {
if ($chunkToks[0] ne $words[$wordPos]) {
# word in chunk input and sentence should match
print STDERR "NOT EQUAL:" .$chunkToks[0] ." != " .$words[$wordPos] ."\n";
exit(1);
}
print $chunkToks[0] . " ";