pythonrnlpsemantic-analysishypernym

How to automatically identify hypernyms from a group of words?


I have several groups of words, for example in group A: apple, pear, banana, fruit, grape, watermelon; in group B: cat, animal, dog, pig, monkey, duck; in group C: Italy, Australia, country, China, Greece.

How can I automatically identify the hypernyms from these 3 groups (e.g., fruit for group A, animal for group B and country for group C)? Thank you very much.


Solution

  • You can use WordNet which is built into nltk. For more information check out this question here: Determining Hypernym or Hyponym using wordnet nltk

    It's important to understand however that identification of hypernyms will only be as good as the training data allows. There is no magical system for identifying groupings of similar objects other than to train using tagged data.