stanfordcorenlp安装部署

stanfordcorenlp和stanfordnlp什么关系不太清楚。stanfordnlp更名为Stanza https://github.com/stanfordnlp/stanfordnlp有说明。

stanfordcorenlp的一句话也没具体说明两者关系:

Stanford CoreNLP integrates many of Stanford’s NLP tools, including the part-of-speech (POS) taggerthe named entity recognizer (NER)the parserthe coreference resolution systemsentiment analysisbootstrapped pattern learning, and the open information extraction tools

stanfordcorenlp官网:https://stanfordnlp.github.io/CoreNLP/index.html

步骤

第一步:pip install stanfordcorenlp

第二步:官网下载下面两文件,其他版本看3

安装部署下载下图1和2两个文件,2是1的一个中文处理jar组件,下载后放进1解压的文件夹里面就可以了,没有2只能处理英文。安装部署另外一个说明,版本要一致,好在版本号一致不容易混乱。版本更新有些地方更改,这点要注意了不要混用不同版本。

测试 

from stanfordcorenlp import StanfordCoreNLP
nlp=StanfordCoreNLP(r"E:\Root\stanford\stanford-corenlp-full-2018-10-05",quiet=True,lang='zh')
# sentence='Guangdong University of Foreign Studies is located in Guangzhou.'
s2="请马上告诉我,我将第一时间进行修改.而且服务端的代码很解耦,修改为另外一种任务的服务也是很简单的,例如文本分类,我将会不就提供这一功能,也欢迎愿意分享的童鞋分享模型或者代码"
b=nlp.word_tokenize(s2)
print(b)

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值