public class BabelSense extends Object implements Sense
BabelNet, contained in a BabelSynset.| Modifier and Type | Class and Description |
|---|---|
static class |
BabelSense.Builder
The Builder of a
BabelSense. |
| Modifier and Type | Field and Description |
|---|---|
protected String |
fullLemma
The full lemma for this sense
|
protected it.uniroma1.lcl.jlt.util.Language |
language
The language of this sense
|
protected com.babelscape.util.POS |
pos
The part-of-speech of this sense
|
protected String |
senseKey
The sensekey of the OmegaWiki, Wikidata, Wiktionary, GeoName, MSTERM or VerbNet sense
to which this sense corresponds, if any
|
protected String |
simpleLemma
The simple lemma for this sense (without parentheses, etc.)
|
protected BabelSenseSource |
source
The source of this lemma: WordNet, Wikipedia, translation, etc.
|
protected BabelSynset |
synset
The synset this sense belongs to
|
protected BabelSynsetID |
synsetID
The synset id this sense belongs to
|
| Modifier | Constructor and Description |
|---|---|
protected |
BabelSense(String lemma,
it.uniroma1.lcl.jlt.util.Language language,
com.babelscape.util.POS pos,
BabelSenseSource source,
String sensekey,
BabelSynset synset)
Creates a new instance of a
BabelSense |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getDBPediaURI()
Deprecated.
|
String |
getFrameNetURI()
Deprecated.
|
Integer |
getFrequency()
Deprecated.
Discontinued
|
String |
getFullLemma()
Gets the full lemma of this
Sense
(which might include annotations, such as labels in Wikipedia page titles). |
String |
getGeoNamesURI()
Deprecated.
|
int |
getID()
Gets the numeric id of the sense.
|
it.uniroma1.lcl.jlt.util.Language |
getLanguage()
Gets the
Language of this Sense |
BabelLicense |
getLicense()
Returns the license for this Babel sense
|
com.babelscape.util.POS |
getPOS()
Gets the part of speech of this
Sense. |
Integer |
getPosition()
Deprecated.
Moved to
WordNetSense |
BabelSensePhonetics |
getPronunciations()
Returns the pronunciations
|
String |
getSensekey()
Gets the sensekey of the WordNet, Omega, Wikidata or Wiktionary sense to which this
BabelSense
corresponds, if any. |
int |
getSenseNumber()
Deprecated.
Moved to
WordNetSense |
String |
getSenseString()
Deprecated.
Please use
getSensekey() |
BabelSenseTranslationInfo |
getSenseTranslationInfo()
Deprecated.
To be removed in the next API release
|
String |
getSimpleLemma()
Gets the simple lemma of this
Sense. |
BabelSenseSource |
getSource()
Gets the
BabelSenseSource of this Sense. |
BabelSynset |
getSynset()
Gets the
BabelSynset this Sense belongs to. |
BabelSynsetID |
getSynsetID()
Returns the id of the
Synset the sense belongs to |
String |
getVerbNetURI()
Deprecated.
|
Optional<String> |
getWordNetOffset()
Deprecated.
Moved to
WordNetSense |
String |
getYAGOURI()
Deprecated.
|
int |
hashCode() |
boolean |
isAutomaticTranslation()
Returns true if the sense is the result of an automatic translation
|
boolean |
isKeyConcept()
Deprecated.
Use
isKeySense instead |
boolean |
isKeySense()
Returns true if it is a key sense
|
boolean |
isNotAutomaticTranslation()
Returns true if the sense is NOT the result of an automatic translation
|
String |
toString() |
Optional<String> |
toURI(ExternalResource resource)
Returns the URI of the sense for a given
ExternalResource |
protected final String fullLemma
protected final String simpleLemma
protected final BabelSenseSource source
protected final String senseKey
protected final it.uniroma1.lcl.jlt.util.Language language
protected final com.babelscape.util.POS pos
protected transient BabelSynset synset
protected final BabelSynsetID synsetID
protected BabelSense(String lemma, it.uniroma1.lcl.jlt.util.Language language, com.babelscape.util.POS pos, BabelSenseSource source, String sensekey, BabelSynset synset)
BabelSenselanguage - the language of the senselemma - the lemma of the sensepos - the part of speech of the sensesource - the source of the sensesensekey - the sense keysynset - the synset the sense belongs topublic int getID()
getSensekey() for a String id of the sense.public boolean isAutomaticTranslation()
public boolean isNotAutomaticTranslation()
@Deprecated public boolean isKeyConcept()
isKeySense insteadpublic boolean isKeySense()
SenseisKeySense in interface Sensepublic String getFullLemma()
SenseSense
(which might include annotations, such as labels in Wikipedia page titles). Use Sense.getSimpleLemma() to retrieve plain lemmas.getFullLemma in interface SenseSense.public String getSimpleLemma()
SenseSense.
This corresponds to the lemma itself, if the lemma comes from WordNet,
or the lemma possibly without sense labels (i.e. parentheses) if it
comes from Wikipedia.getSimpleLemma in interface SenseSense.public com.babelscape.util.POS getPOS()
SenseSense.public BabelSenseSource getSource()
SenseBabelSenseSource of this Sense.getSource in interface SenseBabelSenseSource of this Sense.public it.uniroma1.lcl.jlt.util.Language getLanguage()
SenseLanguage of this SensegetLanguage in interface SenseLanguage of this Sense.public BabelSynset getSynset()
SenseBabelSynset this Sense belongs to.getSynset in interface SenseBabelSynset of this Sense.public String getSensekey()
BabelSense
corresponds, if any.BabelSense.@Deprecated public Optional<String> getWordNetOffset()
WordNetSenseBabelSense
corresponds, if any.BabelSense.@Deprecated public Integer getPosition()
WordNetSenseBabelSense
corresponds, if any.BabelSense.@Deprecated public Integer getFrequency()
BabelSense. This score represents, for a Wikipedia page/redirection,
the number of its incoming links. Otherwise it is null.BabelSense.@Deprecated public BabelSenseTranslationInfo getSenseTranslationInfo()
BabelSense.BabelSense.public BabelSensePhonetics getPronunciations()
BabelSensepublic BabelSynsetID getSynsetID()
SenseSynset the sense belongs togetSynsetID in interface SenseSynset the sense belongs topublic Optional<String> toURI(ExternalResource resource)
SenseExternalResource@Deprecated public String getDBPediaURI()
toURI(ExternalResource)String if no
interlinking is available or possible)@Deprecated public String getYAGOURI()
toURI(ExternalResource)String if no
interlinking is available or possible)@Deprecated public String getGeoNamesURI()
toURI(ExternalResource)String if no
interlinking is available or possible)@Deprecated public String getFrameNetURI()
toURI(ExternalResource)String if no
interlinking is available or possible)@Deprecated public String getVerbNetURI()
toURI(ExternalResource)String if no
interlinking is available or possible)@Deprecated public String getSenseString()
getSensekey()BabelSense alternative to the "canonical" one obtained using
toString(). 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
title (with no prefix) it if corresponds to a Wikipedia sense, otherwise
the lemma if it is a translationBabelSense.@Deprecated public int getSenseNumber()
WordNetSenseBabelSense. This
corresponds to the sense number found in WordNet, if the sense belongs
to WordNet, 0 otherwise.BabelSense.public BabelLicense getLicense()
Copyright © 2016–2018. All rights reserved.