Class ReferenceResolutionComponent

java.lang.Object
edu.tufts.hrilab.diarc.DiarcComponent
edu.tufts.hrilab.slug.refResolution.ReferenceResolutionComponent

public class ReferenceResolutionComponent extends DiarcComponent
  • Field Details

    • log

      protected final org.slf4j.Logger log
  • Constructor Details

    • ReferenceResolutionComponent

      public ReferenceResolutionComponent()
  • Method Details

    • init

      protected void init()
      Description copied from class: DiarcComponent
      Perform any component initialization. This should not be used for setting local fields to default values as was the case in DIARC. This method is called after the constructor, and after parseArgs. Setting default values should be done in field declaration or in the constructor.
      Overrides:
      init in class DiarcComponent
    • shutdownComponent

      protected void shutdownComponent()
      Description copied from class: DiarcComponent
      Any component that needs particular shutdown logic needs to override this method and
      Overrides:
      shutdownComponent in class DiarcComponent
    • newConsultantCallback

      public void newConsultantCallback(ai.thinkingrobots.trade.TRADEServiceInfo tsi)
      Calls down to the resolver to update information about consultants after a new consultant is added. Additionally, registers for notifications from consultants for when new properties are added to the consultant.
      Parameters:
      tsi - TRADEServiceInfo provided by caller.
    • updateResolverPropertiesHandled

      public void updateResolverPropertiesHandled()
      Callback for a new property being added to a consultant.
    • resolveReferences

      public Utterance resolveReferences(Utterance utterance)
      Attempts to resolve references in the Utterance.
      Returns:
      returns Utterance with resolved reference (can still contain unresolved references)
    • generateRE

      public Map<Symbol,List<Term>> generateRE(Symbol ref)
      generate referring expression (list of descriptor bindings) for a given ref_id
      Parameters:
      ref - reference to get bindings for
      Returns:
      map of descriptor bindings for use in NLG
    • getProperties

      public List<Term> getProperties(Symbol ref)
    • getEntityForReference

      public <E> E getEntityForReference(Symbol ref, Class<E> entityJavaType)
    • getEntityForReference

      public <E> E getEntityForReference(Symbol ref, Class<E> entityJavaType, List<Term> constraints)
    • updateFOC

      public void updateFOC(Symbol r)
    • assertProperties

      public boolean assertProperties(Symbol ref, List<Term> properties)
    • positReference

      public Symbol positReference(List<Term> properties)
      Posits a hypothetical reference that has all the properties in properties.
      Parameters:
      properties - list of properties for hypothetical reference
      Returns:
      the posited reference
    • positReference

      public Symbol positReference(Symbol actor, Term propertiesList)
      Posits a hypothetical reference that has all of the properties in properties. This is a convince method so that it can easily be called during action learning.
      Parameters:
      propertiesList - wrapper predicate whose args are a list of properties used to posit the reference
      Returns:
      true if there is a consultant that can handle all of the members of properties
    • observeProperties

      public List<Map<Variable,Symbol>> observeProperties(Symbol actor, Term query)