From 2a6a16056d0705423c40366dcde7dd46e39be248 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Sat, 25 Oct 2014 15:01:49 -0400 Subject: bit more info --- corpus/conll2cdec.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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() { chomp; if (/^\s*$/) { print "