|
||||||||||
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
demo.inpro.system.greifarm.WordAdaptiveSmoothingDeltifier
public class WordAdaptiveSmoothingDeltifier
TODO/possible extensions: - make incremental smoothing depend on currently salient actions (left is more likely after left, stop is more likely while moving)
Nested Class Summary |
---|
Nested classes/interfaces inherited from class inpro.incremental.deltifier.SmoothingDeltifier |
---|
SmoothingDeltifier.SmoothingCounter |
Field Summary | |
---|---|
static java.lang.String |
PROP_SAFE_WORDS
|
static java.lang.String |
PROP_URGENT_WORD
|
java.util.List<java.lang.String> |
safeWords
|
java.lang.String |
urgentWord
|
Fields inherited from class inpro.incremental.deltifier.SmoothingDeltifier |
---|
PROP_SMOOTHING, smoothing, smoothingQueue |
Fields inherited from class inpro.incremental.deltifier.ASRWordDeltifier |
---|
recoFinal, wordEdits, wordIUs |
Constructor Summary | |
---|---|
WordAdaptiveSmoothingDeltifier()
|
Method Summary | |
---|---|
private void |
applyEditsToOutputLists(java.util.List<EditMessage<WordIU>> editsToBeApplied)
apply edits to the output lists (wordIUs and wordEdits) |
protected void |
applySmoothingQueueToOutputWords()
apply edits from smoothingQueue if their counter has run out, add them to edit list and update wordIUs in contrast to the overridden operation, this looks at *all* enqueued items (but stopping if it reaches a stay-safe-word), and if a counter has run out it enqueues also words preceding this word, for which the counter has not run out. |
private java.util.List<EditMessage<WordIU>> |
determineEditsToBeApplied(java.util.ListIterator<SmoothingDeltifier.SmoothingCounter> smoothIter)
determine the edits from the smoothingQueue that should be applied if a counter has run out |
protected int |
getSmoothingFactor(EditMessage<WordIU> edit)
more interesting assignment of smoothing factors depending on whether something is an "urgent word", a "stay-safe word", or just any other word |
protected boolean |
isStaySafeWord(EditMessage<WordIU> edit)
determines the edits that should get a high safety-threshold words with action:drop should get a high smoothing factor, |
protected boolean |
isUrgentWord(EditMessage<WordIU> edit)
determines the words that should be handled with priority words with action:stop should get a very low smoothing factor for the ADD message |
static void |
main(java.lang.String[] args)
only for testing |
void |
newProperties(edu.cmu.sphinx.util.props.PropertySheet ps)
this base implementation does not accept any parameters |
java.lang.String |
toString()
|
Methods inherited from class inpro.incremental.deltifier.SmoothingDeltifier |
---|
basicDeltify, deltify, handleIncomingIUEdits, restoreOutputLists, saveOutputLists |
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 |
---|
@S4String(defaultValue="drop") public static final java.lang.String PROP_SAFE_WORDS
public java.util.List<java.lang.String> safeWords
@S4String(defaultValue="stop") public static final java.lang.String PROP_URGENT_WORD
public java.lang.String urgentWord
Constructor Detail |
---|
public WordAdaptiveSmoothingDeltifier()
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 SmoothingDeltifier
edu.cmu.sphinx.util.props.PropertyException
protected int getSmoothingFactor(EditMessage<WordIU> edit)
getSmoothingFactor
in class SmoothingDeltifier
edit
- ignored in this implementation
protected boolean isStaySafeWord(EditMessage<WordIU> edit)
protected boolean isUrgentWord(EditMessage<WordIU> edit)
protected void applySmoothingQueueToOutputWords()
in contrast to the overridden operation, this looks at *all* enqueued items (but stopping if it reaches a stay-safe-word), and if a counter has run out it enqueues also words preceding this word, for which the counter has not run out. in other words: "jetzt stop" will be released as soon as "stop" goes off, even though "jetzt" may not have gone off yet.
applySmoothingQueueToOutputWords
in class SmoothingDeltifier
private java.util.List<EditMessage<WordIU>> determineEditsToBeApplied(java.util.ListIterator<SmoothingDeltifier.SmoothingCounter> smoothIter)
smoothIter
-
private void applyEditsToOutputLists(java.util.List<EditMessage<WordIU>> editsToBeApplied)
editsToBeApplied
- public static void main(java.lang.String[] args)
public java.lang.String toString()
toString
in class SmoothingDeltifier
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |