swirec_compile_parser_with_weights

Specifies whether to consider “weights” during recognition parsing.

Value

Boolean

Default

0 (feature is off)

How to set

In a grammar using a <meta> tag. See the text on compilation-time parameters in Parameters set in grammar files.

Usage

This is an advanced feature that is rarely used. Nuance might remove the parameter from the product or change its behavior in the future. This parameter is ignored by advanced natural language grammars.

This parameter is for developers who write speech grammars that use weights. As defined in the W3C grammar specification, a grammar can define the weights of items in a <one-of> list or via a repeat-probabilities attribute. It defines whether the Recognizer considers weights during the parsing phase of recognition. (The Recognizer can use weights during acoustic recognition and subsequent language parsing. This parameter affects only the parsing phase.)

Weights have the following primary uses:

  • Parser weights can improve the accuracy of grammars that generate large numbers of possible parses (for example, robust-parsing grammars).
  • Weights can determine the ordering of ambiguous parses (multiple parses for a single literal value) returned by the Recognizer in an entry in the n-best list (for example, parse1#parse2#parse3). If this parameter is 0, ambiguous parses are concatenated in random order. If it is set to 1, ambiguous parses appear in weighted order. (Parses with the same weight appear as adjacent n-best entries in random order.)

This parameter has no effect on grammar weights assigned when activating the grammar. For example, regardless of the setting of this parameter, you can set relative grammar weights when activating more than one grammar.

When you compile a robust parsing grammar, the compiler automatically adds weights to improve the recognition accuracy of concepts and fillers. To enable processing of these weights, the Recognizer automatically sets this parameter to 1. This is done even if the robust parsing grammar contains a meta tag that sets this parameter to a different value. (In this case a warning message is written to the error log.) It is not possible to override this automatic setting.

Sample definition in a grammar file:

<meta name="swirec_compile_parser_with_weights" 
content="1"/>

Related parameter