Resource punkt not found. Please use the NLTK Downloader to obtain the resource错误解决方案
一、首先前提是已经安装了python的nltk库(见下图),目的是调用nltk库的word_tokenize方法实现英文分词。
二、在运行word_tokenize方法代码中报“Resource punkt not found. Please use the NLTK Downloader to obtain the resource”错误(见下图),翻译成中文是“找不到资源。请使用NLTK下载程序获取资源”,官方也已经明显提示我们怎么去解决这个问题。
三、在 jupyter notebook 中复制粘贴运行下面的代码,目的是打开NLTK下载资源的网页进行下载程序获取资源(见下面第二张图)。