Open 85405115 opened 8 years ago
If you're using -cp "*"
, you should be running this command in the directory where you installed StanfordCoreNLP (e.g. /home/stanford-corenlp-full-2015-12-09/
).
Make sure that do one of the following
-cp "*"
to the installation path (i.e. -cp "/home/stanford-corenlp-full-2015-12-09/"
)CLASSPATH
environment variableYou can find more info here
After running this java -mx3g edu.stanford.nlp.pipeline.StanfordCoreNLP -outputFormat json -file input.txt I am getting : Error: Could not find or load main class edu.stanford.nlp.pipeline.StanfordCoreNLP
I am getting above error(Though I have successfully set the path of CoreNLP in bashrc). I tried to run the command in this directory too: /home/stanford-corenlp-full-2015-12-09/ Still getting the same error.
Please help me.
@PawarKishori I get the same error, do you solve it?
@PawarKishori @leolle getting same error here, did you solve it?
@PawarKishori It seems that using " -cp "*" " is the attended way to use the StanfordCoreNLP, use it in the StanfordCoreNLP directory
java -mx3g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLP, this works for me
I solved this problem by updating to java8
I know this is an old issue, but I wanted to mark it here for other's reference.
This issue can also happen if you have your stanford-corenlp-full-YYYY-MM-DD
directory on a mounted file system. I was having this issue when attempting to start it in an NFS mount. I moved it locally, and it stopped.
If you have put the path to stanford-corenlp in CLASSPATH, you can remove classpath (-cp) option altogether. This works for me -
java -Xmx4g edu.stanford.nlp.pipeline.StanfordCoreNLP -file input.txt
In your ~/.bashrc or ~/.zshrc you can put -
for file in `find /path/to/corenlp -name "*.jar"`;
do export CLASSPATH="$CLASSPATH:`realpath $file`"; done
Double check also that you've installed the full CoreNLP and not just a language model. If you only have a jar that ends with "-models.jar", like stanford-english-corenlp-2018-10-05-models.jar, you're missing the rest of CoreNLP. I had made the mistake of downloading just a model from their download page, skipping past the big red "Download CoreNLP" button. :)
hello,I have similar problem,when I use Stanford POSTagger have error。Error: Could not find or load main class edu.stanford.nlp.tagger.maxent.MaxentTagger-model,I don't know why? windows-version: 10、java-version:1.8.0_65、Python:3.6.3、Stanford coreNLP 3.9.2 、Stanford postagger 3.9.2
Double check also that you've installed the full CoreNLP and not just a language model. If you only have a jar that ends with "-models.jar", like stanford-english-corenlp-2018-10-05-models.jar, you're missing the rest of CoreNLP. I had made the mistake of downloading just a model from their download page, skipping past the big red "Download CoreNLP" button. :)
May I ask where is the full CoreNLP? I can only download the version with a single "-model.jar".
May I ask where is the full CoreNLP? I can only download the version with a single "-model.jar".
https://stanfordnlp.github.io/CoreNLP/download.html Click the big red "Download CoreNLP" button, not the links to the individual language models in the table beneath it.
This works for me: java -mx3g -cp "path/to/stanford-corenlp-4.2.0/*" edu.stanford.nlp.pipeline.StanfordCoreNLP -outputFormat json -file input.txt
That is because of absence StanfordCoreNLPServer class, which is an enrtypoint. Download CoreNLP 4.0.0 jar file from https://mvnrepository.com/artifact/edu.stanford.nlp/stanford-corenlp/4.0.0 and put in the same directory as model
hello, when i write below command,i get an error. command: java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer [port] [timeout] Error: Error: Could not find or load main class edu.stanford.nlp.pipeline.StanfordCoreNLPServer
i am a beginner in python. but i need to use this module. please help me,what should i do?