Unipisa / corenlp-it

A collection of CoreNLP add-ons and models for Italian.
4 stars 1 forks source link

ClassNotFoundException #1

Open federicoruggeri opened 4 years ago

federicoruggeri commented 4 years ago

Hello, I'm trying to use the corenlp-it add-on but I'm always getting a ClassNotFoundException.

Here's my setup:

CoreNLP 4.2.0 -> base_path/corenlp4.2.0 CoreNLP-it -> base_path/corenlp-it

Running the following command throws the aforementioned exception:

java -cp "base_path/corenlp4.2.0/*:base_path/corenlp-it/*" -Xmx4g edu.stanford.nlp.pipeline.StanfordCoreNLP -props base_path/corenlp-it/CoreNLP-it-0.1-sample_properties.prop -file base_path/text_sample.txt

Error stack trace:

[main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Registering annotator statTokSent with class it.unipi.fileli.colinglab.pipeline.stat_tok_sent.annotator.StatTokSentAnnotator [main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Registering annotator udLemma with class it.unipi.fileli.colinglab.pipeline.UD_Lemma.UDLemmaAnnotator [main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Registering annotator tokensregex with class edu.stanford.nlp.pipeline.TokensRegexAnnotator [main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Registering annotator upos with class it.unipi.fileli.colinglab.pipeline.upos.UPosAnnotator [main] INFO edu.stanford.nlp.pipeline.StanfordCoreNLP - Adding annotator statTokSent Exception in thread "main" edu.stanford.nlp.util.MetaClass$ClassCreationException: java.lang.ClassNotFoundException: it.unipi.fileli.colinglab.pipeline.stat_tok_sent.annotator.StatTokSentAnnotator at edu.stanford.nlp.util.MetaClass.createFactory(MetaClass.java:364) at edu.stanford.nlp.util.MetaClass.createInstance(MetaClass.java:381) at edu.stanford.nlp.pipeline.AnnotatorImplementations.custom(AnnotatorImplementations.java:156) at edu.stanford.nlp.pipeline.StanfordCoreNLP.lambda$null$30(StanfordCoreNLP.java:601) 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.<init>(StanfordCoreNLP.java:253) at edu.stanford.nlp.pipeline.StanfordCoreNLP.<init>(StanfordCoreNLP.java:194) at edu.stanford.nlp.pipeline.StanfordCoreNLP.<init>(StanfordCoreNLP.java:190) at edu.stanford.nlp.pipeline.StanfordCoreNLP.main(StanfordCoreNLP.java:1423) Caused by: java.lang.ClassNotFoundException: it.unipi.fileli.colinglab.pipeline.stat_tok_sent.annotator.StatTokSentAnnotator at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:315) at edu.stanford.nlp.util.MetaClass$ClassFactory.construct(MetaClass.java:135) at edu.stanford.nlp.util.MetaClass$ClassFactory.<init>(MetaClass.java:202) at edu.stanford.nlp.util.MetaClass$ClassFactory.<init>(MetaClass.java:69) at edu.stanford.nlp.util.MetaClass.createFactory(MetaClass.java:360) ... 10 more

Am I doing something wrong?

P.s. I've also tried to update the CLASSPATH environment variable but nothing happens.

magoafono commented 3 years ago

Did you use git-lfs command to clone the repository?