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

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