Class NamedEntity


  • public class NamedEntity
    extends java.lang.Object
    A class that represents a NamedEntity object.
    • Constructor Summary

      Constructors 
      Constructor Description
      NamedEntity​(java.lang.String entity, float score, int index, java.lang.String word, int start, int end)
      Constructs a new instance of NamedEntity.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getEnd()
      Returns the end index of the word in the sentence.
      java.lang.String getEntity()
      Returns the class of the entity.
      int getIndex()
      Returns the position of the entity in the original sentence.
      float getScore()
      Returns the score of the entity.
      int getStart()
      Returns the start index of the word in the sentence.
      java.lang.String getWord()
      Returns the token of the entity.
      java.lang.String toString()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • NamedEntity

        public NamedEntity​(java.lang.String entity,
                           float score,
                           int index,
                           java.lang.String word,
                           int start,
                           int end)
        Constructs a new instance of NamedEntity.
        Parameters:
        entity - the class of the entity
        score - the score of the entity
        index - the position of the entity in the original sentence
        word - the token of the entity
        start - the start index of the word in the sentence
        end - the end index of the word in the sentence
    • Method Detail

      • getEntity

        public java.lang.String getEntity()
        Returns the class of the entity.
        Returns:
        the class of the entity
      • getScore

        public float getScore()
        Returns the score of the entity.
        Returns:
        the score of the entity
      • getIndex

        public int getIndex()
        Returns the position of the entity in the original sentence.
        Returns:
        the position of the entity in the original sentence
      • getWord

        public java.lang.String getWord()
        Returns the token of the entity.
        Returns:
        the token of the entity
      • getStart

        public int getStart()
        Returns the start index of the word in the sentence.
        Returns:
        the start index of the word in the sentence
      • getEnd

        public int getEnd()
        Returns the end index of the word in the sentence.
        Returns:
        the end index of the word in the sentence
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object