600字范文,内容丰富有趣,生活中的好帮手!
600字范文 > nltk_data LookupError: Resource punkt not found. Please use the NLTK Downloader to obtain the resour

nltk_data LookupError: Resource punkt not found. Please use the NLTK Downloader to obtain the resour

时间:2021-10-20 17:22:03

相关推荐

nltk_data LookupError: Resource punkt not found. Please use the NLTK Downloader to obtain the resour

问题

报错:

[nltk_data] Error loading punkt: <urlopen error [Errno 11004][nltk_data]getaddrinfo failed>False

LookupError: **********************************************************************Resource punkt not found.Please use the NLTK Downloader to obtain the resource:>>> import nltk>>> nltk.download('punkt')For more information see: /data.htmlAttempted to load tokenizers/punkt/english.pickleSearched in:- 'C:\\Users\\cunzhang/nltk_data'- 'D:\\Anaconda\\nltk_data'- 'D:\\Anaconda\\share\\nltk_data'- 'D:\\Anaconda\\lib\\nltk_data'- 'C:\\Users\\cunzhang\\AppData\\Roaming\\nltk_data'- 'C:\\nltk_data'- 'D:\\nltk_data'- 'E:\\nltk_data'- ''**********************************************************************

使用nltk.download()无法下载,还是离线下载自己安装吧。

解决方案

离线下载

网址:

/nltk_data/

下载:

将文件解压到以下的任意文件夹中

文件放置的时候注意文件夹的格式(新建文件夹nltk_data,tokenizers)

再次运行程序就好啦

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。