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 the BabelSynsetID that identifies the lemma in BabelNet.
Author:
vannella
See Also:
  • Constructor Details

    • BabelTokenId

      public BabelTokenId(int s, int e, BabelSynsetID id, String word)
      Creates a new instance of a BabelTokenId
      Parameters:
      s - the start position
      e - the end position
      id - the id of the BabelSynset
      word - the word being annotated
  • Method Details

    • 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 this BabelTokenId.
      Returns:
      the word of this BabelTokenId.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(BabelTokenId f)
      Specified by:
      compareTo in interface Comparable<BabelTokenId>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object