|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinpro.incremental.deltifier.ASRWordDeltifier
inpro.incremental.deltifier.SmoothingDeltifier
public class SmoothingDeltifier
only outputs IUs if a word is consecutively hypothesized for N
frames.
this is realized by overriding ASRWordDeltifier.deltify(Token)
.
for further reading, please see:
Timo Baumann, Michaela Atterer and David Schlangen (2009).
"Assessing and Improving the Performance of Speech Recognition for Incremental Systems".
in Proceedings of NAACL-HLT 2009, Boulder, USA.
Online:
http://www.ling.uni-potsdam.de/~timo/pub/#naacl2009.
ASRWordDeltifier.deltify(Token)
Nested Class Summary | |
---|---|
class |
SmoothingDeltifier.SmoothingCounter
stores the maturity for a given edit message |
Field Summary | |
---|---|
private IUList<WordIU> |
prevWordIUs
|
static java.lang.String |
PROP_SMOOTHING
|
protected int |
smoothing
|
protected java.util.List<SmoothingDeltifier.SmoothingCounter> |
smoothingQueue
|
Fields inherited from class inpro.incremental.deltifier.ASRWordDeltifier |
---|
currentFrame, currentOffset, recoFinal, startTime, wordEdits, wordIUs |
Constructor Summary | |
---|---|
SmoothingDeltifier()
|
Method Summary | |
---|---|
private void |
addNewWordsToSmoothingQueue(EditMessage<WordIU> edit,
java.util.Iterator<EditMessage<WordIU>> editsIter,
java.util.List<SmoothingDeltifier.SmoothingCounter> smoothingQueue)
|
protected void |
applySmoothingQueueToOutputWords()
apply edits from smoothingQueue if their counters have run out, add them to edit list and update wordIUs NOTE: this implementation only handles smoothing factors that are constant for all words: how it works: going through the list of enqueued edits; while the word's counter has run out, add them to output, stop as soon as a counter is still counting |
protected void |
basicDeltify(edu.cmu.sphinx.decoder.search.Token token)
|
private EditMessage<WordIU> |
compareToSmoothingQueueForMatchingWords(java.util.Iterator<EditMessage<WordIU>> editsIter,
java.util.Iterator<SmoothingDeltifier.SmoothingCounter> smoothIter)
compares incoming edits and smoothing list, decreases counters for matching smoothings and returns as soon as a non-matching word is found; this word is returned (as the underlying iterator can't go back :-( |
protected void |
deltify(edu.cmu.sphinx.decoder.search.Token token)
deltifies using a smoothing algorithm. |
protected int |
getSmoothingFactor(EditMessage<WordIU> edit)
return the smoothing factor that applies to this edit message |
protected void |
handleIncomingIUEdits()
update smoothing counters for words of still-valid words in the smoothing queue, remove invalid ones, add new ones for new words |
void |
newProperties(edu.cmu.sphinx.util.props.PropertySheet ps)
this base implementation does not accept any parameters |
private void |
removeNonMatchingWordsFromSmoothingQueue(java.util.Iterator<SmoothingDeltifier.SmoothingCounter> smoothIter)
|
protected void |
restoreOutputLists()
initiate output lists |
protected void |
saveOutputLists()
|
java.lang.String |
toString()
|
Methods inherited from class inpro.incremental.deltifier.ASRWordDeltifier |
---|
deltify, getCurrentFrame, getCurrentTime, getTokens, getWordEdits, getWordIUs, reset, setCollectTime, setOffset, signalOccurred |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
@S4Integer(defaultValue=0) public static final java.lang.String PROP_SMOOTHING
protected int smoothing
protected java.util.List<SmoothingDeltifier.SmoothingCounter> smoothingQueue
private IUList<WordIU> prevWordIUs
Constructor Detail |
---|
public SmoothingDeltifier()
Method Detail |
---|
public void newProperties(edu.cmu.sphinx.util.props.PropertySheet ps) throws edu.cmu.sphinx.util.props.PropertyException
ASRWordDeltifier
newProperties
in interface edu.cmu.sphinx.util.props.Configurable
newProperties
in class ASRWordDeltifier
edu.cmu.sphinx.util.props.PropertyException
protected void deltify(edu.cmu.sphinx.decoder.search.Token token)
deltify
in class ASRWordDeltifier
token
- the token from which the deltification startsprotected void basicDeltify(edu.cmu.sphinx.decoder.search.Token token)
protected void handleIncomingIUEdits()
protected void applySmoothingQueueToOutputWords()
protected void saveOutputLists()
protected void restoreOutputLists()
private EditMessage<WordIU> compareToSmoothingQueueForMatchingWords(java.util.Iterator<EditMessage<WordIU>> editsIter, java.util.Iterator<SmoothingDeltifier.SmoothingCounter> smoothIter)
editsIter
- smoothIter
-
private void removeNonMatchingWordsFromSmoothingQueue(java.util.Iterator<SmoothingDeltifier.SmoothingCounter> smoothIter)
private void addNewWordsToSmoothingQueue(EditMessage<WordIU> edit, java.util.Iterator<EditMessage<WordIU>> editsIter, java.util.List<SmoothingDeltifier.SmoothingCounter> smoothingQueue)
edit
- a (possibly null) edit to add firsteditsIter
- more edits to addsmoothingQueue
- the queue to add toprotected int getSmoothingFactor(EditMessage<WordIU> edit)
edit
- ignored in this implementation
public java.lang.String toString()
toString
in class ASRWordDeltifier
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |