I installed the NLTK 3.0.0 release with python2.7.8.11 on Debian. My script bugs out with
'WordNetCorpusReader' object has no attribute '_LazyCorpusLoader__args'
Here's the whole message:
Exception in thread Thread-4:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "phrase-count.py", line 137, in count_year
feature_vector = _count_phrases(captionfile, phrases_dict)
File "phrase-count.py", line 102, in _count_phrases
words = _read_caption_and_clean(captionfile)
File "phrase-count.py", line 76, in _read_caption_and_clean
return cleansing.clean(words)
File "/home/liontooth/Programming/count-phrases/cleansing.py", line 10, in clean
words = [__morphy(w) for w in words]
File "/home/liontooth/Programming/count-phrases/cleansing.py", line 47, in __morphy
result_set.insert(0, wn.morphy(word, wn.NOUN))
File "/usr/lib/python2.7/dist-packages/nltk/corpus/util.py", line 99, in __getattr__
self.__load()
File "/usr/lib/python2.7/dist-packages/nltk/corpus/util.py", line 73, in __load
args, kwargs = self.__args, self.__kwargs
AttributeError: 'WordNetCorpusReader' object has no attribute '_LazyCorpusLoader__args'
Any suggestions as to what's going wrong?
Cheers,
Dave