赞
踩
安装官网上的教程的做法,官网链接,是完全不行,老是提示HTTPconnection error。所以这种方法完全放弃
下面讲讲详细步骤
https://github.com/explosion/spacy-models/releases
pip install zh_core_web_sm-3.2.0
import spacy
nlp = spacy.load("zh_core_web_sm")
text = '广东省广州市'
doc = nlp(text)
for ent in doc.ents:
print(ent.text, ent.label_)```
广东省 GPE
广州市 GPE
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。