Class CachedUtterance

java.lang.Object
edu.tufts.hrilab.slug.cache.CachedUtterance
Direct Known Subclasses:
ReverseCachedUtterance

public class CachedUtterance extends Object
  • Field Details

    • log

      protected static org.slf4j.Logger log
    • type

      protected String type
    • words

      protected List<String> words
    • semantics

      protected String semantics
    • indirectSemantics

      protected List<String> indirectSemantics
    • supplementalSemantics

      protected List<String> supplementalSemantics
    • bindings

      protected List<Map<String,String>> bindings
    • tierAssignments

      protected Map<String,String> tierAssignments
  • Constructor Details

  • Method Details

    • getType

      public UtteranceType getType()
      Retrieves the UtteranceType based on the stored String value.
      Returns:
      The UtteranceType corresponding to the stored type value.
    • getSemantics

      public Predicate getSemantics()
      Retrieves the Predicate representing semantics.
      Returns:
      The Predicate representing semantics.
    • getIndirectSemantics

      public List<Term> getIndirectSemantics()
      Retrieves a list of Terms representing indirect semantics.
      Returns:
      A list of Terms representing indirect semantics.
    • getSupplementalSemantics

      public List<Term> getSupplementalSemantics()
    • getTierAssignments

      public Map<Variable,Symbol> getTierAssignments()
    • getBindings

      public List<Map<Variable,Symbol>> getBindings()
      Retrieves a list of bindings represented as maps of Variable to Symbol.
      Returns:
      A list of bindings represented as maps of Variable to Symbol.
    • toJSON

      public String toJSON()
      Converts the object to its JSON representation.
      Returns:
      The JSON representation of the object.
    • fromJSON

      public static CachedUtterance fromJSON(String json)
      Constructs a CachedUtterance object from its JSON representation.
      Parameters:
      json - The JSON string representing the CachedUtterance object.
      Returns:
      The CachedUtterance object constructed from the JSON representation.