python textblob+NTLK语料包下载

下载运行textblob包后可能会出现这样的提示:

textblob.exceptions.MissingCorpusError:
Looks like you are missing some required data for this feature.
To download the necessary data, simply run
python -m textblob.download_corpora
or use the NLTK downloader to download the missing data: http://nltk.org/data.html
If this doesn’t fix the problem, file an issue at https://github.com/sloria/TextBlob/issues.

做法如下:

python -m textblob.download_corpora

在这里插入图片描述
参考链接:https://github.com/sloria/TextBlob/issues/160


还可能有这样的提示

Resource punkt not found.
Please use the NLTK Downloader to obtain the resource:

做法如下

import nltk
nltk.download('punkt')

在这里插入图片描述

参考链接:https://stackoverflow.com/questions/4867197/failed-loading-english-pickle-with-nltk-data-load

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章