class documentation
class BabelSynsetID(SynsetID):
Known subclasses: babelnet.resources._InternalBabelSynsetID
A resource identifier with the specified BabelSynset ID. To obtain the corresponding synset, call to_synset().
Method | __init__ |
init method Examples of BabelSynsetID: |
Method | to |
From a lightweight BabelSynsetID, create the corresponding BabelSynset. |
Property | is |
True if the SynsetID is valid, False otherwise |
Property | outgoing |
The edges (BabelSynsetRelations) which connect the current synset. |
Constant | _BABELNET |
The BabelNet ID prefix (int). |
Constant | _BABELNET |
The BabelNet ID prefix (str). |
Constant | _WORDATLAS |
The WordAtlas ID length e.g: wa:tqlms5n |
Constant | _WORDATLAS |
The WordAtlas ID prefix (str). |
Inherited from SynsetID
:
Instance Variable | pos |
the POS |
Property | simple |
The offset without prefix (e.g. `wn:` or `bn:`). |
Inherited from ResourceID
(via SynsetID
):
Method | to |
Convert the ID to a collection of BabelSynsets. |
Instance Variable | id |
ID of a ResourceID. |
Instance Variable | language |
Language of the resource ID, if available. |
Instance Variable | source |
Source of the resource ID. |
Method | __eq__ |
Undocumented |
Method | __hash__ |
Undocumented |
Method | __lt__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | __str__ |
Undocumented |
def __init__(self, id_str):
overrides
babelnet.resources.SynsetID.__init__
overridden in
babelnet.resources._InternalBabelSynsetID
init method Examples of BabelSynsetID:
rid = BabelSynsetID('bn:03083790n')
Parameters | |
idstr | ID of the resource. |
Raises | |
InvalidSynsetIDError | Raise if the ID is invalid. |
def to_synset(self):
From a lightweight BabelSynsetID, create the corresponding BabelSynset.
Returns | |
BabelSynset | The BabelSynset corresponding to this ID. |
overrides
babelnet.resources.SynsetID.is_valid
overridden in
babelnet.resources._InternalBabelSynsetID
True if the SynsetID is valid, False otherwise
Returns | |
bool | True or False |