cfiltnlp / pyiwn

A Python based API to access Indian language WordNets.
http://www.cfilt.iitb.ac.in/
Creative Commons Attribution Share Alike 4.0 International
34 stars 19 forks source link

Hypernyms-hyponyms, meronym-holonym not symmetric #19

Open vrindajindal2003 opened 3 years ago

vrindajindal2003 commented 3 years ago

The hypernym-hyponym and meronym-holonym relations have some discrepancies in the sense that if A is a hypernym of B, then B should b a hyponym of A and similarly with meronym-holonym but it is not the case. These discrepancies are also there in the database (the dropbox link in the constanst.py file)

The two numbers should be the same in both the case (as is the case in English wordnet provided by nltk)

code for finding hypernyms: num_hypernym=0 for v in iwn.all_synsets.() : num_hypernym += len(iwn.synset_relation( v , pyiwn.SynsetRelations.HYPONYMY))

Not sure if this is same in the original hindi/indo wordnet database or it is specific to pyiwn.