0
我有python 2.6,Python的NLTK,以及我正在使用的一些外部资源。问题是,一切都被识别(import语句)pydev eclipse中的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)?
可能重复http://stackoverflow.com/questions/4867197/failed-loading-english-pickle -with-NLTK数据负载) – 2011-02-01 19:53:39