class documentation

class _OfflineBabelSynset(BabelSynset):

View In Hierarchy

Offline implementation of a BabelSynset.

Parameters
synset_idThe BabelSynsetID of the synset to build.
wn_offsetsThe WordNet synset IDs.
sensesThe synset's senses.
translation_mappingsThe mappings for translations.
imagesA list of images for the synset.
categoriesA list of categories for the synset.
synset_typeThe type of synset.
domainsThe domain information for the synset.
ids_by_licenseThe list of InternalBabelSynsetIDs that make up the synset.
target_langsThe languages to be retrieved.
key_conceptTrue if the synset is a key concept.
translations_indexThe translations index.
Method __init__ init method
Property images The images (BabelImages) of this BabelSynset.
Property synset_degree The synset degree associated with this synset.
Property translations All translations between senses found in this BabelSynset.
Method _get_examples Get the examples of the synset
Method _get_glosses Get the glosses of the synset
Method _load load method
Instance Variable _categories Undocumented
Instance Variable _domains Undocumented
Instance Variable _examples Undocumented
Instance Variable _glosses Undocumented
Instance Variable _ids_by_license Undocumented
Instance Variable _images Undocumented
Instance Variable _key_concept Undocumented
Instance Variable _loaded Undocumented
Instance Variable _senses Undocumented
Instance Variable _tags Undocumented
Instance Variable _translation_mappings Undocumented
Instance Variable _translations_index Undocumented
Instance Variable _type Undocumented
Instance Variable _wn_offsets Undocumented

Inherited from BabelSynset:

Method categories Get the categories (BabelCategory) of this BabelSynset in the specified languages (if not specified, return all categories).
Method examples Collect all Examples for this Synset.
Method get_string_tags The tags of this synset as string
Method glosses Collect all Glosses for this Synset.
Method lemmas Return the lemmas in this BabelSynset sorted by relevance and type.
Method main_example Get the main Example for this Synset.
Method main_gloss Get the main Gloss in the given language, if any.
Method main_sense Get the main BabelSense by importance of this BabelSynset.
Method main_sense_preferably_in Get the main BabelSense by importance of this BabelSynset, preferrably in the given language.
Method main_senses Collect distinct BabelSenses sorted by importance to this BabelSynset for a given language.
Method outgoing_edges Collect all Synset edges incident on this Synset.
Method retain_senses Retain all the senses which pass the predicate tests.
Method senses Get the senses contained in this Synset.
Method senses_by_word Gets the Senses for the input word in the given language.
Method to_str Return the string representation of the BabelSenses of this BabelSynset only for a specific set of languages.
Method to_uris Return the URIs of the various senses in the given languages in the synset for a given ExternalResource.
Method wordnet_offset_map_from Obtain a map from WordNetSynsetID of the input WordNetVersion to the current version of WordNet (3.0 as of 2016).
Method wordnet_offset_map_to Obtain a map from the current version of WordNet (3.0 as of 2016) to WordNetSynsetIDs of the input WordNetVersion.
Instance Variable id The id of the synset.
Property domains The BabelDomains of this BabelSynset.
Property frame_id Return the FrameID associated with this synset.
Property is_key_concept True if the synset is a key concept.
Property languages The set of languages used in this Synset.
Property main_image The best image (BabelImage) of this BabelSynset.
Property pos The part of speech of this Synset.
Property qcode_ids The qcode identifier associated with this synset.
Property sense_sources The list of sense sources contained in the synset.
Property tags The tags of this synset
Property type The kind of synset.
Property wordnet_offsets The WordNet offsets (version 3.0) whose corresponding synsets this BabelSynset covers, if any.
Method __eq__ Undocumented
Method __hash__ Undocumented
Method __iter__ Undocumented
Method __len__ Undocumented
Method __repr__ Undocumented
Method __str__ Undocumented
Method _valid_degree The synset degree associated with this synset, or the number of outgoing edges if the synset degree is not available.
Instance Variable _contained_sense_sources true if contains the sense source
Instance Variable _edges the edges
Instance Variable _frame_id the frame id
Instance Variable _is_loaded true if the synset is loaded, false otherwise
Instance Variable _main_image the main image
Instance Variable _main_senses the main sense
Instance Variable _qcode_ids the qcode ids
Instance Variable _synset_degree the synset degree
Instance Variable _target_langs target_langs
Instance Variable _translations the translations
def __init__(self, synset_id, wn_offsets, senses, translation_mappings, images, categories, synset_type, domains, ids_by_license, target_langs, key_concept, translations_index, string_tags=None, sense_tags=None):

init method

Parameters
synset_id:BabelSynsetIDThe BabelSynsetID of the synset to build.
wn_offsets:List[WordNetSynsetID]The WordNet synset IDs.
senses:List[BabelSense]The synset's senses.
translation_mappings:List[str]The mappings for translations.
images:List[BabelImage]A list of images for the synset.
categories:List[BabelCategory]A list of categories for the synset.
synset_type:SynsetTypeThe type of synset.
domains:Dict[BabelDomain, float]The domain information for the synset.
ids_by_license:ListThe list of InternalBabelSynsetIDs that make up the synset.
target_langs:Set[Language]The languages to be retrieved.
key_concept:boolTrue if the synset is a key concept.
translations_index:Dict[int, BabelSense]The translations index.
string_tags:Optional[Sequence[StringTag]]A list of StringTag
sense_tags:Optional[Sequence[Tag]]A list of tags
@property
images =

The images (BabelImages) of this BabelSynset.

Returns
List[BabelImage]All the images of the Synset.
@property
synset_degree: int =

The synset degree associated with this synset.

Returns
intthe synset degree of this synset
@property
translations =

All translations between senses found in this BabelSynset.

Returns
Dict[BabelSense, Set[BabelSense]]A dict from BabelSense to his translation.
def _get_examples(self):

Get the examples of the synset

def _get_glosses(self):

Get the glosses of the synset

def _load(self):

load method

_categories =

Undocumented

_domains =

Undocumented

_examples =

Undocumented

_glosses =

Undocumented

_ids_by_license =

Undocumented

_images =

Undocumented

_key_concept =
_loaded: bool =

Undocumented

_senses =

Undocumented

_tags: dict =

Undocumented

_translation_mappings =

Undocumented

_translations_index =

Undocumented

_type =

Undocumented

_wn_offsets =