Share via


Currency Rules for Spanish (United States)

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 1 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, Currency_US_upto1000 accepts whole quantities up to and including $1000.00.

Rules

Currency_US

Currency_US_upto100

Currency_US_upto1000

Currency_US_upto10000

Usage

<ruleref uri="Library.grxml#Currency_US" type="application/srgs+xml"/>
<ruleref uri="Library.grxml#Currency_US_upto100" type="application/srgs+xml"/>
<ruleref uri="Library.grxml#Currency_US_upto1000" type="application/srgs+xml"/>
<ruleref uri="Library.grxml#Currency_US_upto10000" type="application/srgs+xml"/>

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

<grammar xmlns:sapi="http://schemas.microsoft.com/Speech/2002/06/SRGSExtensions"
         xml:lang="es-US" 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_US" type="application/srgs+xml"/>
    <tag>$ = $$</tag>
    </rule>
</grammar>

JScript Objects

$Currency_US._value : float [0.00...1000000.99]
$Currency_US_upto100._value : float [0.00...100.00]
$Currency_US_upto1000._value : float [0.00...1000.00]
$Currency_US_upto1000._value : float [0.00...10000.00]

Examples: Currency

Example 1

User says: "cien d??lares."

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

SML returned by the recognition engine.

<SML text="cien d??lares" utteranceConfidence="1.000" confidence="1.000">100</SML>

Example 2

User says: "dos d??lares con quince centavos."

SML returned by the recognition engine.

<SML text="dos d??lares con quince centavos" utteranceConfidence="1.000" confidence="1.000">2.15</SML>

Example 3

User says: "noventa y nueve centavos."

SML returned by the recognition engine.

<SML text="noventa y nueve centavos" utteranceConfidence="1.000" confidence="1.000">0.99</SML>

Example 4

User says: "dos noventa y nueve."

SML returned by the recognition engine.

<SML text="dos noventa y nueve" utteranceConfidence="1.000" confidence="1.000">2.99</SML>

See Also

Concepts

Voice Mode Grammar Library for Spanish (United States)