Class HybridNLGComponent

java.lang.Object
edu.tufts.hrilab.diarc.DiarcComponent
edu.tufts.hrilab.slug.nlg.hybrid.HybridNLGComponent
Direct Known Subclasses:
AvaHybridNLGComponent

public class HybridNLGComponent extends DiarcComponent
  • Constructor Details

    • HybridNLGComponent

      public HybridNLGComponent()
  • Method Details

    • additionalUsageInfo

      protected List<org.apache.commons.cli.Option> additionalUsageInfo()
      Description copied from class: DiarcComponent
      Override this method to define command line options available in sub-class. This should be paired with a parseArgs implementation.
      Overrides:
      additionalUsageInfo in class DiarcComponent
      Returns:
    • parseArgs

      protected void parseArgs(org.apache.commons.cli.CommandLine cmdLine)
      Description copied from class: DiarcComponent
      Override this method to parse command line args in the sub-class. Called directly after construction to pass runtime values that will override default values. This should parse all the options that additionalUsageInfo provides.
      Overrides:
      parseArgs in class DiarcComponent
    • init

      public 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
    • convertSemanticsToText

      public Utterance convertSemanticsToText(Utterance incoming)
    • convertSemanticsToTextForNonLLMResult

      public Utterance convertSemanticsToTextForNonLLMResult(Utterance incoming, boolean callStreaming)
    • getLLMNLGResult

      public Utterance getLLMNLGResult(Utterance incoming, boolean callStreaming)
    • cacheNLGOutput

      public void cacheNLGOutput(Utterance utterance)
    • 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
    • getCacheNLG

      public CachedNLGComponent getCacheNLG()
    • setHybridNLGRestrictedMode

      public void setHybridNLGRestrictedMode(boolean enabled)
    • getHybridParserRestrictedMode

      public boolean getHybridParserRestrictedMode()
    • executionLoop

      protected void executionLoop()
      Description copied from class: DiarcComponent
      This is where any code that needs to be called repeatedly in a dedicated thread should live. It is not called by default and you must set shouldRunExecutionLoop to true in your constructor.
      Overrides:
      executionLoop in class DiarcComponent
    • removeDeletedActionNLGCacheEntries

      public void removeDeletedActionNLGCacheEntries(ActionDBEntry entry)