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
commitb01eeb03ebd34a737f698b647976f8f6dc1b3775 (patch)
treecba610484518a2a6d034d8094f0f63c63fb76bff /word-aligner/support/extract_vocab.pl
parent14b4d7dff699259bc5e606fa0d5beb77001e32fb (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;