Reputation: 1834
I am currently configuring my Java project in order to use Stanford's POS tagger. However I am currently getting the following 2 errors when running the program.
The first being:
Exception in thread "main" edu.stanford.nlp.io.RuntimeIOException: Error while loading a tagger model (probably missing model file)
at edu.stanford.nlp.tagger.maxent.MaxentTagger.readModelAndInit(MaxentTagger.java:791)
at edu.stanford.nlp.tagger.maxent.MaxentTagger.<init>(MaxentTagger.java:312)
at edu.stanford.nlp.tagger.maxent.MaxentTagger.<init>(MaxentTagger.java:265)
at TagText.main(TagText.java:10)
And the second being:
Caused by: java.io.IOException: Unable to open "taggers/left3words-distsim-wsj-0-18.tagger" as class path, filename or URL
at edu.stanford.nlp.io.IOUtils.getInputStreamFromURLOrClasspathOrFileSystem(IOUtils.java:470)
at edu.stanford.nlp.tagger.maxent.MaxentTagger.readModelAndInit(MaxentTagger.java:789)
... 3 more
I am using the example found here to build test the POS tagger:
http://new.galalaly.me//2011/05/tagging-text-with-stanford-pos-tagger-in-java-applications/
Upvotes: 0
Views: 913
Reputation: 1834
Found the solution if anyone else ever needs it. You need to make sure that your MaxentTagger tagger has the correct and updated english file passing through it.
Upvotes: 1