我有 python 2.6 、用于 python 的 NLTK 以及我正在使用的几个外部资源。问题是,一切都被识别(导入语句)
from nltk import sent_tokenize
from nltk import word_tokenize
import re
from nltk.corpus import stopwords
from nltk.stem import PorterStemmer
from nltk.probability import FreqDist
Traceback (most recent call last):
File "E:\Program Files\eclipse\Martin Project Folder\labs2\src\lab2.py", line 22, in <module>
sents.append(sent_tokenize( review.raw( ) ))
on line 22 you :
Resource 'tokenizers/punkt/english.pickle' not found. Please
use the NLTK Downloader to obtain the resource: >>>
nltk.download().
Searched in:
- 'C:\\Users\\Martinos/nltk_data'
- 'C:\\nltk_data'
- 'D:\\nltk_data'
- 'E:\\nltk_data'
- 'E:\\Python26\\nltk_data'
- 'E:\\Python26\\lib\\nltk_data'
- 'C:\\Users\\Martinos\\AppData\\Roaming\\nltk_data'
任何人都知道这是为什么,因为程序应该在 nltk 中找到 punkd 版本(因为它识别 nltk)?