我已经在本地设置了coreNLP服务器,可以使用以下命令启动:
java -mx5g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -timeout 100000 但默认的选民解析器设置为以下警告消息:
edu/stanford/nlp/models/srparser/englishSR.ser.gz警告:找不到
改用: edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz
我下载了shift reduce解析器,解压了jar文件,并在项目目录中粘贴了edu文件夹。
为了仔细检查,我手动遍历到edu/stanford/nlp/models/lexparser以确保englishSR.ser.gz存在。
此外,创建了.properties文件,并在重新启动服务器时使用了-serverProperties选项。
StanfordCoreNLP.properties文件包含:
parser.model = edu/stanford/nlp/models/srparser/englishSR.ser.gz运行服务器的
edu.stanford.nlp.pipeline.StanfordCoreNLPServer
-mx5g -cp "*“java -timeout 100000 -serverProperties "StanfordCoreNLP.properties”
没有运气,我仍然收到同样的警告。如果需要更多的澄清,请发表评论。
发布于 2018-08-03 03:42:10
您应该将完整的英语模型jar放在运行此命令的目录中。
-cp "*"要求查看该目录中的所有jars。
你可以在这里找到英文模型的jar:
https://stackoverflow.com/questions/51639330
复制相似问题