1. 錯(cuò)誤如下:
LookupError:
**********************************************************************
Resource 'taggers/averaged_perceptron_tagger/averaged_perceptron
_tagger.pickle' not found. Please use the NLTK Downloader to
obtain the resource: >>> nltk.download()
Searched in:
- 'C:\\Users\\Dream^hao`/nltk_data'
- 'C:\\nltk_data'
- 'D:\\nltk_data'
- 'E:\\nltk_data'
- 'E:\\anaconda3.5\\nltk_data'
- 'E:\\anaconda3.5\\lib\\nltk_data'
- 'C:\\Users\\Dream^hao`\\AppData\\Roaming\\nltk_data'
**********************************************************************
2. 解決方法:
- 下載下面的文件:
鏈接:https://pan.baidu.com/s/11M1HkeibAd50oU-OmELorQ
提取碼:bcvr
- 在編寫(xiě)python代碼的工具中輸入以下代碼,得到nltk_data的路徑:
import nltk
nltk.data.path
我的結(jié)果是:
image
- 將上面下載的文件解壓到上面的某個(gè)目錄中,我解壓到的是
C:\Users\Dream^hao\AppData\Roaming\nltk_data:
image
4. 然后程序就可以正常運(yùn)行了:

image