brendano / ark-tweet-nlp

CMU ARK Twitter Part-of-Speech Tagger
http://www.ark.cs.cmu.edu/TweetNLP/
Other
574 stars 199 forks source link

ark tweet tagger fails with a conll input file with just one column #29

Open negrinho opened 9 years ago

negrinho commented 9 years ago

./ark-tweet-nlp-0.3.2/runTagger.sh --input-format conll data/test.txt Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1 at cmu.arktweetnlp.io.CoNLLReader.sentenceFromLines(CoNLLReader.java:55) at cmu.arktweetnlp.io.CoNLLReader.readFile(CoNLLReader.java:32) at cmu.arktweetnlp.RunTagger.runTaggerInEvalMode(RunTagger.java:161) at cmu.arktweetnlp.RunTagger.runTagger(RunTagger.java:87) at cmu.arktweetnlp.RunTagger.main(RunTagger.java:364)

The file test.txt was:

This is a test !

Adding a (tab separated) dummy column solves the problem (but still, it ought work with files with just one column): This 1 is 2 a 3 test 4 ! 5