summaryrefslogtreecommitdiff
path: root/word-aligner/support/extract_vocab.pl
diff options
context:
space:
mode:
authorredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-10-28 22:19:32 +0000
committerredpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-10-28 22:19:32 +0000
commit0c6c6e1e72b13ab0bf6ea2da3ac83ba5a74e5cff (patch)
tree59d9ff0c8fef2b062e76ddf24d4ff0dc8b503b5e /word-aligner/support/extract_vocab.pl
parent9e73380e46ada871ad114f4fd4238b8f2263ef27 (diff)
small fixes
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@700 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'word-aligner/support/extract_vocab.pl')
-rwxr-xr-xword-aligner/support/extract_vocab.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/word-aligner/support/extract_vocab.pl b/word-aligner/support/extract_vocab.pl
index 070d4202..ef94b7d6 100755
--- a/word-aligner/support/extract_vocab.pl
+++ b/word-aligner/support/extract_vocab.pl
@@ -7,7 +7,10 @@ my $wc = 0;
while(<>) {
chomp;
my @words = split /\s+/;
- for my $word (@words) { $wc++; $dict{$word}++; }
+ for my $word (@words) {
+ die if $word eq '';
+ $wc++; $dict{$word}++;
+ }
}
my $tc = 0;