赞
踩
nltk无法下载,显示
[nltk_data] Error loading stopwords: <urlopen error [Errno 11004]
[nltk_data] getaddrinfo failed>
解决方案:
import nltk
import ssl
try:
_create_unverified_https_context = ssl._create_unverified_context
except AttributeError:
pass
else:
ssl._create_default_https_context = _create_unverified_https_context
nltk.download('stopwords')
如果还不行,显示
[nltk_data] Error downloading 'stopwords' from
[nltk_data] <https://raw.githubusercontent.com/nltk/nltk_data/gh-
[nltk_data] pages/packages/corpora/stopwords.zip>: [WinError
[nltk_data] 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。
Out[7]: False
就搭个梯子,下载就行了
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。