http://nlp.stanford.edu/software/openie.shtml生成编译时错误:
SemanticGraphCoreAnnotations.EnhancedDependenciesAnnotation cannot be resolved to a type
我在 eclipse 2016
下运行 java-8
。 corenlp-full-2015-12-01.zip
、openie.jar
、openie-models.jar
都包含在我的 eclipse 项目中。
由以下行产生的错误:
System.out.println(sentence.get(SemanticGraphCoreAnnotations.EnhancedDependenciesAnnotation.class).toString(SemanticGraph.OutputFormat.LIST));
谢谢
最佳答案
如果我猜的话,这听起来像是一个类路径问题。如果您删除 openie.jar 或 corenlp 发行版,会发生什么情况?理论上,openie.jar 应该包含运行 Open IE 系统所需的一切。
关于java - Stanford OpenIE 示例代码编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39127890/