diff options
author | redpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-10-28 19:42:39 +0000 |
---|---|---|
committer | redpony <redpony@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-10-28 19:42:39 +0000 |
commit | 7a87c0b62eaa5ef27b0642fc4cae9ee5c4cd6a8b (patch) | |
tree | d39c283d51d1a6a15ec550e57c0c8e971891b561 /word-aligner | |
parent | 2609926eaeb4afb16a787f2abc0de61915ff4ecf (diff) |
gen ps
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@698 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'word-aligner')
-rwxr-xr-x | word-aligner/support/generate_per_sentence_grammars.pl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/word-aligner/support/generate_per_sentence_grammars.pl b/word-aligner/support/generate_per_sentence_grammars.pl index 730035d8..80243419 100755 --- a/word-aligner/support/generate_per_sentence_grammars.pl +++ b/word-aligner/support/generate_per_sentence_grammars.pl @@ -55,6 +55,7 @@ my $id = 0; open O, ">ps.grammar" or die; binmode(O,":utf8"); while(<C>) { + chomp; my ($f,$e) = split / \|\|\| /; my @fwords = split /\s+/, $f; my $tot = 0; @@ -73,7 +74,8 @@ while(<C>) { $used{$f} = 1; } print O "###EOS###\n"; - print STDERR "id=$id POS=$fpos\n"; + print STDERR "<seg id=\"$id\" grammar=\"\@$fpos\"> $_ </seg>\n"; + #print STDERR "id=$id POS=$fpos\n"; $id++; last if $id == 10; } |