在Java代码中没有检测到斯坦福的词法分析器

时间:2016-05-01 23:52:04

标签: java parsing stanford-nlp sentiment-analysis

我正在尝试使用斯坦福的词法解析器解析一个句子。我从How can I integrate stanford parser software in my java program?复制了代码。但是当我运行此代码时,它会给我以下错误:

Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.RuntimeException: Uncompilable source code - cannot find symbol
  symbol:   class lexparser
  location: class edu.stanford.nlp.parser
    at edu.stanford.nlp.parser.<clinit>(parser.java:10)
/home/shivam/.cache/netbeans/8.1/executor-snippets/run.xml:53: Java returned: 1

我已将斯坦福大学的corenlp jar文件与项目集成在一起。我附上了我的库中包含的jar文件的屏幕截图。 enter image description here 当我打开stanford-corenlp.jar文件时,我可以在edu / stanford / nlp中看到解析器,也可以在解析器中看到lexparser。

0 个答案:

没有答案