Stanford nlp 无法使用Shift-Reduce解析器启动Stanford CoreNLP服务器

Stanford nlp 无法使用Shift-Reduce解析器启动Stanford CoreNLP服务器,stanford-nlp,Stanford Nlp,我已经在本地安装了coreNLP服务器,可以使用以下命令启动: java -mx5g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -timeout 100000 但默认选区分析器设置了以下警告消息: 警告:找不到edu/stanford/nlp/models/srparser/englishSR.ser.gz 改为使用:edu/stanford/nlp/models/lexparser/englishP

我已经在本地安装了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
  • 运行服务器的命令现在是:
运气不好,我仍然收到同样的警告。
如果需要更多说明,请发表评论。

您应该将完整的English models jar放在运行此命令的目录中

-cp“*”
表示要查看该目录中的所有jar

你可以在这里找到英文模型:

java -mx5g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -timeout 100000 -serverProperties "StanfordCoreNLP.properties"