class documentation
class WordNetSense(BabelSense):
A WordNet sense. Provides WordNet-specific methods.
Method | __init__ |
init method |
Instance Variable | position |
The position of the WordNet sense to which this sense corresponds. |
Instance Variable | sense |
The sense number of the WordNet if any. |
Instance Variable | sensekey |
The sensekey of the OmegaWiki, Wikidata, Wiktionary, GeoName, MSTERM or VerbNet sense to which this sense corresponds, if any. |
Instance Variable | wordnet |
The offset of the WordNet sense to which this sense corresponds, if any. |
Property | sense |
A String-based representation of this BabelSense alternative to the "canonical" one obtained using __str__. This corresponds to a diesis-like representation if the sense belongs to WordNet, e.g. 'car#n#1'... |
Inherited from BabelSense
:
Method | synset |
Set the synset the sense belongs to. |
Method | to |
Return the URI of the sense for a given ExternalResource. |
Instance Variable | full |
The full lemma for this sense. |
Instance Variable | id |
The id of the sense in the SQL database. |
Instance Variable | language |
The language of this sense. |
Instance Variable | normalized |
The normalized lemma for this sense (lowercase, without parentheses, etc.). |
Instance Variable | pos |
The part-of-speech of this sense. |
Instance Variable | pronunciations |
The set of the audio pronunciations. |
Instance Variable | source |
The source of this lemma: WordNet, Wikipedia, translation, etc. |
Instance Variable | synset |
The synset id this sense belongs to. |
Property | is |
True if the sense is the result of an automatic translation. |
Property | is |
True if it is a key sense. |
Property | is |
Returns True if the sense is NOT the result of an automatic translation. |
Property | lemma |
Get the lemma of this BabelSense |
Property | license |
The license for this Babel sense. |
Property | synset |
The synset the sense belongs to. |
Method | __eq__ |
Undocumented |
Method | __hash__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | __str__ |
Undocumented |
Method | _get |
Get a link to the corresponding DBPedia URI (None if no interlinking is available or possible). |
Method | _get |
Get a link to the corresponding GeoNames URI (None if no interlinking is available or possible). |
Method | _get |
Get a link to the corresponding YAGO URI (None if no interlinking is available or possible). |
Constant | _DBPEDIA |
The prefix of DBPedia URIs. |
Constant | _YAGO |
The prefix of YAGO3 URIs. |
Instance Variable | _key |
The sensekey of the OmegaWiki, Wikidata, Wiktionary, GeoName, MSTERM or VerbNet sense to which this sense corresponds, if any. |
Instance Variable | _lemma |
the lemma |
Instance Variable | _synset |
The synset this sense belongs to. |
Instance Variable | _yago |
the yago url |
def __init__(self, lemma, language, pos, source, sensekey, synset, *, wordnet_offset=None, wordnet_synset_position=None, wordnet_sense_number=None, **kwargs):
overrides
babelnet.sense.BabelSense.__init__
init method
Parameters | |
lemma:str | The full lemma for this sense. |
language:Language | The language of this sense. |
pos:POS | The part-of-speech of this sense. |
source:BabelSenseSource | The source of this lemma: WordNet, Wikipedia, translation, etc. |
sensekey:str | The sensekey of the OmegaWiki, Wikidata, Wiktionary, GeoName, MSTERM or VerbNet sense to which this sense corresponds, if any. |
synset:BabelSynset | The synset this sense belongs to. |
wordnetOptional[str] | The offset of the WordNet sense to which this sense corresponds, if any (default None). |
wordnetOptional[int] | The position of the WordNet sense to which this sense corresponds (default None). |
wordnetOptional[int] | The sense number of the WordNet if any (default None). |
**kwargs | Optional parameters of BabelSense. |
sensekey =
overrides
babelnet.sense.BabelSense.sensekey
The sensekey of the OmegaWiki, Wikidata, Wiktionary, GeoName, MSTERM or VerbNet sense to which this sense corresponds, if any.
overrides
babelnet.sense.BabelSense.sense_str
A String-based representation of this BabelSense alternative to the "canonical" one obtained using __str__. This corresponds to a diesis-like representation if the sense belongs to WordNet, e.g. 'car#n#1' or 'funk#n#3', or the page otherwise the lemma.
Returns | |
bool | A string that represents this BabelSense |