1.错误
File "E:\Anaconda_app\lib\site-packages\nltk\data.py", line 701, in find
raise LookupError(resource_not_found)
LookupError:
**********************************************************************
Resource punkt not found.
Please use the NLTK Downloader to obtain the resource:
>>> import nltk
>>> nltk.download('punkt')
For more information see: https://www.nltk.org/data.html
Attempted to load tokenizers/punkt/english.pickle
Searched in:
- 'C:\\Users\\FGro/nltk_data'
- 'E:\\Anaconda_app\\nltk_data'
- 'E:\\Anaconda_app\\share\\nltk_data'
- 'E:\\Anaconda_app\\lib\\nltk_data'
- 'C:\\Users\\FGro\\AppData\\Roaming\\nltk_data'
- 'C:\\nltk_data'
- 'D:\\nltk_data'
- 'E:\\nltk_data'
- ''
2、在线解决
方法一:
>>> import nltk
>>> nltk.download('stopwords')
[nltk_data] Error loading stopwords: <urlopen error [Errno 1

本文详细阐述了在使用NLTK遇到'punkt not found'错误时的解决步骤,包括在线下载停用词包、解决getaddrinfo failed问题,以及离线下载punkt资源。提供了解决大型文件下载和网络不稳定情况的方法,涉及下载链接和具体操作技巧。
最低0.47元/天 解锁文章
6365

被折叠的 条评论
为什么被折叠?



