diff options
author | Chris Dyer <redpony@gmail.com> | 2009-12-07 19:15:16 -0500 |
---|---|---|
committer | Chris Dyer <redpony@gmail.com> | 2009-12-07 19:15:16 -0500 |
commit | 5082307f382a6563d4ffb97034137da4e362e629 (patch) | |
tree | 486583eb002dd9a4e0959a79196415e8740cd12e /compound-split | |
parent | 289bff46b5695c89786ae5dc823479af9d9e7272 (diff) |
minor fix
Diffstat (limited to 'compound-split')
-rwxr-xr-x | compound-split/compound-split.pl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compound-split/compound-split.pl b/compound-split/compound-split.pl index e6f1a3e0..beca4dc0 100755 --- a/compound-split/compound-split.pl +++ b/compound-split/compound-split.pl @@ -63,7 +63,11 @@ while(<STDIN>) { for (my $i=0; $i < scalar @words; $i++) { my $word = lc $words[$i]; if (length($word)<6 || $word =~ /^[,\-0-9\.]+$/) { - push @res, $word; + if ($IS_PLF) { + push @res, "(('" . escape($word) . "',0,1),),"; + } else { + push @res, $word; + } } else { push @res, undef; push @todo, $word; @@ -81,8 +85,6 @@ while(<STDIN>) { $seg =~ s/^# //o; } $res[$i] = $seg; - } elsif ($IS_PLF) { - $res[$i] = "(('" . escape($res[$i]) . "',0,1),),"; } } } |