Reputation: 504
I am trying to build a customized StanfordNer model, training data and properties file are ready.
But when I am trying to run the following code :
java -cp "stanford-ner.jar:lib/*" -mx4g edu.stanford.nlp.ie.crf.CRFClassifier -prop download.txt
This error is popping out :
Error: Could not find or load main class edu.stanford.nlp.ie.crf.CRFClassifier
Steps followed:
Upvotes: 2
Views: 97
Reputation: 8739
If you are seeing errors like that it means your CLASSPATH is not properly configured.
You need to run that command in the same folder as the NER download or it won't find the needed jars. That command should be run in whatever directory has stanford-ner.jar
and lib
in it. Alternatively you can just set the CLASSPATH
environment variable and remove the -cp
option from the command.
More info on Java CLASSPATH
here: https://docs.oracle.com/javase/tutorial/essential/environment/paths.html
Upvotes: 1