3

I've been playing around with the NLTK WordNet package but was quite confused with the different methods for Synsets.

I understand the meaning of meronym / holonyms and hypernym / hyponyms. But in NLTK WordNet, there are part_meronyms and member_meronyms, and instance_hypernyms and hypernyms.

It seems that part_meronyms is returning the meronyms of a Synset and hypernyms is the method to use. But what's the difference? There also seems to be no documentation on the NLTK website.

farmer
  • 285
  • 1
  • 13
peidaqi
  • 673
  • 1
  • 7
  • 18

1 Answers1

2

A meronym is some component of a larger whole, that can represent the whole semantically. Since this is a vast relationship, nltk divides the meronym categories into part-representing whole(part_meronyms()), and substance-representing whole(substance_meronyms()).

tree = wn.synset('tree.n.01')

tree.part_meronyms()
>>>[Synset('burl.n.02'), Synset('crown.n.07'), Synset('limb.n.02'), Synset('stump.n.01'), Synset('trunk.n.01')]


tree.substance_meronyms()
>>>[Synset('heartwood.n.01'), Synset('sapwood.n.01')]

Hypernyms are not related to meronyms categorically. A given Synset's hypernym list contains all Synsets one depth level lower than the target Synset in the word tree.

wordnet.synsets("placental")[0].hypernyms()
>>> [Synset('mammal.n.01')]

Meronym example taken from here:

https://medium.com/parrot-prediction/dive-into-wordnet-with-nltk-b313c480e788

schulmaster
  • 413
  • 5
  • 16
  • 1
    Thanks for your answer. The tree example is a bit confusing though - but with the provided link there's another example of water which perfectly explains the idea. Mark as solved. – peidaqi May 07 '18 at 14:10