问题:
解决办法:
在 C:\Windows\System32\drivers\etc 路径下找到 hosts 文件
在最后添加 199.232.68.133 raw.githubusercontent.com IP地址,并保存
重新运行 nltk.download()
结果:
测试:
from nltk.corpus import stopwords
stop_words = stopwords.words('english') #选择英文停止词 去重 得到英文停止词表
print(stop_words)
[‘i’, ‘me’, ‘my’, ‘myself’, ‘we’, ‘our’, ‘ours’, ‘ourselves’, ‘you’, “you’re”, “you’ve”, “you’ll”, “you’d”, ‘your’, ‘yours’, ‘yourself’, ‘yourselves’, ‘he’, ‘him’,
此时:
可以显示下载界面
总结:理清问题的本质 解决问题就有了头绪