Package it.uniroma1.lcl.kb
Interface Sense
-
- All Superinterfaces:
Taggable
- All Known Implementing Classes:
BabelSense,WordNetSense
public interface Sense extends Taggable
General interface for a sense for aSynset.- Author:
- navigli
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description StringgetFullLemma()Gets the full lemma of thisSense(which might include annotations, such as labels in Wikipedia page titles).Collection<BabelGloss>getGlosses()Returns theBabelGlosses associated to thisSense.it.uniroma1.lcl.jlt.util.LanguagegetLanguage()Gets theLanguageof thisSenseLemmagetLemma()Gets the lemma of thisSense.StringgetNormalizedLemma()Gets the normalized lemma of thisSense.it.uniroma1.lcl.jlt.util.POSgetPOS()Gets the part of speech of thisSense.StringgetSimpleLemma()Deprecated.SenseSourcegetSource()Gets theBabelSenseSourceof thisSense.BabelSynsetgetSynset()Gets theBabelSynsetthisSensebelongs to.SynsetIDgetSynsetID()Returns the id of theSynsetthe sense belongs tobooleanisKeySense()Returns true if it is a key sensedefault Optional<String>toURI(ExternalResource resource)Returns the URI of the sense for a givenExternalResource-
Methods inherited from interface it.uniroma1.lcl.babelnet.data.Taggable
getTags, getTags, isTaggedAs, isTaggedAs, isTaggedAs
-
-
-
-
Method Detail
-
isKeySense
boolean isKeySense()
Returns true if it is a key sense- Returns:
- true if it is a key sense, false otherwise
-
getFullLemma
String getFullLemma()
Gets the full lemma of thisSense(which might include annotations, such as labels in Wikipedia page titles). UsegetNormalizedLemma()to retrieve plain lemmas lower case orgetLemma().- Returns:
- the lemma of this
Sense.
-
getSimpleLemma
@Deprecated String getSimpleLemma()
Deprecated.Gets the simple lemma of thisSense. 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.- Returns:
- the simple lemma of this
Sense.
-
getNormalizedLemma
String getNormalizedLemma()
Gets the normalized lemma of thisSense. 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.- Returns:
- the normalized lemma of this
Sense.
-
getPOS
it.uniroma1.lcl.jlt.util.POS getPOS()
Gets the part of speech of thisSense.- Returns:
- the part of speech of this
Sense.
-
getSource
SenseSource getSource()
Gets theBabelSenseSourceof thisSense.- Returns:
- the
BabelSenseSourceof thisSense.
-
getLanguage
it.uniroma1.lcl.jlt.util.Language getLanguage()
Gets theLanguageof thisSense- Returns:
- the
Languageof thisSense.
-
getSynset
BabelSynset getSynset()
Gets theBabelSynsetthisSensebelongs to.- Returns:
- the
BabelSynsetof thisSense.
-
getSynsetID
SynsetID getSynsetID()
Returns the id of theSynsetthe sense belongs to- Returns:
- SynsetID the id of the
Synsetthe sense belongs to
-
getGlosses
Collection<BabelGloss> getGlosses()
Returns theBabelGlosses associated to thisSense.- Returns:
- the
BabelGlosses of thisSense
-
toURI
default Optional<String> toURI(ExternalResource resource)
Returns the URI of the sense for a givenExternalResource- Parameters:
resource- the external resource- Returns:
- the URI to the external resource
-
-