-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracing back 'inferred' synsets to their reference lexicons #167
Comments
First of all, the functions of the >>> import wn
>>> fr = wn.Wordnet('omw-fr', expand='omw-en')
>>> fr.synset('omw-fr-00619230-n').relations()
{'omw-fr-00618734-n': [Synset('omw-fr-00618734-n')], 'hyponym': [Synset('*INFERRED*'), Synset('*INFERRED*')], 'has_domain_topic': [Synset('*INFERRED*')]} If you just use the It's not a bad idea to somehow retain the lexicon whence an synset was inferred, though. |
Thanks for the Wordnet class tip. I had seen it in the docs but it somehow didn't register in my mind. |
See https://github.com/globalwordnet/schemas/
This might be implemented as an element rather than a relation type, because the relation type + target can help it select the thing to be masked (relations don't have unique IDs). E.g.: <ExternalSynset id="...">
<SynsetRelationMask relType="hyponym" target="..." />
</ExternalSynset> A problem with this is that if you want to mask a certain relation type between synsets A and B and then want to create a new relationship of the same type between A and B, we'd have to be careful to apply those extensions in the proper order, otherwise the mask might block the new relation, too. If you have a proposal for how to do this, create an issue at https://github.com/globalwordnet/schemas/ so it can be tracked and discussed. |
When looking at relations for the omw-fr-00619230-n synset, I saw four INFERRED synsets for the hyponym relation and two for the has_domain_topic one.
The oewn and omw-en lexicons both return two hyponyms and one has_domain_topic synsets for the translation of omw-fr-00619230-n.
print(wn.synset('omw-fr-00619230-n').relations())
#{'omw-fr-00618734-n':
##[Synset('omw-fr-00618734-n')],
##'hyponym': [Synset('*INFERRED*'), Synset('*INFERRED*'), Synset('*INFERRED*'), Synset('*INFERRED*')],
##'has_domain_topic': [Synset('*INFERRED*'), Synset('*INFERRED*')]}
print(wn.synset('omw-fr-00619230-n').translate('oewn')[0].relations())
#{'hypernym': [Synset('oewn-00619974-n')],
##'hyponym': [Synset('oewn-00620659-n'), Synset('oewn-00620818-n')],
##'has_domain_topic': [Synset('oewn-06506364-n')]}
My understanding is that the relations() function detects the relations in the two English lexicons I have loaded.
It seems that, at the moment, these are the only two lexicons I am working with which are providing "extra relations".
Since I'm hoping to work with (or eventually create/support) other lexicons with their own relations, I envision a challenge in retrieving the source lexicon for any given inferred synset.
My question is thus, is there currently (or planned) a mean to retrieve the source lexicon of an inferred synset?
Thanks!
The text was updated successfully, but these errors were encountered: