peidaqi
peidaqi

Reputation: 693

What's the difference between part_meronyms and member_meronyms in WordNet from NLTK?

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.

Upvotes: 3

Views: 3137

Answers (1)

schulmaster
schulmaster

Reputation: 433

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

Upvotes: 3

Related Questions