Package it.uniroma1.lcl.babelnet
Class WordNetSense
- java.lang.Object
-
- it.uniroma1.lcl.babelnet.BabelSense
-
- it.uniroma1.lcl.babelnet.WordNetSense
-
public class WordNetSense extends BabelSense
A WordNet sense. Provides WordNet-specific methods.- Author:
- navigli
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class it.uniroma1.lcl.babelnet.BabelSense
BabelSense.Builder
-
-
Field Summary
Fields Modifier and Type Field Description protected String
wordNetOffset
The offset of the WordNet sense to which this sense corresponds, if anyprotected Integer
wordNetSenseNumber
The sense number of the WordNet if anyprotected Integer
wordNetSynsetPosition
The position of the WordNet sense to which this sense corresponds,-
Fields inherited from class it.uniroma1.lcl.babelnet.BabelSense
fullLemma, language, lemma, pos, senseKey, simpleLemma, source, synset, synsetID
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
WordNetSense(String lemma, String simpleLemma, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos, String sensekey, BabelSynset synset, String wordNetOffset, Integer wordNetSynsetPosition, Integer wordNetSenseNumber, BabelSenseSource source)
Creates a new instance of aWordNetSense
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Integer
getPosition()
Deprecated.int
getSenseNumber()
Gets the sense number of thisBabelSense
.String
getSenseString()
Gets a String-based representation of thisBabelSense
alternative to the "canonical" one obtained usingBabelSense.toString()
.Optional<String>
getWordNetOffset()
Gets the WordNet offset of the WordNet sense to which thisBabelSense
corresponds, if any.-
Methods inherited from class it.uniroma1.lcl.babelnet.BabelSense
equals, getDBPediaURI, getFrameNetURI, getFrequency, getFullLemma, getGeoNamesURI, getGlosses, getID, getLanguage, getLemma, getLicense, getNormalizedLemma, getPOS, getPronunciations, getSensekey, getSenseTranslationInfo, getSimpleLemma, getSource, getSynset, getSynsetID, getTags, getTags, getVerbNetURI, getYAGOURI, hashCode, isAutomaticTranslation, isKeyConcept, isKeySense, isNotAutomaticTranslation, isTaggedAs, isTaggedAs, isTaggedAs, toString, toURI
-
-
-
-
Field Detail
-
wordNetSenseNumber
protected Integer wordNetSenseNumber
The sense number of the WordNet if any
-
wordNetOffset
protected String wordNetOffset
The offset of the WordNet sense to which this sense corresponds, if any
-
wordNetSynsetPosition
protected Integer wordNetSynsetPosition
The position of the WordNet sense to which this sense corresponds,
-
-
Constructor Detail
-
WordNetSense
protected WordNetSense(String lemma, String simpleLemma, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos, String sensekey, BabelSynset synset, String wordNetOffset, Integer wordNetSynsetPosition, Integer wordNetSenseNumber, BabelSenseSource source)
Creates a new instance of aWordNetSense
- Parameters:
lemma
- the lemma of the senselanguage
- the language of the sensepos
- the part of speech of the sensesensekey
- the sense keysynset
- the synset the sense belongs towordNetOffset
- WordNet synset offsetwordNetSynsetPosition
- position in the synsetwordNetSenseNumber
- sense number in WordNetsource
- the sense source
-
-
Method Detail
-
getWordNetOffset
public Optional<String> getWordNetOffset()
Gets the WordNet offset of the WordNet sense to which thisBabelSense
corresponds, if any.- Overrides:
getWordNetOffset
in classBabelSense
- Returns:
- the offset of the WordNet sense corresponding to this
BabelSense
.
-
getPosition
@Deprecated public Integer getPosition()
Deprecated.Gets the WordNet position of the WordNet sense to which thisBabelSense
corresponds, if any.- Overrides:
getPosition
in classBabelSense
- Returns:
- the position of the WordNet sense corresponding to this
BabelSense
.
-
getSenseNumber
public int getSenseNumber()
Gets the sense number of thisBabelSense
. This corresponds to the sense number found in WordNet, if the sense belongs to WordNet, 0 otherwise.- Overrides:
getSenseNumber
in classBabelSense
- Returns:
- the sense number of this
BabelSense
.
-
getSenseString
public String getSenseString()
Description copied from class:BabelSense
Gets a String-based representation of thisBabelSense
alternative to the "canonical" one obtained usingBabelSense.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 translation- Overrides:
getSenseString
in classBabelSense
- Returns:
- a string representing this
BabelSense
.
-
-