Understanding weight

For optimal Dragon Voice recognition, use weights to specify the relative importance of recognition objects to each other. The total weight is always 1.0 and is the sum of the loaded DLMs, builtins, wordsets, and the base language model.

Weight is only relevant to audio-to-text recognition, and has no impact on meaning extraction (text to meaning). For example, if your tests indicate a recognition problem at the beginning of words, the recognition might improve if you might increase the DLM weight.

Note: DLM weights do not apply to custom pronunciations: the pronunciations are applied globally without respect to the weight of their DLM containers.

Value range for weights

The weight value range is 0-1.0.

You can also specify named values:

  • highest (0.9)
  • high (0.5)
  • medium (0.25)
  • low (0.1)
  • lowest (0.05)

Recognition objects that accept weights

Weights apply to domain language models, dynamic wordsets, builtins, and the base language model. When no recognition objects are specified (no wordsets, no domain language models, no builtins) the base language model gets all of the weight.

Best practices for DLM weights

A common strategy is to load domain language models with weight 0 (in the manifest) at the session level, and then assign new weights for each turn (at the recognition level). In this way, the weight reverts to 0 if the VoiceXML doesn't explicitly reference the DLM for a given turn).

Formula for calculating weights

The formula for weight calculations:

1.0 - sum(DLM-weights + builtin-weights + wordset-weight)

Explanation:

  • A domain language model can have any weight.
  • A builtin must have a weight to become active.
  • The combined weight of all wordsets is always 0.1. (If there are multiple wordsets, they share the weight.)
  • The weight of the base language model is initially 1.0. The value is reduced by the sum of all DLMs, builtins, and wordsets added together. For example, if the sum is 0.25, the weight of the base model is 0.75. (You cannot set an explicit weight to the base model, and the value is never lower than 0.1.)

  • When you override a weight configured in the manifest, the relative weight is recalculated using the same formula.

This example sets the weight of two domain language models:

<grammar src="http://base_path/?nlptype=config&1000_MainMenu_dlm_weight=0.1&2000_BillingMenu_dlm_weight=0.25"/>

Above, the total weight is 0.35. If we assume there are no builtins or wordsets, the weight of the base model becomes 0.65.

This example shows the relative weights among recognition objects:

If the sum exceeds 1.0, the following algorithm calculates normalized weight values:

  1. Divide 0.9 by total of assigned weights
  2. Multiply each weight by the quotient

For example: