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

问题如下:

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/PY3/english.pickle

Resource punkt not found. Please use the NLTK Downloader to obtain the resource: >>> import nlt_第1张图片 

问题发生原因:服务器网络问题,没有办法访问和下载nltk的punkt

解决方法:在http://www.nltk.org/nltk_data/ 中下载:

 解压后,放在以下任意文件夹中:

在这里插入图片描述

文件放置的时候注意文件夹的格式(新建文件夹nltk_datatokenizers):

 

 

 

你可能感兴趣的:(python)