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_senses Get the senses of synsets searched by words or by ResourceIDs, satisfying the optional constraints.
Variable get_senses_containing Get the senses of synsets containing the word with the given constraints.
Variable get_senses_from Get the senses of synsets from the word with the given constraints.
Variable get_synset Return the synset identified by the ResourceID in input.
Variable get_synsets Get synsets by words or by ResourceIDs, satisfying the optional constraints.
Variable iterator Create a new instance of BabelSynset iterator.
Variable lexicon_iterator Create a new instance of a lexicon iterator.
Variable offset_iterator Create a new instance of an offset iterator.
Variable to_synsets Convert from ResourceID to the corresponding BabelSynset.
Variable wordnet_iterator Create a new instance of a WordNet iterator.
Variable _api the api instance
Variable _api_type the type of the api.
Variable _log logger
Variable _version The version of the api
def version():

Undocumented

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.

iterator: AbstractAPI.iterator =

Create a new instance of BabelSynset iterator.

lexicon_iterator: AbstractAPI.lexicon_iterator =

Create a new instance of a lexicon iterator.

offset_iterator: AbstractAPI.offset_iterator =

Create a new instance of an offset iterator.

to_synsets: AbstractAPI.to_synsets =

Convert from ResourceID to the corresponding BabelSynset.

wordnet_iterator: AbstractAPI.wordnet_iterator =

Create a new instance of a WordNet iterator.

_api =

the api instance

_api_type: BabelAPIType =

the type of the api.

_log =

logger

_version =

The version of the api