Operations Summary: | |
void | addWord(in string word) |
void | removeWord(in string word) |
StringArray | listAddedWords() |
StringArray | listRemovedWords() |
void | setContext(in string preceding, in string following) |
void | setContextFromArray(in StringArray preceding, in StringArray following) |
Operations Inherited from Grammar | |
addGrammarListener, removeGrammarListener, addResultListener, removeResultListener, getActivationMode, getName, getRecognizer, isActive, isEnabled, setActivationMode, setEnabled |
Operations Inherited from Bonobo::Unknown | |
ref, unref, queryInterface |
Operation Details: |
Add a word to the DictationGrammar
. The
addWord
method can undo the effects of an
removeWord
call.
A change in a DictationGrammar
is applied to
the recognition process only after
changes have been committed.
Recognizer#commitChanges
Remove a word from the DictationGrammar
. The
removeWord
method can undo the effects of an
addWord
call.
A change in a DictationGrammar
is applied to
the recognition process only after
changes have been committed.
Recognizer#commitChanges
List the words that have been added to the
DictationGrammar
.
DictationGrammar
.
List the words that have been removed from the
DictationGrammar
.
DictationGrammar
.Provide the recognition engine with the current textual context. Dictation recognizers use the context information to improve recognition accuracy. (Context is discussed above.)
When dictating a sequence of words, the recognizer updates its
context. The app does not need to inform the recognizer when
results arrive. Instead it should call setContext
for events such as cursor movement, cut, paste etc.
The preceding or following context may be null if there is no preceding or following context. This is appropriate for a new document or in situations where context is not clear.
The alternative setContext
, that accepts arrays of
tokens for context, should be used when the current context
includes tokens from previous results.
setContextFromArray
Provide the recognition engine with the current textual context with arrays of the previous and following tokens. Dictation recognizers use the context information to improve recognition accuracy. (Context is Parameters:
setContext