goodmami / wn

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

Traverse relations from other lexicons #9

Closed goodmami closed 3 years ago

goodmami commented 4 years ago

With the OMW it is implicit that all the wordnets loaded will share relations; even synsets are shared. But in this project, every synset belongs only to the lexicon that defines it. For projects that depend on the Princeton WordNet (or another wordnet) for its structure, there is currently no implemented way to explore the structure when starting from the depending project's synsets, but this can be done by hopping to synsets sharing an ILI. There are potential issues, such as when the relation goes to a synset with no corresponding ILI-linked synset in the desired language/lexicon.

goodmami commented 3 years ago

This may also require two lists of lexicons: those that are allowed for traversing relations (the "expand" set) and those from which target synsets may be pulled (the "lexicon" set). With only one set, we either allow target synsets to come from the other lexicons (e.g., getting the hypernyms of 犬 (dog) in wnja might return the English synset for "canine"), or we limit results to the same lexicon as the source synset, which might exclude entries from extension lexicons.