Share via


Currency Rules for French (Canada)

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The four currency rules describe a quantity of currency up to one million dollars and 99 cents.

Three of the currency rules limit the maximum quantity that can be recognized. The names of these three rules indicate the limit. For example, the Currency_CanDollar_upto1000 rule accepts whole quantities up to and including $1000.00.

Rules

Currency_CanDollar

Currency_CanDollar_upto100

Currency_CanDollar_upto1000

Currency_CanDollar_upto10000

Usage

<ruleref uri="Library.grxml#Currency_CanDollar" type="application/srgs+xml"/>
<ruleref uri="Library.grxml#Currency_CanDollar_upto100" type="application/srgs+xml"/>
<ruleref uri="Library.grxml#Currency_CanDollar_upto1000" type="application/srgs+xml"/>
<ruleref uri="Library.grxml#Currency_CanDollar_upto10000" type="application/srgs+xml"/>

The grammar can be used as follows (using the Currency_CanDollar rule as an example).

<grammar xmlns:sapi="http://schemas.microsoft.com/Speech/2002/06/SRGSExtensions"
         xml:lang="fr-CA" tag-format="semantics-ms/1.0" version="1.0" mode="voice"
         root="Rule1" xmlns="http://www.w3.org/2001/06/grammar">
    <rule id="Rule1" scope="public">
        <ruleref uri="Library.grxml#Currency_CanDollar" type="application/srgs+xml"/>
    <tag>$ = $$</tag>
    </rule>
</grammar>

JScript Objects

$Currency_CanDollar._value : float [0.00...1000000.99]
$Currency_CanDollar_upto100._value : float [0.00...100.00]
$Currency_CanDollar_upto1000._value : float [0.00...1000.00]
$Currency_CanDollar_upto1000._value : float [0.00...10000.00]

Examples: Currency_CanDollar

Example 1

User says: "cent."

When the currency type is not mentioned, it is assumed to be dollars.

SML returned by the recognition engine.

<SML text="cent" utteranceConfidence="1.000" confidence="1.000">100</SML>

Example 2

User says: "deux dollars et quinze cennes."

SML returned by the recognition engine.

<SML text="deux dollars et quinze cennes" utteranceConfidence="1.000" confidence="1.000">2.15</SML>

Example 3

User says: "quatre-vingt-dix-neuf cennes."

SML returned by the recognition engine.

<SML text="quatre-vingt-dix-neuf cennes" utteranceConfidence="1.000" confidence="1.000">0.99</SML>

Example 4

User says: "deux dollars quatre-vingt-dix-neuf cennes."

SML returned by the recognition engine.

<SML text="deux dollars quatre-vingt-dix-neuf cennes" utteranceConfidence="1.000" confidence="1.000">2.99</SML>

See Also

Concepts

Voice Mode Grammar Library for French (Canada)