Package edu.fiu.jtlex

Class Term

java.lang.Object
edu.fiu.jtlex.Term
All Implemented Interfaces:
IANode, ITerm

public class Term extends Object implements ITerm
Author:
jjime178 The default implementation of ITerm. added tense added aspect
  • Constructor Details

    • Term

      public Term​(int id, String lemma, String frameSet, String text, String sentenceId, int begin, int end, ITerm.PartOfSpeech pos, String elementId, String timexText, ITerm.NamedEntity namedEntity, String normalizedNER, ITimex.TimexType timexType, String tid, ITerm.ATense tense, IInstance.Aspect aspect)
      Creates a new Term with the specified information.
      Parameters:
      id - id of the Term, generated as unique identity for the node within the graph; may not be negative
      lemma - head of the main term in the noun phrase; may not be null
      frameSet - lemma and sense of lemma (Can be seen in WordNet); optional
      text - the textual content of the node; may not be null
      sentenceId - id of sentence; optional
      begin - words first character position within text; may not be negative
      end - words last character position within text; needs to be greater than begin and not negative
      pos - part of speech tag attached to text; may not be null
      elementId - id of the element (verbs, nouns, clauses, sentences); may not be null
      timexText - text of the timex; optional
      namedEntity - the Stanford CoreNLP Entity Tag associated with the Term; optional
      normalizedNER - normalized text after passed through NER (Named-Entity-Recognizer) annotater; optional
      timexType - the type of the timex; optional
      tid - id of the timex; optional
      tense - tense of the phrase
      aspect - represents the aspect of the phrase
  • Method Details

    • getId

      public int getId()
      Description copied from interface: ITerm
      Each term has to be identified by a unique ID number. This value is not optional. Returns the id of the term.
      Specified by:
      getId in interface IANode
      Specified by:
      getId in interface ITerm
      Returns:
      id integer may not be negative
    • getLemma

      public String getLemma()
      Description copied from interface: ITerm
      Each head of the main term in the noun phrase. Returns the main term as a string.
      Specified by:
      getLemma in interface ITerm
      Returns:
      lemma string may not be null
    • getFrameSet

      public String getFrameSet()
      Description copied from interface: ITerm
      Composed of the lemma and the sense associated with it (Can check Wordnet). Returns the lemma and sense seperated by a '.'.
      Specified by:
      getFrameSet in interface ITerm
      Returns:
      frameSet string may not be null
    • getText

      public String getText()
      Description copied from interface: ITerm
      Text being referred to by term. Returns the text.
      Specified by:
      getText in interface IANode
      Specified by:
      getText in interface ITerm
      Returns:
      text string may not be null
    • getSentenceId

      public String getSentenceId()
      Description copied from interface: ITerm
      ID of sentence attached to term. Returns the id of the sentence.
      Specified by:
      getSentenceId in interface ITerm
      Returns:
      sentenceID integer may not be negative
    • getBegin

      public int getBegin()
      Description copied from interface: ITerm
      Word�s first character position within text. Returns the integer position of first character.
      Specified by:
      getBegin in interface IANode
      Specified by:
      getBegin in interface ITerm
      Returns:
      begin integer may not be negative
    • getEnd

      public int getEnd()
      Description copied from interface: ITerm
      Term's last character position within text. Returns the integer position of last character.
      Specified by:
      getEnd in interface IANode
      Specified by:
      getEnd in interface ITerm
      Returns:
      end integer may not be negative
    • getPos

      public ITerm.PartOfSpeech getPos()
      Description copied from interface: ITerm
      Term's pos tagging. Returns the pos tag associated.
      Specified by:
      getPos in interface ITerm
      Returns:
      pos String may not be null
    • getElementId

      public String getElementId()
      Description copied from interface: ITerm
      Contains id of element (Can be verbs, nouns, clauses, sentences). Returns the id of element.
      Specified by:
      getElementId in interface ITerm
      Returns:
      elementId integer may not be negative
    • getTimexText

      public String getTimexText()
      Description copied from interface: ITerm
      Each timex has text associated with it. Returns the text tied to the timex.
      Specified by:
      getTimexText in interface ITerm
      Returns:
      timexText string may not be null
    • getNamedEntity

      public ITerm.NamedEntity getNamedEntity()
      Description copied from interface: ITerm
      Marks the Term as an Entity type. Returns the type to which the term belongs.
      Specified by:
      getNamedEntity in interface ITerm
      Returns:
      NamedEntity enum may not be null.
    • getNormalizedNER

      public String getNormalizedNER()
      Description copied from interface: ITerm
      Normalized text after NER annotation. Returns the NER annotated text.
      Specified by:
      getNormalizedNER in interface ITerm
      Returns:
      normalizedNER string may not be null
    • getTimexType

      public ITimex.TimexType getTimexType()
      Description copied from interface: ITerm
      TimexType of term. Returns the timex type to which the object belongs.
      Specified by:
      getTimexType in interface ITerm
      Returns:
      TimexType enum may not be null.
    • getTid

      public String getTid()
      Description copied from interface: ITerm
      Each timex has to be identified by a unique ID number. This value is not optional. Returns the string part of the timexId.
      Specified by:
      getTid in interface ITerm
      Returns:
      timexId string may not be null
    • getTense

      public ITerm.ATense getTense()
      Description copied from interface: ITerm
      Grammatical Tense of the Term. This value is optional.
      Specified by:
      getTense in interface ITerm
      Returns:
      ATense enum
    • getAspect

      public IInstance.Aspect getAspect()
      Description copied from interface: ITerm
      Represents the aspect of an event instance phrase.
      Specified by:
      getAspect in interface ITerm
      Returns:
      Aspect enum