Class SyntaxTools

java.lang.Object
org.episteme.social.linguistics.loaders.tigerxml.tools.SyntaxTools

public class SyntaxTools extends Object
Provides methods that define a number of higher-level linguistic concepts. Included are "subject", and "voice". This class is for static use.
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • SyntaxTools

      public SyntaxTools()
  • Method Details

    • getPreposition

      public String getPreposition(GraphNode pp)
      Returns the preposition of a PP
      Parameters:
      pp - the PP node
      Returns:
      the preposition word
    • generalizePreposition

      public String generalizePreposition(String prep)
      Generalizes a preposition. For example, "am", "ans", and "daran" will all be generalized to "an".
      Parameters:
      prep - the preposition form
      Returns:
      the generalized lemma
    • getPpSignature

      public List<String> getPpSignature(GraphNode node)
      Returns the PP signature of the clause or NP the node belongs to.
    • isNpLikeNode

      public static boolean isNpLikeNode(NT node)
      Defines the term NP as it is commonly understood in terms of TIGER syntax.
    • getLeftmostConstituent

      public GraphNode getLeftmostConstituent(GraphNode verbal_node)
      Returns the leftmost constituent of the Mittelfeld that belongs to the verbal node.
    • getHeadWord

      public String getHeadWord(GraphNode node)
      Returns the head word of the constituent. In case of "an den Kanzler" this would be "Kanzler".
    • isSLikeNode

      public static boolean isSLikeNode(NT node)
      Defines the term S as it is commonly understood in terms of TIGER syntax.
    • isVpLikeNode

      public static boolean isVpLikeNode(NT node)
      Defines the term VP as it is commonly understood in terms of TIGER syntax.
    • getDominatingClausalNode

      public NT getDominatingClausalNode(GraphNode node)
      Returns the nearest dominating clausal node of this GraphNode.
    • getDominatingNominalNode

      public NT getDominatingNominalNode(GraphNode node)
      Returns the nearest dominating nominal node of this GraphNode.
    • occursInNominalContext

      public boolean occursInNominalContext(GraphNode node)
      Returns true if the nearest dominating clausal node is nearer than the nearest dominating nominal node.
    • haveSameArgumentDomain

      public boolean haveSameArgumentDomain(GraphNode verbal_node, GraphNode other_node)
      Returns true if the verbal node has the same argument domain as the other node.
    • hasActiveVoice

      public boolean hasActiveVoice(T verbal_node)
      Returns true if the input node is a full verb node and occurs in an active clause.
    • getSubject

      public GraphNode getSubject(GraphNode node)
      Returns the subject of the sentence the node belongs to.
    • isSubstitutingMarkablePronoun

      protected static boolean isSubstitutingMarkablePronoun(T terminal)
    • isPronoun

      public static boolean isPronoun(T terminal)
    • isAttributiveMarkablePronoun

      protected static boolean isAttributiveMarkablePronoun(T terminal)
    • isNoun

      public static boolean isNoun(T terminal)
    • isApposition

      public static boolean isApposition(GraphNode node)