【发布时间】:2020-06-08 17:55:05
【问题描述】:
我正在尝试将 Spacy 用于西班牙语中的 pos tagging,为此我已经检查了官方文档,并且还阅读了 Stackoverflow 中的各种帖子,但对我来说都没有。
我安装了 Python 3.7 和 Spacy 2.2.4,并且正在从 jupyter notebook 运行我的代码
所以正如documentation 建议我尝试的那样:
从我的终端:
python -m spacy download en_core_web_sm
这给出了结果:
Download and installation successful
然后在我的 jupyter 笔记本中:
import spacy
nlp = spacy.load("es_core_news_sm")
我收到以下错误:
ValueError: [E173] As of v2.2, the Lemmatizer is initialized with an instance of Lookups containing the lemmatization tables. See the docs for details: https://spacy.io/api/lemmatizer#init
另外,我试过了:
import spacy
nlp = spacy.load("es_core_news_sm")
这给了我一个不同的错误:
OSError: Can't find model 'es_core_news_sm'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory
你能帮我解决这个错误吗?
【问题讨论】:
标签: python-3.x nlp spacy pos-tagger