inpro.incremental.processor
Class TagParser
java.lang.Object
inpro.incremental.PushBuffer
inpro.incremental.IUModule
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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).
TagParser
public TagParser()
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 hypothesisedits
- 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