Looking up synonym-sets for a word

From Media Design: Networked & Lens-Based wiki
Jump to navigation Jump to search
from nltk.corpus import wordnet
meanings = wordnet.synsets('woman')
for m in meanings:
    print "===", m.name, "==="
    print m.definition
    print "\t* ".join(m.examples)