Open goodmami opened 4 years ago
One workaround is to build the words list first:
>>> import wn
>>> w = wn.WordNet()
>>> words = list(w.words(lang='eng'))
>>> for word in words:
... w.synsets(word, pos='n')
...
>>>
Ah, because of that "smart" caching thing that original NLTK WN API was doing.
This is fixable. Let me put on the TODO.
Somehow looking up the synsets for a word changes the underlying dictionary while iterating over it.