class documentation

class BabelPointer(Enum):

View In Hierarchy

Models a semantic pointer in BabelNet. Includes an associative (i.e. semantically unspecified) relation. Notes: At runtime this Enum is expanded with additional values.

Class Method from_name Return the pointer types that match the specified pointer name.
Class Method from_symbol Return the pointer type that matches the specified pointer symbol.
Method __init__ init method
Constant ALSO_SEE Also See from WordNet.
Constant ANTONYM Antonym from WordNet.
Constant ANY_HOLONYM Holonyms from all res.
Constant ANY_HYPERNYM Hypernyms from all res.
Constant ANY_HYPONYM Hyponyms from all res.
Constant ANY_MERONYM Meronyms from all res.
Constant ATTRIBUTE Attribute from WordNet.
Constant CAUSE Cause from WordNet.
Constant DERIVATIONALLY_RELATED Derivationally related form from WordNet.
Constant ENTAILMENT Entailment from WordNet.
Constant GLOSS_DISAMBIGUATED Gloss related form (disambiguated) from WordNet.
Constant GLOSS_MONOSEMOUS Gloss related form (monosemous) from WordNet.
Constant HOLONYM_MEMBER Member holonym from WordNet.
Constant HOLONYM_PART Part holonym from WordNet.
Constant HOLONYM_SUBSTANCE Substance holonym from WordNet.
Constant HYPERNYM Hypernym from WordNet.
Constant HYPERNYM_INSTANCE Instance hypernym from WordNet.
Constant HYPONYM Hyponym from WordNet.
Constant HYPONYM_INSTANCE Instance hyponym from WordNet.
Constant MERONYM_MEMBER Member meronym from WordNet.
Constant MERONYM_PART Part meronym from WordNet.
Constant MERONYM_SUBSTANCE Substance meronym from WordNet.
Constant PARTICIPLE Participle from WordNet.
Constant PERTAINYM Pertainym from WordNet.
Constant REGION Domain of synset - REGION from WordNet.
Constant REGION_MEMBER Member of this domain from WordNet.
Constant SEMANTICALLY_RELATED Wikipedia relations.
Constant SIMILAR_TO Similar To from WordNet.
Constant TOPIC Domain of synset - TOPIC from WordNet.
Constant TOPIC_MEMBER Member of this domain - TOPIC from WordNet.
Constant USAGE Domain of synset - USAGE from WordNet.
Constant USAGE_MEMBER Member of this domain - USAGE from WordNet.
Constant VERB_GROUP Verb Group from WordNet.
Constant WIBI_HYPERNYM Hypernym from Wikipedia Bitaxonomy.
Constant WIBI_HYPONYM Hyponym from Wikipedia Bitaxonomy.
Constant WIKIDATA_HYPERNYM Hypernym from Wikidata.
Constant WIKIDATA_HYPONYM Hyponym from Wikidata.
Constant WIKIDATA_HYPONYM_INSTANCE Hyponym instance from Wikidata.
Constant WIKIDATA_MERONYM Meronym from Wikidata.
Instance Variable is_automatic Is automatic relation (default False).
Instance Variable relation_group Relation group the pointer belongs to (e.g. HYPERNYM).
Instance Variable relation_name Relation name.
Instance Variable short_name Relation short name.
Instance Variable symbol The symbol in BabelNet data files that is used to indicate this pointer type.
Property is_holonym True if the relation is of a holonym kind.
Property is_hypernym True if the relation is of a hypernymy kind.
Property is_hyponymy True if the relation is of a hyponymy kind.
Property is_meronym True if the relation is of a meronym kind.
Method __eq__ Undocumented
Method __hash__ Undocumented
Method __repr__ Undocumented
Method __str__ Undocumented
@classmethod
def from_name(cls, name):

Return the pointer types that match the specified pointer name.

Parameters
name:strThe name string of the relations.
Returns
List[BabelPointer]The BabelPointers corresponding to the given name.
Raises
BabelPointerNotPresentErrorRaised if the name does not correspond to a known pointer.
@classmethod
def from_symbol(cls, symbol):

