错误:

LookupError:


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

import nltk
nltk.download(‘punkt’)

Attempted to load tokenizers/punkt/english.pickle

Searched in:
- ‘C:\Users\tiffa/nltk_data’
NLTK Downloader to obtain the resource

解决思路:

win+R

下载数据包

在Windows的控制台,执行如下命令:
NLTK Downloader to obtain the resource

若下载失败

NLTK Downloader to obtain the resource
NLTK Downloader to obtain the resource
程序打算把 包下载到:C:\Users\tiffa\AppData\Roaming文件夹下面。
但是下载失败了。

所以我,直接把如下的文件下载完毕后,拷贝到C:\Users\tiffa\AppData\Roaming下,即可成功运行程序。

链接:https://pan.baidu.com/s/1xWG2yTXkmw3BFRuOXgS2jQ
提取码:62xn
复制这段内容后打开百度网盘手机App,操作更方便哦

把文件复制过去的样子。

(提醒:把文件下载了之后,可能需要删除掉最外层的空文件夹,需要保证nltk_data的下一级目录就是内容即可。)
NLTK Downloader to obtain the resource

程序成功运行:

NLTK Downloader to obtain the resource

相关文章:

  • 2021-08-29
  • 2021-12-11
  • 2022-12-23
  • 2022-12-23
  • 2022-02-01
  • 2022-01-22
  • 2021-08-21
猜你喜欢
  • 2021-08-10
  • 2022-12-23
  • 2021-05-09
  • 2021-12-06
  • 2021-07-11
  • 2021-10-23
  • 2022-02-10
相关资源
相似解决方案