本地启动斯坦福nlp服务

一、下载相关文件

下载链接:https://stanfordnlp.github.io/CoreNLP/history.html
下载nlp文件和对应需要的语言模型
将文件解压,并把语言jar包放到解压后的目录

二、配置classpath

把上步骤解压的文件目录加入到高级系统设置的classpath中

三、在命令行启动

参考链接:https://stanfordnlp.github.io/CoreNLP/corenlp-server.html#getting-started
在powershell中输入以下命令

java -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -serverProperties StanfordCoreNLP-chinese.properties -port 9002 -timeout 15000

四、打开浏览器访问

三步骤启动后,打开浏览器访问192.168.0.1:9002,即可输入句子进行测试,第一次启动输入会比较慢,之后就会快一些

你可能感兴趣的:(自然语言处理,人工智能)