Return the pointer type that matches the specified pointer symbol.

Parameters
symbol:strThe string representation of the semantic relation.
Returns
BabelPointerThe type of semantic relation.
Raises
BabelPointerNotPresentErrorRaised if the name does not correspond to a known pointer.
def __init__(self, symbol, relation_name, short_name, relation_group=RelationGroup.OTHER, is_automatic=False):

init method

Parameters
symbol:strThe symbol in BabelNet data files that is used to indicate this pointer type.
relation_name:strRelation name.
short_name:strRelation short name.
relation_group:RelationGroupRelation group the pointer belongs to (e.g. HYPERNYM) (default: RelationGroup.OTHER).
is_automatic:boolIs automatic relation (default False).
ALSO_SEE: BabelPointer =

Also See from WordNet.

Value
('^', 'Also See', 'also-see')
ANTONYM: BabelPointer =

Antonym from WordNet.

Value
('!', 'Antonym', 'antonym')
ANY_HOLONYM: BabelPointer =

Holonyms from all res.

Value
('aho', 'Any Holonym', 'has-part', RelationGroup.HOLONYM)
ANY_HYPERNYM: BabelPointer =

Hypernyms from all res.

Value
('ahpe', 'Any Hypernym', 'is-a', RelationGroup.HYPERNYM)
ANY_HYPONYM: BabelPointer =

Hyponyms from all res.

Value
('ahpo', 'Any Hyponym', 'has-kind', RelationGroup.HYPONYM)
ANY_MERONYM: BabelPointer =

Meronyms from all res.

Value
('am', 'Any Meronym', 'part-of', RelationGroup.MERONYM)
ATTRIBUTE: BabelPointer =

Attribute from WordNet.

Value
('=', 'Attribute', 'attrib')
CAUSE: BabelPointer =

Cause from WordNet.

Value
('>', 'Cause', 'cause')
DERIVATIONALLY_RELATED: BabelPointer =

Derivationally related form from WordNet.

Value
('+', 'Derivationally related form', 'deriv')
ENTAILMENT: BabelPointer =

Entailment from WordNet.

Value
('*', 'Entailment', 'entails')
GLOSS_DISAMBIGUATED: BabelPointer =

Gloss related form (disambiguated) from WordNet.

Value
('gdis', 'Gloss related form (disambiguated)', 'gloss-related')
GLOSS_MONOSEMOUS: BabelPointer =

Gloss related form (monosemous) from WordNet.

Value
('gmono', 'Gloss related form (monosemous)', 'gloss-related')
HOLONYM_MEMBER: BabelPointer =

Member holonym from WordNet.

Value
('#m', 'Member holonym', 'has-part', RelationGroup.HOLONYM)
HOLONYM_PART: BabelPointer =

Part holonym from WordNet.

Value
('#p', 'Part holonym', 'has-part', RelationGroup.HOLONYM)
HOLONYM_SUBSTANCE: BabelPointer =

Substance holonym from WordNet.

Value
('#s', 'Substance holonym', 'has-part', RelationGroup.HOLONYM)
HYPERNYM: BabelPointer =

Hypernym from WordNet.

Value
('@', 'Hypernym', 'is-a', RelationGroup.HYPERNYM)
HYPERNYM_INSTANCE: BabelPointer =

Instance hypernym from WordNet.

Value
('@i', 'Instance hypernym', 'is-a', RelationGroup.HYPERNYM)
HYPONYM: BabelPointer =

Hyponym from WordNet.

Value
('~', 'Hyponym', 'has-kind', RelationGroup.HYPONYM)
HYPONYM_INSTANCE: BabelPointer =

Instance hyponym from WordNet.

Value
('~i', 'Instance hyponym', 'has-kind', RelationGroup.HYPONYM)
MERONYM_MEMBER: BabelPointer =

Member meronym from WordNet.

