Looking up synonym-sets for a word

From XPUB & Lens-Based wiki
Revision as of 12:43, 16 March 2011 by Aymeric Mansoux (talk | contribs) (Created page with "<source lang="python"> from nltk.corpus import wordnet meanings = wordnet.synsets('woman') for m in meanings: print "===", m.name, "===" print m.definition print "\t*...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
from nltk.corpus import wordnet
meanings = wordnet.synsets('woman')
for m in meanings:
    print "===", m.name, "==="
    print m.definition
    print "\t* ".join(m.examples)