Can't find model 'en'

在使用

nlp = spacy.load("en")

报错
OSError: Can't find model 'en'

应该用
python -m spacy download en
但是网速不行,手动到https://github.com/explosion/spacy-models/releases/tag/en_core_web_sm-2.0.0
下载并按安装 pip install en_core_web_sm-2.0.0.tar.gz

结果运行任报错
nlp = spacy.load("en")
应改成
nlp = spacy.load("en_core_web_sm")运行,问题解决
posted @ 2018-03-28 23:23  植入代码  阅读(5016)  评论(0编辑  收藏  举报