Reputation: 25928
Is it possible for the python library NLTK to suggest/create synonyms for groups of words?
For example; for the word/group "main course" can I use NLTK to get the synonyms "main dish", "main meal", "dinner" etc.?
Heres my code that works for single word synonyms but not multiwords:
from nltk.corpus import wordnet as wn
print wn.synset("eat.v.01").lemma_names # prints synonyms of eat
print wn.synset("main course.n.01").lemma_names # throws WordNetError
Upvotes: 5
Views: 4352