module documentation
This module sets the api type (RPC/ONLINE/OFFLINE). It also contains the list of functions implemented by the BabelNet API.
Function | version |
Undocumented |
Variable | get |
Get the senses of synsets searched by words or by ResourceIDs, satisfying the optional constraints. |
Variable | get |
Get the senses of synsets containing the word with the given constraints. |
Variable | get |
Get the senses of synsets from the word with the given constraints. |
Variable | get |
Return the synset identified by the ResourceID in input. |
Variable | get |
Get synsets by words or by ResourceIDs, satisfying the optional constraints. |
Variable | iterator |
Create a new instance of BabelSynset iterator. |
Variable | lexicon |
Create a new instance of a lexicon iterator. |
Variable | offset |
Create a new instance of an offset iterator. |
Variable | to |
Convert from ResourceID to the corresponding BabelSynset. |
Variable | wordnet |
Create a new instance of a WordNet iterator. |
Variable | _api |
the api instance |
Variable | _api |
the type of the api. |
Variable | _log |
logger |
Variable | _version |
The version of the api |
get_senses:
AbstractAPI.get_senses
=
Get the senses of synsets searched by words or by ResourceIDs, satisfying the optional constraints.
get_senses_containing:
AbstractAPI.get_senses_containing
=
Get the senses of synsets containing the word with the given constraints.
get_senses_from:
AbstractAPI.get_senses_from
=
Get the senses of synsets from the word with the given constraints.
get_synset:
AbstractAPI.get_synset
=
Return the synset identified by the ResourceID in input.
Some examples that can be used follow:
import babelnet as bn # Retrieving BabelSynset from a Wikipedia page title: synset = bn.get_synset(WikipediaID('BabelNet', Language.EN, POS.NOUN)) # Retrieving BabelSynset from a WordNet id: synset = bn.get_synset(WordNetSynsetID('wn:03544360n')) # Retrieving BabelSynset from a Wikidata page id: synset = bn.get_synset(WikidataID('Q4837690')) # Retrieving BabelSynset from a OmegaWiki page id: synset = bn.get_synset(OmegaWikiID('1499705'))
get_synsets:
AbstractAPI.get_synsets
=
Get synsets by words or by ResourceIDs, satisfying the optional constraints.