【发布时间】:2017-05-27 09:42:57
【问题描述】:
我尝试在 python 2.7 中导入 nltk 包
import nltk
stopwords = nltk.corpus.stopwords.words('english')
print(stopwords[:10])
运行它会给我以下错误:
LookupError:
**********************************************************************
Resource 'corpora/stopwords' not found. Please use the NLTK
Downloader to obtain the resource: >>> nltk.download()
因此,我打开了我的 python 终端并执行了以下操作:
import nltk
nltk.download()
这给了我:
showing info https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/index.xml
然而,这似乎并没有停止。再次运行它仍然给我同样的错误。有什么想法会出错吗?
【问题讨论】: