summaryrefslogtreecommitdiff
path: root/word-aligner/support/extract_grammar.pl
blob: d7275ef550d55cd71e41afcf664946f225dab017 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/perl -w
use strict;

my $key = shift @ARGV;
die "Usage: $0 KEY\n" unless defined $key;

while(<>) {
  my ($k, @rest) = split / \|\|\| /;
  print join(' ||| ', @rest) if ($k eq $key);
}