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.Logger
The set of relevantQueryTerms that have support from Belief.Relevant query terms collected from all rule sets' environmental context constraints.protected String
protected 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>
Command line options available in sub-class.void
applyInputPragmaticMeaning
(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 void
init()
Perform any component initialization.protected List<PragRuleProverSet>
loadPragRules
(String path) protected void
parseArgs
(org.apache.commons.cli.CommandLine cmdLine) Called directly after construction to pass runtime values that will override default values.protected void
protected void
Methods 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: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 classDiarcComponent
-
additionalUsageInfo
Description copied from class:DiarcComponent
Command line options available in sub-class. This should be paired with a parseArgs implementation.- Overrides:
additionalUsageInfo
in classDiarcComponent
- Returns:
-
parseArgs
protected void parseArgs(org.apache.commons.cli.CommandLine cmdLine) Description copied from class:DiarcComponent
Called directly after construction to pass runtime values that will override default values. This should parse all the options that additionalUsageInfo provides.zs- Overrides:
parseArgs
in classDiarcComponent
-
loadPragRules
-
applyPragmaticMeaning
Description copied from interface:PragmaticsInterface
Main 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:
applyPragmaticMeaning
in 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
-