goodmami / wn

A modern, interlingual wordnet interface for Python
https://wn.readthedocs.io/
MIT License
197 stars 19 forks source link

Synset.relations() for some lexicons uses synset id as relation name #169

Closed goodmami closed 1 year ago

goodmami commented 2 years ago

Compare the difference in the relation name for the oewn versus the omw-fr lexicons:

>>> import wn
>>> wn.synsets('dog', pos='n', lexicon='oewn')[0].relations('hypernym')
{'hypernym': [Synset('oewn-02085998-n'), Synset('oewn-01320032-n')]}
>>> wn.synsets('chien', pos='n', lexicon='omw-fr')[0].relations('hypernym')
{'omw-fr-10753546-n': [Synset('omw-fr-10753546-n')]}

For OEWN, the relation name is hypernym while for omw-fr it is omw-fr-10753546-n. I suspect this is the case for relations obtained from expand lexicons.