From 5082307f382a6563d4ffb97034137da4e362e629 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Mon, 7 Dec 2009 19:15:16 -0500 Subject: minor fix --- compound-split/compound-split.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'compound-split') 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() { 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() { $seg =~ s/^# //o; } $res[$i] = $seg; - } elsif ($IS_PLF) { - $res[$i] = "(('" . escape($res[$i]) . "',0,1),),"; } } } -- cgit v1.2.3