|
| Leading Translation Management System for Translation Agencies, Top Translation Management Software for Freelance Translators, Time Tracking Software, Word Count, Character Count and Line Count Software, Computer Assisted Translation Tool for Easy Word Count, Clipboard Character Count Software, User-Friendly Translation Memory Software, Terminology Management Software, Terminology Management Server, Microsoft Glossary Software, Dictionary of Acronyms, Social Network for Translators and Translation Agencies, Acronyms and Abbreviations Search Engine, Russian Translation Lab, Ukrainian Translation Lab. |
You are reading help file online using chmlib.com
|
Microsoft Speech SDK
SAPI 5.1
ISpGrammarBuilder::AddWordTransition
ISpGrammarBuilder::AddWordTransition adds a word or a sequence of words to the grammar.
HRESULT AddWordTransition(
SPSTATEHANDLE hFromState,
SPSTATEHANDLE hToState,
const WCHAR *psz,
const WCHAR *pszSeperators,
SPGRAMMARWORDTYPE eWordType,
float Weight,
const SPPROPERTYINFO *pPropInfo
);
Parameters
- hFromState
- [in] Handle of the state from which the arc (or sequence of arcs in the case of multiple words) should originate.
- hToState
- [in] Handle of the state where the arc (or sequence of arcs) should terminate. If NULL, the final arc will be to the (implicit) terminal node of this grammar rule.
- psz
- [in] Address of a null-terminated string containing the word or words to be added. If psz is NULL, an epsilon arc will be added.
- pszSeperators
- [in] Address of a null-terminated string containing the transition word separation characters.
psz points to a single word if pszSeperators is NULL, or else pszSeperators specifies the valid separator characters. This parameter may not contain a forward slash ("/") as that is used for the complex word format.
- eWordType
- [in] The SPGRAMMARWORDTYPE enumeration that specifies the word type. Currently, only SPWT_LEXICAL is supported.
- Weight
- [in] Value specifying the arc's relative weight in case there are multiple arcs originating from hFromState.
- pPropInfo
- [in] The SPPROPERTYINFO structure containing property name and value information that is associated with this arc or sequence of arcs.
Return values
Value |
Description |
S_OK |
Function completed successfully. |
E_INVALIDARG |
At least one of psz, pszSeparators, or pPropInfo is invalid or bad; eWordType is a value other than SPWT_LEXICAL; flWeight is less than 0.0; a slash ("/") is used as a separators. |
SPERR_WORDFORMAT_ERROR |
Invalid word format. |
E_OUTOFMEMORY |
Exceeded available memory. |
FAILED(hr) |
Appropriate error message. |
You are reading help file online using chmlib.com
|
If you want your help file to be removed or added please send e-mail to chmlibcom@gmail.com