inpro.incremental
Class PushBuffer

java.lang.Object
  extended by inpro.incremental.PushBuffer
All Implemented Interfaces:
edu.cmu.sphinx.instrumentation.Resetable, edu.cmu.sphinx.util.props.Configurable
Direct Known Subclasses:
BasicEvaluator, CurrentHypothesisViewer, FrameAwarePushBuffer, InstallmentHistoryViewer, IUModule, IUNetworkToDOT, OutputForSimpleText, WordCatcher

public abstract class PushBuffer
extends java.lang.Object
implements edu.cmu.sphinx.instrumentation.Resetable, edu.cmu.sphinx.util.props.Configurable

Defines the interface for receiving hypothesis changes of incremental processors. Communication in the inpro system follows an event-based push-scheme. Each event comprises the communicated information in two forms:

In this way, processors can choose whether they rather base their calculations on the complete information, or on the edits. E.g., a processor that want to listen for the occurrence of a specific IU can limit its analysis to add-messages with the IU in question as payload; in contrast, a processor that is interested in the ultimate IU of the current hypothesis will rather just inspect the last element of the IU list. Notice that full-fledged incremental modules (which also generate incremental output) should rather subclass IUModule which handles output handling and offers some more convenience operations.

Author:
timo

Constructor Summary
PushBuffer()
           
 
Method Summary
abstract  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
 void newProperties(edu.cmu.sphinx.util.props.PropertySheet ps)
           
 void reset()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PushBuffer

public PushBuffer()
Method Detail

hypChange

public abstract 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

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 lists
edits - a list of edits since the last call to hypChange

reset

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

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
Throws:
edu.cmu.sphinx.util.props.PropertyException