GetVocal Voice Portal Technologies

[1.0 to 2.0][Tags][Attributes][Variables][Events][Properties]

VoiceXML Attribute
 weight

Relative probability of a choice.

Tags
<item>

Compatibility
VoiceXML 1.0 No, 2.0 Yes.

Description
Specifies the relative weight to give to an item when attempting to match a grammar rule. It is ignored unless it is an attribute of an <item> within a <one-of>.

The weight should indicate the estimated probability of this item occurring versus the other items. Weights are numerical values with optional decimals and must be zero or greater. In the absence of weights or if the weights are not properly specified (e.g. one or more missing) then the choices are assumed to be equally likely. There are no particular units, the sum of all the weights within a given <one-of> is considered equivalent to 100% likelihood. So if the weights for a choice with three items were "0.2", "0.2" and "0.6", this would represent 20%, 20% and 60%. If the weights were "3", "3" and "9", this would have exactly the same effect.
©  GetVocal, inc. All Rights Reserved.