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 BabelLemma |
lemma
The BabelLemma for this sense
|
protected it.uniroma1.lcl.jlt.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,
String simpleLemma,
it.uniroma1.lcl.jlt.util.Language language,
it.uniroma1.lcl.jlt.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.
|
Collection<BabelGloss> |
getGlosses()
Returns the
BabelGloss es associated to this Sense . |
int |
getID()
Gets the numeric id of the sense.
|
it.uniroma1.lcl.jlt.util.Language |
getLanguage()
Gets the
Language of this Sense |
BabelLemma |
getLemma()
Gets the lemma of this
Sense . |
BabelLicense |
getLicense()
Returns the license for this Babel sense
|
String |
getNormalizedLemma()
Gets the normalized lemma of this
Sense . |
it.uniroma1.lcl.jlt.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()
Deprecated.
|
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 |
Collection<Tag> |
getTags()
|
<T extends Tag> |
getTags(Class<T> classTag)
Returns the collection of the given class of this
Taggable . |
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
BabelSense: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
|
boolean |
isTaggedAs(Collection<Tag> tags)
Checks if all the given tags are contained in this
Taggable . |
boolean |
isTaggedAs(Tag... tags)
Checks if all the given tags are contained in this
Taggable . |
boolean |
isTaggedAs(Tag tag)
Checks if the given tag are contained in this
Taggable . |
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 BabelLemma lemma
protected final BabelSenseSource source
protected final String senseKey
protected final it.uniroma1.lcl.jlt.util.Language language
protected final it.uniroma1.lcl.jlt.util.POS pos
protected transient BabelSynset synset
protected final BabelSynsetID synsetID
protected BabelSense(String lemma, String simpleLemma, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos, BabelSenseSource source, String sensekey, BabelSynset synset)
BabelSense
language
- the language of the senselemma
- the lemma of the sensesimpleLemma
- the simple 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()
BabelSense:isKeySense()
insteadpublic boolean isKeySense()
Sense
isKeySense
in interface Sense
public String getFullLemma()
Sense
Sense
(which might include annotations, such as labels in Wikipedia page titles). Use Sense.getNormalizedLemma()
to retrieve
plain lemmas lower case or Sense.getLemma()
.getFullLemma
in interface Sense
Sense
.@Deprecated public String getSimpleLemma()
Sense
Sense
.
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 Sense
Sense
.public String getNormalizedLemma()
Sense
Sense
.
This corresponds to the lower case lemma itself, if the lemma comes from WordNet,
or the lower case lemma possibly without sense labels (i.e. parentheses) if it
comes from Wikipedia.getNormalizedLemma
in interface Sense
Sense
.public BabelLemma getLemma()
Sense
Sense
.public it.uniroma1.lcl.jlt.util.POS getPOS()
Sense
Sense
.public BabelSenseSource getSource()
Sense
BabelSenseSource
of this Sense
.getSource
in interface Sense
BabelSenseSource
of this Sense
.public it.uniroma1.lcl.jlt.util.Language getLanguage()
Sense
Language
of this Sense
getLanguage
in interface Sense
Language
of this Sense
.public BabelSynset getSynset()
Sense
BabelSynset
this Sense
belongs to.getSynset
in interface Sense
BabelSynset
of this Sense
.public String getSensekey()
BabelSense
corresponds, if any.BabelSense
.@Deprecated public Optional<String> getWordNetOffset()
WordNetSense
BabelSense
corresponds, if any.BabelSense
.@Deprecated public Integer getPosition()
WordNetSense
BabelSense
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()
BabelSense
public BabelSynsetID getSynsetID()
Sense
Synset
the sense belongs togetSynsetID
in interface Sense
Synset
the sense belongs topublic Optional<String> toURI(ExternalResource resource)
Sense
ExternalResource
@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()
WordNetSense
BabelSense
. This
corresponds to the sense number found in WordNet, if the sense belongs
to WordNet, 0 otherwise.BabelSense
.public Collection<BabelGloss> getGlosses()
Sense
BabelGloss
es associated to this Sense
.getGlosses
in interface Sense
BabelGloss
es of this Sense
public BabelLicense getLicense()
public Collection<Tag> getTags()
Taggable
public <T extends Tag> Collection<T> getTags(Class<T> classTag)
Taggable
Taggable
.public boolean isTaggedAs(Tag... tags)
Taggable
Taggable
.isTaggedAs
in interface Taggable
tags
- the tags of interestTaggable
, false othwerwisepublic boolean isTaggedAs(Collection<Tag> tags)
Taggable
Taggable
.isTaggedAs
in interface Taggable
tags
- the tags of interestTaggable
, false othwerwisepublic boolean isTaggedAs(Tag tag)
Taggable
Taggable
.isTaggedAs
in interface Taggable
tag
- the tag of interestTaggable
, false othwerwiseCopyright © 2016–2021. All rights reserved.