Skip to content

CoreNLP models classpath issue #1035

@jueheed

Description

@jueheed

Just downloaded 4.0.0 in Eclipse using maven. I am getting an error on getting model file for pos-tagger. This doesn't happen when I use 3.9.2.

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:801)
at edu.stanford.nlp.tagger.maxent.MaxentTagger.(MaxentTagger.java:322)
at edu.stanford.nlp.tagger.maxent.MaxentTagger.(MaxentTagger.java:275)
at edu.stanford.nlp.pipeline.POSTaggerAnnotator.loadModel(POSTaggerAnnotator.java:85)
at edu.stanford.nlp.pipeline.POSTaggerAnnotator.(POSTaggerAnnotator.java:73)
at edu.stanford.nlp.pipeline.AnnotatorImplementations.posTagger(AnnotatorImplementations.java:73)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.lambda$getNamedAnnotators$5(StanfordCoreNLP.java:526)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.lambda$null$32(StanfordCoreNLP.java:607)
at edu.stanford.nlp.util.Lazy$3.compute(Lazy.java:126)
at edu.stanford.nlp.util.Lazy.get(Lazy.java:31)
at edu.stanford.nlp.pipeline.AnnotatorPool.get(AnnotatorPool.java:149)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.(StanfordCoreNLP.java:252)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.(StanfordCoreNLP.java:193)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.(StanfordCoreNLP.java:189)
at corenlp.proto.DefaultNerExample.getNerSearch(DefaultNerExample.java:85)
at corenlp.proto.DefaultNerExample.main(DefaultNerExample.java:28)
Caused by: java.io.IOException: Unable to open "edu/stanford/nlp/models/pos-tagger/english-left3words-distsim.tagger" as class path, filename or URL
at edu.stanford.nlp.io.IOUtils.getInputStreamFromURLOrClasspathOrFileSystem(IOUtils.java:481)
at edu.stanford.nlp.tagger.maxent.MaxentTagger.readModelAndInit(MaxentTagger.java:798)
... 15 more

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions