我从这个链接下载了最新版本的斯坦福 CoreNLP 和更大的英文模型
将下载的模型放在同一个项目文件夹中,我使用“ant”/“ant jar”来构建项目。
然后我在 Windows 上使用此命令加载服务器:
java -d64 -mx20g -classpath "*;lib\*;liblocal\*;libsrc\*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -timeout 500000
从http://localhost:9000加载结果页面,使用关系、共指等过滤器时服务器崩溃。
我得到错误:
java.util.concurrent.ExecutionException: java.lang.NullPointerException
来自服务器的日志:
一些注释失败,例如:
[pool-1-thread-1] INFO edu.stanford.nlp.pipeline.MentionAnnotator - Error with building coref mention annotator!
主要问题/异常:
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at edu.stanford.nlp.pipeline.StanfordCoreNLPServer$CoreNLPHandler.handle(StanfordCoreNLPServer.java:497)
at com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source)
at sun.net.httpserver.AuthFilter.doFilter(Unknown Source)
at com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source)
at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(Unknown Source)
at com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source)
at sun.net.httpserver.ServerImpl$Exchange.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at edu.stanford.nlp.pipeline.MentionAnnotator.annotate(MentionAnnotator.java:100)
at edu.stanford.nlp.pipeline.AnnotationPipeline.annotate(AnnotationPipeline.java:75)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.annotate(StanfordCoreNLP.java:606)
at edu.stanford.nlp.pipeline.StanfordCoreNLPServer$CoreNLPHandler.lambda$handle$344(StanfordCoreNLPServer.java:479)
at java.util.concurrent.FutureTask.run(Unknown Source)
... 3 more
任何可能导致此问题的帮助将不胜感激。
谢谢