In [6]:
from nltk.corpus import wordnet as wn
In [13]:
wn.synset('cattle.n.01').hypernyms()
Out[13]:
In [25]:
bovine = wn.synset('bovine.n.01')
cattle = wn.synset('cattle.n.01')
cow = wn.synset('cow.n.01')
In [29]:
cow.wup_similarity(bovine)
Out[29]:
In [30]:
wn.synsets('cow')
Out[30]:
In [32]:
wn.synset('cow.n.01').hypernyms()
Out[32]:
In [ ]: