且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Stanford-NLP:找不到主类错误

更新时间:2023-11-15 20:23:58

classpath应该指向类,而不是源文件.如果您使用的是GitHub版本的代码,则可以将类路径设置为:

The classpath should point to the classes, not the source files. If you're using the GitHub version of the code, you can set the classpath to be:

-cp ~/Downloads/CoreNLP-master/classes:/path/to/corenlp/models.jar

您可以在以下位置找到CoreNLP模型的最新版本: http://nlp.stanford.edu/software/stanford-corenlp-models-current.jar (警告:> 200MB文件)

You can find the most recent version of the CoreNLP models at: http://nlp.stanford.edu/software/stanford-corenlp-models-current.jar (warning: >200MB file)

如果您有一个corenlp版本,则应将类路径设置为:

If you have one of the corenlp releases, you should set your classpath to:

-cp /path/to/corenlp.jar:/path/to/corenlp/models.jar

例如:

export CLASSPATH=stanford-corenlp-3.9.1.jar:stanford-corenlp-3.9.1-models.jar

corenlp jar和模型jar均应显示在压缩的代码版本中(例如,来自

Both the corenlp jar and the models jar should show up in the zipped release of the code (e.g., from http://nlp.stanford.edu/software/corenlp.shtml)