Class CachedParserComponent
java.lang.Object
edu.tufts.hrilab.diarc.DiarcComponent
edu.tufts.hrilab.slug.parsing.cache.CachedParserComponent
- All Implemented Interfaces:
NLUInterface
-
Field Summary
Fields inherited from class edu.tufts.hrilab.diarc.DiarcComponent
executionLoopCycleTime, log, shouldRunExecutionLoop
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEntryToCache
(Utterance entry) Adds an Utterance entry to the cache database and logs the action.protected List<org.apache.commons.cli.Option>
Command line options available in sub-class.protected void
init()
Perform any component initialization.protected void
parseArgs
(org.apache.commons.cli.CommandLine cmdLine) Called directly after construction to pass runtime values that will override default values.parseUtterance
(Utterance incoming) Parses the incoming Utterance by retrieving its details from the database.Methods inherited from class edu.tufts.hrilab.diarc.DiarcComponent
createInstance, createInstance, createInstance, createInstance, executionLoop, getMyGroupConstraints, getMyGroups, getMyService, getMyServices, main, shutdown, shutdownComponent
-
Constructor Details
-
CachedParserComponent
public CachedParserComponent()
-
-
Method Details
-
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
-
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
-
parseUtterance
Parses the incoming Utterance by retrieving its details from the database.- Specified by:
parseUtterance
in interfaceNLUInterface
- Parameters:
incoming
- The incoming Utterance to parse.- Returns:
- The parsed Utterance with updated semantics and bindings if found in the database; otherwise, returns the incoming Utterance unchanged.
-
addEntryToCache
Adds an Utterance entry to the cache database and logs the action.- Parameters:
entry
- The Utterance object to add to the cache.
-