Some time ago, someone on SO asked how to retrieve a list of words for a given synset using NLTK's wordnet wrapper. Here is one of the suggested responses:
for synset in wn.synsets('dog'):
print synset.lemmas[0].name
Running this code with NLTK 3.0 yields TypeError: 'instancemethod' object is not subscriptable
.
I tried each of the previously-proposed solutions (each of the solutions described on the page linked above), but each throws an error. I therefore wanted to ask: Is it possible to print the words for a list of synsets with NLTK 3.0? I would be thankful for any advice others can offer on this question.