inpro.incremental
Class IUModule
java.lang.Object
inpro.incremental.PushBuffer
inpro.incremental.IUModule
- All Implemented Interfaces:
- edu.cmu.sphinx.instrumentation.Resetable, edu.cmu.sphinx.util.props.Configurable
- Direct Known Subclasses:
- AbstractDialogueManager, AbstractFloorTracker, AudioActionManager, CompletionHypothesisListener, GreifarmActor, RMRSComposer, SynthesisModule, Tagger, TagParser, TEDviewNotifier, TurnCompleter
public abstract class IUModule
- extends PushBuffer
Abstract class of an incremental module in InproTk.
Implementing modules should implement leftBufferUpdate() and,
from within this method, use one of the rightBuffer.setBuffer() methods
to set their output after this processing increment.
- Author:
- timo
Nested Class Summary |
protected class |
IUModule.RightBuffer
Encapsulates the module's output in two representations. |
Method Summary |
int |
getTime()
|
void |
hypChange(java.util.Collection<? extends IU> ius,
java.util.List<? extends EditMessage<? extends IU>> edits)
this should receive a list of current IUs and
a list of edit messages since the last call to hypChange |
protected abstract void |
leftBufferUpdate(java.util.Collection<? extends IU> ius,
java.util.List<? extends EditMessage<? extends IU>> edits)
the method that IU modules must implement |
void |
logToTedView(java.lang.String message)
|
void |
newProperties(edu.cmu.sphinx.util.props.PropertySheet ps)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROP_HYP_CHANGE_LISTENERS
@S4ComponentList(type=PushBuffer.class)
public static final java.lang.String PROP_HYP_CHANGE_LISTENERS
- See Also:
- Constant Field Values
iulisteners
protected java.util.List<PushBuffer> iulisteners
PROP_TEDVIEW_LOG_PORT
@S4Integer(defaultValue=2000)
public static final java.lang.String PROP_TEDVIEW_LOG_PORT
- See Also:
- Constant Field Values
PROP_TEDVIEW_LOG_ADDRESS
@S4String(defaultValue="localhost")
public static final java.lang.String PROP_TEDVIEW_LOG_ADDRESS
- See Also:
- Constant Field Values
PROP_LOG_TO_TEDVIEW
@S4Boolean(defaultValue=true)
public static final java.lang.String PROP_LOG_TO_TEDVIEW
- See Also:
- Constant Field Values
logToTedView
private boolean logToTedView
tedLogAdapter
protected TedAdapter tedLogAdapter
logger
protected org.apache.log4j.Logger logger
rightBuffer
protected final IUModule.RightBuffer rightBuffer
- the right buffer of this module
IUModule
public IUModule()
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 PushBuffer
- Throws:
edu.cmu.sphinx.util.props.PropertyException
leftBufferUpdate
protected abstract void leftBufferUpdate(java.util.Collection<? extends IU> ius,
java.util.List<? extends EditMessage<? extends IU>> edits)
- the method that IU modules must implement
- Parameters:
ius
- list of IUs that make up the current hypothesisedits
- a list of edits since the last call
hypChange
public void hypChange(java.util.Collection<? extends IU> ius,
java.util.List<? extends EditMessage<? extends IU>> edits)
- Description copied from class:
PushBuffer
- this should receive a list of current IUs and
a list of edit messages since the last call to hypChange
- Specified by:
hypChange
in class PushBuffer
- Parameters:
ius
- while this is a (plain) collection, the collection's iterator()
method must ensure a sensible ordering of the returned elements.
For now we have only used Lists (which are ordered),
but a Tree of IUs should also be possible and this should gracefully
work together with processors that expect listsedits
- a list of edits since the last call to hypChange
getTime
public int getTime()
logToTedView
public void logToTedView(java.lang.String message)