Class T

java.lang.Object
org.episteme.social.linguistics.loaders.tigerxml.GraphNode
org.episteme.social.linguistics.loaders.tigerxml.T
All Implemented Interfaces:
Serializable, Identified<Identification>

public class T extends GraphNode
Represents a terminal node in a syntax tree. *
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Constructor Details

    • T

      public T()
      Creates a new T object.
    • T

      public T(Element tElement, Sentence sent, int posIndex)
      Creates a new T object.
      Parameters:
      tElement - The DOM element
      sent - The parent sentence
      posIndex - The position index in the sentence
    • T

      public T(Element tElement, Sentence sent, int posIndex, int verbosity)
      Creates a new T object with verbosity.
  • Method Details

    • isTerminal

      public boolean isTerminal()
      Specified by:
      isTerminal in class GraphNode
    • getText

      public String getText()
      Specified by:
      getText in class GraphNode
    • buildTreeString

      protected void buildTreeString(int depth, StringBuilder sb)
      Specified by:
      buildTreeString in class GraphNode
    • getLemma

      public String getLemma()
      Gets the lemma.
      Returns:
      the lemma
    • setLemma

      public void setLemma(String lemma)
      Sets the lemma.
      Parameters:
      lemma - the new lemma
    • getPos

      public String getPos()
      Gets the POS tag.
      Returns:
      the POS tag
    • setPos

      public void setPos(String newpos)
      Sets the POS tag.
      Parameters:
      newpos - the new POS tag
    • getMorph

      public String getMorph()
      Gets the morphology.
      Returns:
      the morphology
    • setMorph

      public void setMorph(String newmorph)
      Sets the morphology.
      Parameters:
      newmorph - the new morphology
    • getWord

      public String getWord()
      Returns the String of this Terminal.
      Returns:
      The String representation of this Terminal.
    • setWord

      public void setWord(String newWord)
      Sets the surface word.
      Parameters:
      newWord - the new word
    • setPosition

      public void setPosition(int position)
      Sets the position of this terminal in the sentence.
      Parameters:
      position - the new position
    • getPosition

      public int getPosition()
      Gets the position of this terminal.
      Returns:
      the position
    • print2XML

      protected void print2XML(FileWriter out_xml)
      Prints this terminal node to an XML file.
      Parameters:
      out_xml - the file writer