维基百科实体注释器不在斯坦福coreNLP中工作
我已经在我的系统上安装了斯坦福coreNLP库的本地服务器。尽管如此,我还是能够像人们在网上一样得到回应。但在我的服务器维基百科实体注释器不在斯坦福coreNLP中工作,nlp,stanford-nlp,Nlp,Stanford Nlp,我已经在我的系统上安装了斯坦福coreNLP库的本地服务器。尽管如此,我还是能够像人们在网上一样得到回应。但在我的服务器wikipedia实体中选项不起作用。服务器出现以下错误: java.lang.RuntimeException: edu.stanford.nlp.io.RuntimeIOException: java.io.IOException: Unable to open "edu/stanford/nlp/models/kbp/wikidict.tab.gz" as class p
wikipedia实体中
选项不起作用。服务器出现以下错误:
java.lang.RuntimeException: edu.stanford.nlp.io.RuntimeIOException: java.io.IOException: Unable to open "edu/stanford/nlp/models/kbp/wikidict.tab.gz" as class path, filename or URL
at edu.stanford.nlp.pipeline.WikidictAnnotator.<init>(WikidictAnnotator.java:81)
at edu.stanford.nlp.pipeline.AnnotatorImplementations.link(AnnotatorImplementations.java:296)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.lambda$getNamedAnnotators$63(StanfordCoreNLP.java:517)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.lambda$getDefaultAnnotatorPool$65(StanfordCoreNLP.java:533)
at edu.stanford.nlp.util.Lazy$3.compute(Lazy.java:118)
at edu.stanford.nlp.util.Lazy.get(Lazy.java:31)
at edu.stanford.nlp.pipeline.AnnotatorPool.get(AnnotatorPool.java:146)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.construct(StanfordCoreNLP.java:447)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.<init>(StanfordCoreNLP.java:150)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.<init>(StanfordCoreNLP.java:146)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.<init>(StanfordCoreNLP.java:133)
at edu.stanford.nlp.pipeline.StanfordCoreNLPServer.mkStanfordCoreNLP(StanfordCoreNLPServer.java:319)
at edu.stanford.nlp.pipeline.StanfordCoreNLPServer.access$500(StanfordCoreNLPServer.java:50)
at edu.stanford.nlp.pipeline.StanfordCoreNLPServer$CoreNLPHandler.handle(StanfordCoreNLPServer.java:642)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)
at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:675)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: edu.stanford.nlp.io.RuntimeIOException: java.io.IOException: Unable to open "edu/stanford/nlp/models/kbp/wikidict.tab.gz" as class path, filename or URL
at edu.stanford.nlp.io.IOUtils$GetLinesIterable$1.getReader(IOUtils.java:802)
at edu.stanford.nlp.io.IOUtils$GetLinesIterable$1.<init>(IOUtils.java:760)
at edu.stanford.nlp.io.IOUtils$GetLinesIterable.iterator(IOUtils.java:758)
at edu.stanford.nlp.pipeline.WikidictAnnotator.<init>(WikidictAnnotator.java:58)
... 22 more
Caused by: java.io.IOException: Unable to open "edu/stanford/nlp/models/kbp/wikidict.tab.gz" as class path, filename or URL
at edu.stanford.nlp.io.IOUtils.getInputStreamFromURLOrClasspathOrFileSystem(IOUtils.java:480)
at edu.stanford.nlp.io.IOUtils$GetLinesIterable.getStream(IOUtils.java:750)
at edu.stanford.nlp.io.IOUtils$GetLinesIterable.access$000(IOUtils.java:719)
at edu.stanford.nlp.io.IOUtils$GetLinesIterable$1.getReader(IOUtils.java:792)
... 25 more
java.lang.RuntimeException:edu.stanford.nlp.io.RuntimeIOException:java.io.IOException:无法将“edu/stanford/nlp/models/kbp/wikidict.tab.gz”作为类路径、文件名或URL打开
位于edu.stanford.nlp.pipeline.WikidictAnnotator.(WikidictAnnotator.java:81)
位于edu.stanford.nlp.pipeline.annotatorimplements.link(annotatorimplements.java:296)
在edu.stanford.nlp.pipeline.StanfordCoreNLP.lambda$getNamedAnnotators$63(StanfordCoreNLP.java:517)
位于edu.stanford.nlp.pipeline.StanfordCoreNLP.lambda$getDefaultAnnotatorPool$65(StanfordCoreNLP.java:533)
位于edu.stanford.nlp.util.Lazy$3.compute(Lazy.java:118)
位于edu.stanford.nlp.util.Lazy.get(Lazy.java:31)
位于edu.stanford.nlp.pipeline.AnnotatorPool.get(AnnotatorPool.java:146)
位于edu.stanford.nlp.pipeline.StanfordCoreNLP.construct(StanfordCoreNLP.java:447)
位于edu.stanford.nlp.pipeline.StanfordCoreNLP.(StanfordCoreNLP.java:150)
位于edu.stanford.nlp.pipeline.StanfordCoreNLP.(StanfordCoreNLP.java:146)
位于edu.stanford.nlp.pipeline.StanfordCoreNLP.(StanfordCoreNLP.java:133)
位于edu.stanford.nlp.pipeline.StanfordCoreNLPServer.mkStanfordCoreNLP(StanfordCoreNLPServer.java:319)
在edu.stanford.nlp.pipeline.StanfordCoreNLPServer.access$500(StanfordCoreNLPServer.java:50)
位于edu.stanford.nlp.pipeline.StanfordCoreNLPServer$CoreNLPHandler.handle(StanfordCoreNLPServer.java:642)
位于com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
位于sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
位于com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)
位于sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:675)
位于com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
位于sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647)
位于java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
位于java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
运行(Thread.java:748)
原因:edu.stanford.nlp.io.RuntimeIOException:java.io.IOException:无法将“edu/stanford/nlp/models/kbp/wikidict.tab.gz”作为类路径、文件名或URL打开
位于edu.stanford.nlp.io.IOUtils$GetLinesIterable$1.getReader(IOUtils.java:802)
在edu.stanford.nlp.io.IOUtils$GetLinesIterable$1。(IOUtils.java:760)
位于edu.stanford.nlp.io.IOUtils$GetLinesIterable.iterator(IOUtils.java:758)
位于edu.stanford.nlp.pipeline.WikidictAnnotator.(WikidictAnnotator.java:58)
... 还有22个
原因:java.io.IOException:无法将“edu/stanford/nlp/models/kbp/wikidict.tab.gz”作为类路径、文件名或URL打开
在edu.stanford.nlp.io.IOUtils.getInputStreamFromURLOrClasspathOrFileSystem(IOUtils.java:480)上
位于edu.stanford.nlp.io.IOUtils$GetLinesIterable.getStream(IOUtils.java:750)
在edu.stanford.nlp.io.IOUtils$GetLinesIterable.access$000(IOUtils.java:719)
在edu.stanford.nlp.io.IOUtils$GetLinesIterable$1.getReader(IOUtils.java:792)
... 25多
我已经下载了wikidict.tab.gz文件,但我不知道如何使用它。我找到了解决这个问题的方法。您需要执行以下步骤:
wikidict.tab.gz
文件wikidict.tab.gz
文件stanford-corenlp-3.8.0-models.jar文件中
@sv_jan5的答案很好,但下载并在类路径中包含下载页()中的
English(KBP)
modelsjar可能更容易。命名有点神秘——KBP代表“知识库群体”,它包含实体链接模型和新的关系提取模型
Direct link适用于3.8.0版本(警告:500MB下载)。有什么问题?为什么要投否决票?同时也要提到一些原因。你的答案更清晰。谢谢!