SWIlanguageModel n-gram
Note: Information on this feature is provided for backwards compatibility.
You can use n-gram grammars to apply language model weights to SRGS grammars. This is done in the SRGS grammar with a <meta> element that specifies the desired n-gram grammar; for example:
<meta name="SWIlanguageModel" content="trigramu.xml"/>
When an n-gram grammar is used for this purpose, it is known as a SWIlanguageModel n-gram and its syntax differs from the n-gram grammars described elsewhere. Guidelines for this special n-gram:
- SWIlanguageModel n-grams use the <lexicon> instead of <vocab>, and (unlike <vocab>) the <lexicon> tag cannot use <ruleref> to import other SRGS rules using the uri attribute.
- This grammar does not support SRGS pronunciation dictionaries.
- This n-gram can include the use of a Unigram Class, specified by the <import> tag. See Example (trigramu.xml).
- The <import> element may only reference unigram n-gram grammars.
- The imported unigram n-gram grammars cannot use <ruleref> to import SRGS rules or other n-grams.
- The import attribute must be of the form name#CLASS where name is the name attribute from an import and CLASS matches a rule in the SRGS grammar.
- The CLASS rule in the SRGS must have the attribute SWIListClass="1".
- This n-grams ruleref's may only reference alias imports specified with the <import> element.