美文网首页
Resource 'corpora/stopwords' not

Resource 'corpora/stopwords' not

作者: 3f31023436c0 | 来源:发表于2018-02-28 14:58 被阅读0次

今天测试nltk,发现程序报错,提示没安装停用词库。

LookupError: ********************************************************************** Resource 'corpora/stopwords' not found. Please use the NLTK Downloader to obtain the resource: >>> nltk.download() Searched in: - 'C:\\Users\\w/nltk_data' - 'C:\\nltk_data' - 'D:\\nltk_data' - 'E:\\nltk_data' - 'C:\\Users\\w\\Anaconda3\\nltk_data' - 'C:\\Users\\w\\Anaconda3\\lib\\nltk_data' - 'C:\\Users\\w\\AppData\\Roaming\\nltk_data'

于是在网上找了一下,需要进入Jupyter nootbook,然后执行下列代码:

import nltk

nltk.download("stopwords")

具体教程见https://www.douban.com/note/534906136/

相关文章

网友评论

      本文标题:Resource 'corpora/stopwords' not

      本文链接:https://www.haomeiwen.com/subject/isabxftx.html