Value
('%m', 'Member meronym', 'part-of', RelationGroup.MERONYM)
MERONYM_PART: BabelPointer =

Part meronym from WordNet.

Value
('%p', 'Part meronym', 'part-of', RelationGroup.MERONYM)
MERONYM_SUBSTANCE: BabelPointer =

Substance meronym from WordNet.

Value
('%s', 'Substance meronym', 'part-of', RelationGroup.MERONYM)
PARTICIPLE: BabelPointer =

Participle from WordNet.

Value
('<', 'Participle', 'participle')
PERTAINYM: BabelPointer =

Pertainym from WordNet.

Value
('\\', 'Pertainym BabelPointer(pertains to nouns)', 'pertains-to')
REGION: BabelPointer =

Domain of synset - REGION from WordNet.

Value
(';r', 'Domain of synset - REGION', 'domain')
REGION_MEMBER: BabelPointer =

Member of this domain from WordNet.

Value
('-r', 'Member of this domain - REGION', 'domain')
SEMANTICALLY_RELATED: BabelPointer =

Wikipedia relations.

Value
('r', 'Semantically related form', 'related')
SIMILAR_TO: BabelPointer =

Similar To from WordNet.

Value
('&', 'Similar To', 'sim')
TOPIC: BabelPointer =

Domain of synset - TOPIC from WordNet.

Value
(';c', 'Domain of synset - TOPIC', 'topic')
TOPIC_MEMBER: BabelPointer =

Member of this domain - TOPIC from WordNet.

Value
('-c', 'Member of this domain - TOPIC', 'topic')
USAGE: BabelPointer =

Domain of synset - USAGE from WordNet.

Value
(';u', 'Domain of synset - USAGE', 'usage')
USAGE_MEMBER: BabelPointer =

Member of this domain - USAGE from WordNet.

Value
('-u', 'Member of this domain - USAGE', 'usage')
VERB_GROUP: BabelPointer =

Verb Group from WordNet.

Value
('$', 'Verb Group', 'verb_group')
WIBI_HYPERNYM: BabelPointer =

Hypernym from Wikipedia Bitaxonomy.

Value
('@w', 'Hypernym', 'is-a', RelationGroup.HYPERNYM, True)
WIBI_HYPONYM: BabelPointer =

Hyponym from Wikipedia Bitaxonomy.

Value
('~@w', 'Hyponym', 'has-kind', RelationGroup.HYPONYM, True)
WIKIDATA_HYPERNYM: BabelPointer =

Hypernym from Wikidata.

Value
('@wd', 'Hypernym', 'is-a', RelationGroup.HYPERNYM)
WIKIDATA_HYPONYM: BabelPointer =

Hyponym from Wikidata.

Value
('~wds', 'Hyponym', 'has-kind', RelationGroup.HYPONYM)
WIKIDATA_HYPONYM_INSTANCE: BabelPointer =

Hyponym instance from Wikidata.

Value
('~wd', 'Hyponym', 'has-kind', RelationGroup.HYPONYM)
WIKIDATA_MERONYM: BabelPointer =

Meronym from Wikidata.

Value
('%wdm', 'Part meronym', 'part-of', RelationGroup.MERONYM)
is_automatic: bool =

Is automatic relation (default False).

relation_group: RelationGroup =

Relation group the pointer belongs to (e.g. HYPERNYM).

relation_name: str =

Relation name.

short_name: str =

Relation short name.

symbol: str =

The symbol in BabelNet data files that is used to indicate this pointer type.

@property
is_holonym: bool =

True if the relation is of a holonym kind.

@property
is_hypernym: bool =

True if the relation is of a hypernymy kind.

@property
is_hyponymy: bool =

True if the relation is of a hyponymy kind.

@property
is_meronym: bool =

True if the relation is of a meronym kind.

def __eq__(self, other):

Undocumented

def __hash__(self):

Undocumented

def __repr__(self):

Undocumented

def __str__(self):

Undocumented