当前位置:   article > 正文

NLTK下载错误的终极解决办法_[nltk_data] downloading package averaged_perceptro

[nltk_data] downloading package averaged_perceptron_tagger to

Downloading package brown to
    C:\Users\Ken\AppData\Roaming\nltk_data...
Error downloading 'brown' from
    <https://raw.githubusercontent.com/nltk/nltk_data/gh-
    pages/packages/corpora/brown.zip>:   <urlopen error
    [WinError 10061] 由于目标计算机积极拒绝,无法连接。>

Downloading package averaged_perceptron_tagger to
    C:\Users\Ken\AppData\Roaming\nltk_data...
Error downloading 'averaged_perceptron_tagger' from
    <https://raw.githubusercontent.com/alvations/nltk_data
    /gh-pages/packages/taggers/averaged_perceptron_tagger.
    zip>:   HTTP Error 404: Not Found

LookupError: Recource 'tokenizers/punkt/english.pickle' not found

python -m nltk.downloader -u http://nltk.github.com averaged_perceptron_tagger

以上种种错误的解决办法: 离线下载NLTK Data

先去Github下载  https://github.com/nltk/nltk_data/tree/gh-pages 得到nltk_data-gh-pages.zip文件

通过比较可以发现压缩包中的文件结构和%appdata%/Roaming/nltk_data下的目录结构是一致的,

所以把packages里面的东西复制到%appdata%/Roaming/nltk_data里面就可以了

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

闽ICP备14008679号