首页 > 解决方案 > 使用 wikidict 注释时的斯坦福 NER 4.2.2 问题

问题描述

我正在尝试启动 wikidict 访问。我正在使用Java 15 中https://stanfordnlp.github.io/CoreNLP/entitylink.html文档中的示例注释字符串,并利用了两个 Maven 依赖项,包括stanford-corenlp 4.2.2代码和模型。

-annotators tokenize,ssplit,pos,lemma,ner,entitylink -file example.txt

我的 Java 代码是

props.setProperty("annotators", "tokenize,ssplit,pos,lemma,ner,entitylink + -file wikidict.tab.gz");

我收到以下错误和跟踪:

java.lang.IllegalArgumentException:没有名为 -file 的注释器

0 = {StackTraceElement@3486} "edu.stanford.nlp.pipeline.AnnotatorPool.get(AnnotatorPool.java:151)" 1 = {StackTraceElement@3487} "edu.stanford.nlp.pipeline.StanfordCoreNLP.(S​​tanfordCoreNLP.java: 253)" 2 = {StackTraceElement@3488} "edu.stanford.nlp.pipeline.StanfordCoreNLP.(S​​tanfordCoreNLP.java:194)" 3 = {StackTraceElement@3489} "edu.stanford.nlp.pipeline.StanfordCoreNLP.(S​​tanfordCoreNLP. java:190)" 4 = {StackTraceElement@3490} "org.newcashel.NERProcessor.establishNERPipeline(NERProcessor.java:47)" 5 = {StackTraceElement@3491} "org.newcashel.DocManagerMain.main(DocManagerMain.java:16) "

该文件是从stanford-corenlp-4.2.1-models-english--kbp.jar. 我发现了一些关于 3.9 中已解决的相关问题的讨论,但没有关于 entitylink 注释的内容。

标签: stanford-nlp

解决方案


推荐阅读