diff options
author | Chris Dyer <redpony@gmail.com> | 2014-10-25 15:01:49 -0400 |
---|---|---|
committer | Chris Dyer <redpony@gmail.com> | 2014-10-25 15:01:49 -0400 |
commit | 2a6a16056d0705423c40366dcde7dd46e39be248 (patch) | |
tree | 59adccd5a4a729faef54cac266d9bff67584d07a /corpus/conll2cdec.pl | |
parent | 7547aef823c9f41edf363af8c3dd23992ead6c68 (diff) |
bit more info
Diffstat (limited to 'corpus/conll2cdec.pl')
-rwxr-xr-x | corpus/conll2cdec.pl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/corpus/conll2cdec.pl b/corpus/conll2cdec.pl index f65b86f8..ee4e07db 100755 --- a/corpus/conll2cdec.pl +++ b/corpus/conll2cdec.pl @@ -1,12 +1,15 @@ #!/usr/bin/perl -w use strict; +die "Usage: $0 file.conll\n\n Converts a CoNLL formatted labeled sequence into cdec's format.\n\n" unless scalar @ARGV == 1; +open F, "<$ARGV[0]" or die "Can't read $ARGV[0]: $!\n"; + my @xx; my @yy; my @os; my $sec = undef; my $i = 0; -while(<>) { +while(<F>) { chomp; if (/^\s*$/) { print "<seg id=\"$i\""; |