当前位置:   article > 正文

nltk.download(“stopwords“)_nltk.download('stopwords')

nltk.download('stopwords')

Resource 'corpora/stopwords' not found.  Please use the NLTK

  Downloader to obtain the resource: 

>>> nltk.download()

解决方案:

nltk.download("stopwords")

------------------------------------------------------------------------------------------------------------------------------------------------------------

很尴尬,今天第二次碰到这个问题:

完整复现问题如下:

>>> nltk.download('movie_reviews')
[nltk_data] Error loading movie_reviews: <urlopen error [Errno 101]
[nltk_data]     Network is unreachable>

 

解决办法:

修改下面的Server Index为http://www.nltk.org/nltk_data/

 

虽然是出来了列表,但是发现左下角的信息依然会提示网络问题。

--------------------------------------------------------------最终解决办法一--------------------------------------------------------------------

 最后只能使用代理了,确保vtoray已经启动

>>> nltk.set_proxy('http://127.0.0.1:10809')
>>> nltk.download()

--------------------------------------------------------------最终解决办法二--------------------------------------------------------------------

https://github.com/nltk/nltk_data/blob/gh-pages/packages/corpora/movie_reviews.zip

下载后放到路径:

/home/appleyuchi/nltk_data/corpora

--------------------------------------------------------------最终解决办法三--------------------------------------------------------------------

去下面的路径下载:

https://gitee.com/fastsource/nltk_data/tree/gh-pages/packages

下载后放到路径:

/home/appleyuchi/nltk_data/corpora

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/神奇cpp/article/detail/972853
推荐阅读
相关标签
  

闽ICP备14008679号