Package edu.tufts.hrilab.slug.pragmatics
Class PragmaticsComponent
java.lang.Object
edu.tufts.hrilab.diarc.DiarcComponent
edu.tufts.hrilab.slug.pragmatics.PragmaticsComponent
- All Implemented Interfaces:
PragmaticsInterface
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe dialogue history from DialogueComponent.protected List<PragRuleProverSet>protected final org.slf4j.LoggerThe set of relevantQueryTerms that have support from Belief.Relevant query terms collected from all rule sets' environmental context constraints.protected Stringprotected List<PragRuleProverSet>Fields inherited from class edu.tufts.hrilab.diarc.DiarcComponent
executionLoopCycleTime, shouldRunExecutionLoop -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<org.apache.commons.cli.Option>Override this method to define command line options available in sub-class.voidapplyInputPragmaticMeaning(Utterance utterance) applyPragmaticMeaning(Utterance utterance) Main entry point for applying pragmatic meaning to both input and output utterances.getMeaningsInSet(PragRuleProverSet prs, Utterance utt, Set<Term> relevantBeliefs, List<Utterance> dialogHistory) getPragmaticMeanings(Utterance u, List<PragRuleProverSet> sets) getRecursedMeanings(Utterance u, List<PragRuleProverSet> sets) protected voidinit()Perform any component initialization.protected List<PragRuleProverSet>loadPragRules(String path) protected voidparseArgs(org.apache.commons.cli.CommandLine cmdLine) Override this method to parse command line args in the sub-class.protected voidprotected voidMethods inherited from class edu.tufts.hrilab.diarc.DiarcComponent
createInstance, createInstance, createInstance, createInstance, executionLoop, getMyGroupConstraints, getMyGroups, getMyService, getMyServices, main, shutdown, shutdownComponent
-
Field Details
-
log
protected final org.slf4j.Logger log -
ruleSets
-
genRuleSets
-
relevantQueryTerms
Relevant query terms collected from all rule sets' environmental context constraints. These only change if the rule sets change. -
relevantBeliefs
The set of relevantQueryTerms that have support from Belief. This is updated during each call to pragmatics from an outside component to reflect the latest state of Belief. -
dialogHistory
The dialogue history from DialogueComponent. This is updated during each call to pragmatics from an outside component to reflect the latest state of Dialogue. -
pragRulesFiles
-
genRulesFiles
-
resourceConfigPath
-
-
Constructor Details
-
PragmaticsComponent
public PragmaticsComponent()
-
-
Method Details
-
init
protected void init()Description copied from class:DiarcComponentPerform 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:
initin classDiarcComponent
-
additionalUsageInfo
Description copied from class:DiarcComponentOverride this method to define command line options available in sub-class. This should be paired with a parseArgs implementation.- Overrides:
additionalUsageInfoin classDiarcComponent- Returns:
-
parseArgs
protected void parseArgs(org.apache.commons.cli.CommandLine cmdLine) Description copied from class:DiarcComponentOverride 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:
parseArgsin classDiarcComponent
-
loadPragRules
-
applyPragmaticMeaning
Description copied from interface:PragmaticsInterfaceMain entry point for applying pragmatic meaning to both input and output utterances. The rules applied (input prag rules vs prag gen rules) are determined by the information contained in the Utterance instance. INPUT: takes in an Utterance from a parser, perform pragmatic inference on it, and returns the results. OUTPUT: takes in an Utterance from dialogue, perform pragmatic inference on it, and returns the results.- Specified by:
applyPragmaticMeaningin interfacePragmaticsInterface- Parameters:
utterance- utterance whose semantics will undergo pragmatic inference- Returns:
- utterance with pragmatics applies
-
applyInputPragmaticMeaning
-
updateRelevantBeliefs
protected void updateRelevantBeliefs() -
getMeaningsInSet
-
updateRelevantBeliefsAndDialogueHistory
protected void updateRelevantBeliefsAndDialogueHistory() -
bindMeanings
-
getPragmaticMeanings
-
getPragmaticMeanings
-
getRecursedMeanings
-