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
Searched in:
- ‘/root/nltk_data’
- ‘/root/anaconda3/envs/LLM/nltk_data’
- ‘/root/anaconda3/envs/LLM/share/nltk_data’
- ‘/root/anaconda3/envs/LLM/lib/nltk_data’
- ‘/usr/share/nltk_data’
- ‘/usr/local/share/nltk_data’
- ‘/usr/lib/nltk_data’
- ‘/usr/local/lib/nltk_data’
解决办法:从这里手动下载相关文件即可。
https://github.com/nltk/nltk_data
然后将对应文件复制到如下任意路径之一:
同时要注意解压:
https://zhuanlan.zhihu.com/p/433423216