Skip to content

how to query any synset relation type, like 'agent', 'causes', etc ? #134

Answered by goodmami
costaverde asked this question in Q&A
Discussion options

You must be logged in to vote

The wn._queries module is not part of the public API, nor is any other module prefixed with _. This means that the functions are not documented and they may (and do, occasionally) change from one version to the next without a CHANGELOG entry or change to the major version number. I do not recommend using those.

There is the Synset.get_related() method for finding relations with any available relation name. Similarly for senses is Sense.get_related(), and for sense-to-synset relations there is Sense.get_related_synsets(). Since the last release, both Synset and Sense also have a relations() method which does the same thing but returns a dictionary mapping the relation names to the lists of…

Replies: 7 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by goodmami
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
3 participants
Converted from issue

This discussion was converted from issue #129 on June 27, 2021 02:10.