demo.inpro.system.greifarm
Class GreifarmActor

java.lang.Object
  extended by inpro.incremental.PushBuffer
      extended by inpro.incremental.IUModule
          extended by demo.inpro.system.greifarm.GreifarmActor
All Implemented Interfaces:
edu.cmu.sphinx.instrumentation.Resetable, edu.cmu.sphinx.util.props.Configurable

public class GreifarmActor
extends IUModule

GreifarmActor is the NLU and action management component for the Greifarm prototype (as the Greifarm prototype is not really a "dialogue system", but rather a speech-controlled application, we avoid the term "dialog manager") This class consists of the following components, which all live in their own subclasses:

GreifarmActor: the incremental processor (PushBuffer) which handles incoming IUs and initiates the corresponding processing. This class handles the global list of performed actions and of the words yet to process, as well as references to the NLU component, the greifarm handling, and the game score. It also provides a global logger.

NLU: processes incoming words and (depending on what has been done before) initiates actions (in the form of ActionIUs)

ActionIU: these IUs are generated, executed and put into the list of performed actions by the NLU.

Greifarm: handles concurrency stuff related to the greifarm GUI (which itself lives in GreifArmGUI

Author:
timo

Nested Class Summary
 
Nested classes/interfaces inherited from class inpro.incremental.IUModule
IUModule.RightBuffer
 
Field Summary
protected  GameScore gameScore
          the little score counter
 GreifarmController greifarmController
          encapsulates greifarmController GUI and exposes only the task-dependent actions
private static org.apache.log4j.Logger logger
           
private  NLU nlu
           
private  java.util.Deque<ActionIU> performedActions
          actions already performed since the last call to processorReset()
private  java.util.Deque<WordIU> unusedWords
          most recent words that are not yet part of an interpretation
 
Fields inherited from class inpro.incremental.IUModule
iulisteners, PROP_HYP_CHANGE_LISTENERS, PROP_LOG_TO_TEDVIEW, PROP_TEDVIEW_LOG_ADDRESS, PROP_TEDVIEW_LOG_PORT, rightBuffer, tedLogAdapter
 
Constructor Summary
GreifarmActor()
           
 
Method Summary
private  void constructGUI()
           
 void gameReset()
           
 void leftBufferUpdate(java.util.Collection<? extends IU> ius, java.util.List<? extends EditMessage<? extends IU>> edits)
          the method that IU modules must implement
 void newProperties(edu.cmu.sphinx.util.props.PropertySheet ps)
           
 void processorReset()
          reset the IU lists, called when the processor should be restarted (unlike reset() which is called from Sphinx after every commit)
 void reset()
           
 
Methods inherited from class inpro.incremental.IUModule
getTime, hypChange, logToTedView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static final org.apache.log4j.Logger logger

gameScore

protected final GameScore gameScore
the little score counter


greifarmController

public final GreifarmController greifarmController
encapsulates greifarmController GUI and exposes only the task-dependent actions


unusedWords

private final java.util.Deque<WordIU> unusedWords
most recent words that are not yet part of an interpretation


performedActions

private final java.util.Deque<ActionIU> performedActions
actions already performed since the last call to processorReset()


nlu

private final NLU nlu
Constructor Detail

GreifarmActor

public GreifarmActor()
Method Detail

leftBufferUpdate

public void leftBufferUpdate(java.util.Collection<? extends IU> ius,
                             java.util.List<? extends EditMessage<? extends IU>> edits)
Description copied from class: IUModule
the method that IU modules must implement

Specified by:
leftBufferUpdate in class IUModule
Parameters:
ius - list of IUs that make up the current hypothesis
edits - a list of edits since the last call

reset

public void reset()
Specified by:
reset in interface edu.cmu.sphinx.instrumentation.Resetable
Overrides:
reset in class PushBuffer

processorReset

public void processorReset()
reset the IU lists, called when the processor should be restarted (unlike reset() which is called from Sphinx after every commit)


gameReset

public void gameReset()

constructGUI

private void constructGUI()

newProperties

public void newProperties(edu.cmu.sphinx.util.props.PropertySheet ps)
                   throws edu.cmu.sphinx.util.props.PropertyException
Specified by:
newProperties in interface edu.cmu.sphinx.util.props.Configurable
Overrides:
newProperties in class IUModule
Throws:
edu.cmu.sphinx.util.props.PropertyException