如何修复“找不到资源punkt”的nltk错误

2024-04-25 00:53:05 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图运行一个使用nltk的python脚本,但是我一直得到下面的错误。我已经在这方面经历了很多的线程,我已经安装和卸载了nltk,但仍然无法找出问题所在。 我遵照这里的指示

https://www.nltk.org/install.html

Resource punkt not found. Please use the NLTK Downloader to obtain the resource:

import nltk nltk.download('punkt')

有关详细信息,请参阅:https://www.nltk.org/data.html

试图加载标记器/punkt/PY3/英语.泡菜在

搜索范围: -'/Users/name/nltk_数据' -'/库/框架/Python.framework/Versions/3.7/nltk_数据' -'/库/框架/Python.framework/Versions/3.7/共享/nltk_数据' -'/库/框架/Python.framework/Versions/3.7/lib/nltk_数据' -'/usr/share/nltk_数据' -'/usr/local/share/nltk_数据' -'/usr/lib/nltk_数据' -'/usr/local/lib/nltk_数据' -''

如何修复此错误


Tags: the数据httpsorg框架sharelibusr