Package it.uniroma1.lcl.babelnet.data
Class BabelTokenId
- java.lang.Object
-
- it.uniroma1.lcl.babelnet.data.BabelTokenId
-
- All Implemented Interfaces:
Serializable
,Comparable<BabelTokenId>
public class BabelTokenId extends Object implements Comparable<BabelTokenId>, Serializable
Represents the association between the word that appears in a Babel gloss and theBabelSynsetID
that identifies the lemma in BabelNet.- Author:
- vannella
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BabelTokenId(int s, int e, BabelSynsetID id, String word)
Creates a new instance of aBabelTokenId
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(BabelTokenId f)
boolean
equals(Object o)
int
getEnd()
Gets the end index of the tokenBabelSynsetID
getID()
Returns the BabelSynset idint
getStart()
Gets the start index of the tokenString
getWord()
Gets the word of thisBabelTokenId
.int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
BabelTokenId
public BabelTokenId(int s, int e, BabelSynsetID id, String word)
Creates a new instance of aBabelTokenId
- Parameters:
s
- the start positione
- the end positionid
- the id of theBabelSynset
word
- the word being annotated
-
-
Method Detail
-
getID
public BabelSynsetID getID()
Returns the BabelSynset id- Returns:
- the BabelSynsetID
-
getStart
public int getStart()
Gets the start index of the token- Returns:
- the first integer
-
getEnd
public int getEnd()
Gets the end index of the token- Returns:
- the second integer
-
getWord
public String getWord()
Gets the word of thisBabelTokenId
.- Returns:
- the word of this
BabelTokenId
.
-
compareTo
public int compareTo(BabelTokenId f)
- Specified by:
compareTo
in interfaceComparable<BabelTokenId>
-
-