Class SemanticRule

java.lang.Object
edu.tufts.hrilab.slug.parsing.tldl.parse.SemanticRule
All Implemented Interfaces:
Cloneable

public class SemanticRule extends Object implements Cloneable
  • Constructor Details

    • SemanticRule

      public SemanticRule(String definition)
  • Method Details

    • clone

      Overrides:
      clone in class Object
      Throws:
      CloneNotSupportedException
    • getBodyArgs

      @Deprecated public int getBodyArgs()
      Deprecated.
    • generateHardcodedSemanticRule

      public static SemanticRule generateHardcodedSemanticRule(String body)
    • generateLiteralSemanticRule

      public static SemanticRule generateLiteralSemanticRule(String body, String semanticType)
    • apply

      public SemanticRule apply(SemanticRule arg)
    • getSemantics

      public String getSemantics()
    • getDefinition

      public String getDefinition()
    • getDIARCSemantics

      public org.apache.commons.lang3.tuple.Pair<List<Symbol>,Map<Variable,Symbol>> getDIARCSemantics()
      Generate semantic form that is actually used by the rest of the system This is pretty messy, because the semantics we use are pretty messy...
      Returns:
      Returns list of Symbols whose first entry is in the form of the semantics field of an Utterance, and the remaining members of the list are in the form of the supplementalSemantics field of an Utterance as well as a map of Variables to GH tiers which are put into the tierAssignments field of an Utterance basically this recursively traverses the parse tree and gets the values of the lambda expressions, but because of how we handle semantics there is a lot of condition checking...
    • isComplete

      public boolean isComplete()
    • toString

      public String toString()
      Overrides:
      toString in class Object