inpro.incremental.processor
Class TagParser

java.lang.Object
  extended by inpro.incremental.PushBuffer
      extended by inpro.incremental.IUModule
          extended by inpro.incremental.processor.TagParser
All Implemented Interfaces:
edu.cmu.sphinx.instrumentation.Resetable, edu.cmu.sphinx.util.props.Configurable

public class TagParser
extends IUModule

An IU processor wrapper around the SITDBSParser. For any incoming TagIU representing the next element in a string of part-of-speech tags, the processor outputs the possible partial parses in form of CandidateAnalysisIUs.

Author:
andreas

Nested Class Summary
 
Nested classes/interfaces inherited from class inpro.incremental.IUModule
IUModule.RightBuffer
 
Field Summary
private  java.util.List<CandidateAnalysisIU> analyses
          keeps track of all analyses (in order to be able to find the right IU for a given CA).
private  double baseBeamFactor
           
private  boolean beRobust
           
private  java.lang.String grammarFile
           
static java.lang.String PROP_BASE_BEAM_FACTOR
           
static java.lang.String PROP_BE_ROBUST
           
static java.lang.String PROP_GRAMMAR
           
private  java.util.Map<TagIU,SITDBSParser> states
          keeps track of all parsing states for a given TagIU
 
Fields inherited from class inpro.incremental.IUModule
iulisteners, logger, PROP_HYP_CHANGE_LISTENERS, PROP_LOG_TO_TEDVIEW, PROP_TEDVIEW_LOG_ADDRESS, PROP_TEDVIEW_LOG_PORT, rightBuffer, tedLogAdapter
 
Constructor Summary
TagParser()
           
 
Method Summary
 void degradeAnalysis(CandidateAnalysisIU caiu, double malus)
          degrades the analysis encapsuled in the given CandidateAnalysisIU by the given malus
private  java.util.List<CandidateAnalysisIU> findIU(CandidateAnalysis ca)
          finds all payload-string-equal IUs for a given CandidateAnalysis
protected  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 printStatus(CandidateAnalysisIU caiu)
          print the parser status for this CandidateAnalysisIU
 
Methods inherited from class inpro.incremental.IUModule
getTime, hypChange, logToTedView
 
Methods inherited from class inpro.incremental.PushBuffer
reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_GRAMMAR

@S4String
public static final java.lang.String PROP_GRAMMAR
See Also:
Constant Field Values

grammarFile

private java.lang.String grammarFile

PROP_BASE_BEAM_FACTOR

@S4Double(defaultValue=0.0010)
public static final java.lang.String PROP_BASE_BEAM_FACTOR
See Also:
Constant Field Values

baseBeamFactor

private double baseBeamFactor

PROP_BE_ROBUST

@S4Boolean(defaultValue=true)
public static final java.lang.String PROP_BE_ROBUST
See Also:
Constant Field Values

beRobust

private boolean beRobust

states

private java.util.Map<TagIU,SITDBSParser> states
keeps track of all parsing states for a given TagIU


analyses

private java.util.List<CandidateAnalysisIU> analyses
keeps track of all analyses (in order to be able to find the right IU for a given CA).

Constructor Detail

TagParser

public TagParser()
Method Detail

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

findIU

private java.util.List<CandidateAnalysisIU> findIU(CandidateAnalysis ca)
finds all payload-string-equal IUs for a given CandidateAnalysis


leftBufferUpdate

protected 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

degradeAnalysis

public void degradeAnalysis(CandidateAnalysisIU caiu,
                            double malus)
degrades the analysis encapsuled in the given CandidateAnalysisIU by the given malus


printStatus

public void printStatus(CandidateAnalysisIU caiu)
print the parser status for this CandidateAnalysisIU