Additional Publicly Scoped Rules for Spanish (United States)
This document contains descriptions, examples, and JScript Object names for the publicly-scoped rules contained in cmnrules.grxml that are not documented elsewhere in the voice mode grammar library topic.
The following table presents the rules documented here in alphabetical order. The list that follows the table presents the rules in the order in which they appear in the cmnrules.grxml file. Each rule name in the table is hyperlinked to the portion of the list that contains the information about that rule.
Hyperlinks to Public Rules Documented on This Page | ||
---|---|---|
ApproximatedDB | cardinal | cardinal_1_to_1e12 |
cardinal_1_to_1e15 | cardinal_1_to_1e3 | cardinal_1_to_1e6 |
cardinal_1_to_1e9 | cardinal_999 | cardinal_smaller_than_one_million |
Day | DayOfWeek | denominator_plural |
denominator_singular | digit | digit_list |
digit_nonzero | EvaluatedRelativeDB | grouped_twodigit |
HardClosedDB | HardDBwDeadline | HardDBwStartDate |
letter | Month | MonthWithOptionalYear |
numeral_date_w_year | numeral_date_wo_year | numeral_date_wo_year_future |
numeral_date_wo_year_past | one2thirtyone | one2twelve |
onesfrag | ordinal | ordinal_1_to_1e12 |
ordinal_1_to_1e15 | ordinal_1_to_1e3 | ordinal_1_to_1e6 |
ordinal_1_to_1e9 | popular_simple_fractions | regular_precise_date |
regular_precise_date_future | regular_precise_date_past | RelativeMonth |
simple_year | SoftClosedDB | teens |
tensfrag | twodigit | Year |
YearEx |
denominator_singular
Description
Recognizes the denominator of a fraction in which the numerator is one. The denominator can be any ordinal number from second to 999,999,999,999,999th inclusive. Value is of type integer.Examples
quinta parte
quinto
centésima parteJScript Objects
$denominator_singular._value: integer
Back to table
denominator_plural
Description
Recognizes the denominator of a fraction in which the numerator is greater than one. The denominator can be any ordinal number from thirds to 999,999,999,999,999s inclusive. Value is of type integer.Examples
trillonésimas partes
treinta trillonésimos
seiscientos cincuentainueve trillonésimas partesJScript Objects
$denominator_plural._value: integer
Back to table
popular_simple_fractions
Description
Recognizes a half, one half, a quarter, one quarter, two quarters, and three quarters. Value is of type float.Examples
un medio
un cuarto
dos cuartosJScript Objects
$popular_simple_fractions._value: float
Back to table
tensfrag
Description
Recognizes 20, 30, 40, 50, 60, 70, 80, and 90. Value is of type integer.Examples
veinte
cuarenta
ochentaJScript Objects
$tensfrag._value: integer
Back to table
onesfrag
Description
Recognizes a number from 1 through 19, inclusive. Value is of type integer.Examples
tres
diez
diecinueveJScript Objects
$onesfrag._value: integer
Back to table
teens
Description
Recognizes the numbers 10 through 19 inclusive. Value is of type integer.Examples
diez
once
diecinueve
diez y ochoJScript Objects
$teens._value: integer
Back to table
cardinal
Description
Recognizes the cardinal numbers 10 through 999,999,999,999,999 inclusive, where the number name is spoken as a single value as opposed to digit-by-digit. Value is of type integer.Examples
cero
quinientos
un millón dos mil ochocientosJScript Objects
$cardinal._value: integer
Back to table
cardinal_smaller_than_one_million
Description
Recognizes the cardinal numbers 1 through 999,999 inclusive. Value is of type integer.Examples
cero
once
doscientos trece
seis mil quinientos doce
novecientos noventa y nueve mil doscientos cincuentaJScript Objects
cardinal_smaller_than_one_million._value: integer
Back to table
cardinal_999
Description
Recognizes the cardinal numbers 1 through 999 inclusive. Value is of type integer.Examples
cero
cincuenta
novecientos noventa y nueveJScript Objects
$cardinal_999._value: integer
Back to table
cardinal_1_to_1e15
Description
Recognizes the cardinal numbers 1 through 999,999,999,999,999 inclusive. Value is of type integer.Examples
uno
novecientos noventa y nueve trillones novecientos noventa y nueve billones novecientos noventa y nueve million novecientos noventa y nueve mil novecientos noventa y nueveJScript Objects
$cardinal_1_to_1e15._value: integer
Back to table
cardinal_1_to_1e12
Description
Recognizes the cardinal numbers 1 through 999,999,999,999 inclusive. Value is of type integer.Examples
uno
novecientos noventa y nueve billones novecientos noventa y nueve millones novecientos noventa y nueve mil novecientos noventa y nueveJScript Objects
$cardinal_1_to_1e12._value: integer
Back to table
cardinal_1_to_1e9
Description
Recognizes the cardinal numbers 1 through 999,999,999 inclusive. Value is of type integer.Examples
uno
novecientos noventa y nueve millones novecientos noventa y nueve mil novecientos noventa y nueveJScript Objects
$cardinal_1_to_1e9._value: integer
Back to table
cardinal_1_to_1e6
Description
Recognizes the cardinal numbers 1 through 999,999 inclusive. Value is of type integer.Examples
uno
novecientos noventa y nueve mil novecientos noventa y nueveJScript Objects
$cardinal_1_to_1e6._value: integer
Back to table
cardinal_1_to_1e3
Description
Recognizes the cardinal numbers 1 through 999 inclusive. Value is of type integer.Examples
uno
dos
diecinueve
noventa
veintidós
doscientos doceJScript Objects
$cardinal_1_to_1e3._value: integer
Back to table
ordinal
Description
Recognizes the expression of an ordinal number from 1st through 999,999,999,999,999th inclusive. Value is of type integer.Examples
trillonésima
trillonésimo
trillonésima milésima centésima vigésima primeraJScript Objects
return values same as ordinal_1_to_1e15
Back to table
ordinal_1_to_1e15
Description
Recognizes the expression of an ordinal number from 1st through 999,999,999,999,999th inclusive. Value is of type integer.Examples
tres trillonésimo
treinta trillonésima centésima sexagésimas
tres trillonésima
treinta trillonésimo centésimo sexagésimosJScript Objects
$ordinal_1_to_1e15._value: integer
Back to table
ordinal_1_to_1e12
Description
Recognizes the expression of an ordinal number from 1st through 999,999,999,999th inclusive. Value is of type integer.Examples
billonésimo centésimo duodécimos
duodécimos
billonésima centésima duodécimas
duodécimasJScript Objects
$ordinal_1_to_1e12._value: integer
Back to table
ordinal_1_to_1e9
Description
Recognizes the expression of an ordinal number from 1st through 999,999,999th inclusive. Value is of type integer.Examples
millonésima centésima duodécimas
millonésimo centésimo duodécimosJScript Objects
$ordinal_1_to_1e9._value: integer
Back to table
ordinal_1_to_1e6
Description
Recognizes the expression of an ordinal number from 1st through 999,999th inclusive. Value is of type integer.Examples
milésima centésima septuagésimas
tercera
tres milésimo centésimo decimoquintos
terceroJScript Objects
$ordinal_1_to_1e6._value: integer
Back to table
ordinal_1_to_1e3
Description
Recognizes the expression of an ordinal number from 1st through 999th inclusive. Value is of type integer.Examples
centésimo decimoséptimos
centésimo decimoséptimas
tercero
segundoJScript Objects
$ordinal_1_to_1e3._value: integer
Back to table
digit_list
Description
Recognizes a spoken list of up to twenty numbers. Each number in the list may be either a one-digit or two-digit number. Value is of type string.Examples
cero
doce
cinco veinte
veinte veinticuatro
uno dos tres cuatro cincoJScript Objects
$digit_list._value: string
Back to table
grouped_twodigit
Description
Recognizes the numbers ranging from 10 through 99 inclusive that are composed of two digits and are expressed as a single value (as opposed to spoken digit-by-digit). Value is of type integer.Examples
cuarenta
veinticuatro
veinte y unoJScript Objects
$grouped_twodigit._value: integer
Back to table
twodigit
Description
Recognizes the numbers ranging from 00 through 99 inclusive that are composed of two digits. Recognizes both the expression of these numbers as a single value, and the digit-by-digit expression of these numbers. Value is of type integer.Examples
cero cero
cero uno
veinte
veinticuatro
veinte y unoJScript Objects
$twodigit._value: integer
Back to table
digit
Description
Recognizes the single digit numbers 0 through 9 inclusive. Value is of type integer.Examples
cero
cinco
nueveJScript Objects
$digit._value: integer
Back to table
digit_nonzero
Description
Recognizes the single digit numbers 1 through 9 inclusive. Value is of type integer.Examples
tres
uno
cincoJScript Objects
$digit_nonzero._value: integer
Back to table
letter
Description
Recognizes the letters of the alphabet. Value is of type string.Examples
a.
o.
é.JScript Objects
$letter._value: string
Back to table
simple_year
Description
Recognizes the expression of a year from 1991 through 2009 inclusive. Also recognizes relative expressions equivalent to last year, this year, and next year. Value is of type string.Examples
cero cinco
dos cero cero tres
año dos mil tres
año dos mil
noventa y uno
noventa y nueve
año mil novecientos noventa y nueve
este año
año que viene
año pasadoJScript Objects
$simple_year._value: string
Back to table
Day
Description
Recognizes the expression of an ordinal number from 1st through 31st, optionally preceded by an article. Value is of type integer.Examples
treinta
treinta y uno
veinte y dosJScript Objects
$Day._value: integer
Back to table
Month
Description
Recognizes the names of the months of the year. Value is of type integer, from 1 through 12, where January=1 and December=12.Examples
enero
diciembreJScript Objects
$Month._value: integer
Back to table
one2thirtyone
Description
Recognizes the cardinal numbers 1 through 31. Expression of the numbers 1 through 9 can optionally be preceded by the word zero. Value is of type integer.Examples
cero uno
cuatro
treinta y unoJScript Objects
$one2thirtyone._value: integer
Back to table
one2twelve
Description
Recognizes the cardinal numbers 1 through 12. Value is of type integer.Examples
uno
dos
doceJScript Objects
$one2twelve._value: integer
Back to table
Year
Description
This rule recognizes three types of input: a four-digit number; a two-digit number; or a relative time expression.Recognizes four-digit numbers from 0001 through 9999 inclusive, where the number is expressed as a series of 2, two-digit numbers. Numbers ending in "00" can be expressed as a two-digit number followed by the word hundred. Four-digit numbers in the range 2000—2099 can also be expressed as two thousand optionally followed by the word and, and completed with a two-digit number. For four-digit numbers, returns a four-digit integer value for the year, and the string value CompleteForm for the ._attributes.name property.
Recognizes two-digit numbers from 00 through 99 that are expressed as a single value as opposed to spoken digit-by-digit. For two-digit numbers, returns a four-digit integer value for the year, and the string value ShortForm for the ._attributes.name property. For utterances of numbers that are less than 20, the number is added to 2000 to produce a year value between 2000—2019 inclusive. For utterances of number equal to or greater than 20, the number is added to 1900 to produce a year value between 1920—1999 inclusive.
Recognizes relative expressions equivalent to: last year, this year, or next year. For relative time expressions, returns a four-digit integer value representing the previous year, the current year, or the coming year respectively, and the string value Derived for the ._attributes.name property.
The number 0 can be expressed as either zero, with the exception of 0000, which can only be expressed as zero zero zero zero. The word year can optionally precede all expressions.
Examples
dos mil cuatro
año dos mil doscientos veinte
setentaidós
mil ciento ochenta y dos
de mil novecientos noventa y siete
del año dos mil diezJScript Objects
$Year._value: integer$Year._attributes.name: string ("Derived", "ShortForm", "CompleteForm", "Assumed")
Back to table
YearEx
Description
Same as the Year rule except that all expressions of two-digit and four-digit numbers must be preceded by the word year. Also recognizes expressions equivalent to last year, this year and next year. See the description of the Year rule for more information.Examples
año cero cero cero dos
año mil novecientos cinco
año noventa nueve
año cero uno
año dos mil cinco
año dos mil once
año que viene
este añoJScript Objects
$YearEx._value: integer$YearEx._attributes.name: string ("Derived", "ShortForm", "CompleteForm", "Assumed").
Back to table
numeral_date_wo_year
Description
Recognizes the numeric expression of a valid month (1—12) and day (1—31) combination. The combinations 2-30 and 2-31 are not recognized. Single-digit numbers can be expressed in two-digit form where the word zero precedes the name of the single-digit. The year value returned by this rule is set to the current year. Returns a $Year object for the year. See the Year rule for more information. Returns a combination of string and integer values for month and day.Examples
once cero cinco
uno veinte y dos
uno dosJScript Objects
$numeral_date_wo_year.Month._value: integer$numeral_date_wo_year.Month._attributes.name: string ("Common")$numeral_date_wo_year.Day._value: integer$numeral_date_wo_year.Day._attributes.name: string ("Common")$numeral_date_wo_year.Year: $Year$numeral_date_wo_year._attributes.name: string ("PreciseDate")
Back to table
numeral_date_wo_year_future
Description
Recognizes the numeric expression of a valid month (1—12) and day (1—31) combination. The combinations 2-30 and 2-31 are not recognized. Single-digit numbers can be expressed in two-digit form where the word zero precedes the name of the single-digit. The year value returned by this rule is set to either the current year or the next year depending on which year places the month and day in the immediate future relative to the current date. Returns a $Year object for the year. See the Year rule for more information. Returns a combination of string and integer values for month and day.Examples
once cero cinco
uno veintidós
uno dosJScript Objects
$numeral_date_wo_year_future.Month._value: integer$numeral_date_wo_year_future.Month._attributes.name: string ("Common")$numeral_date_wo_year_future.Day._value: integer$numeral_date_wo_year_future.Day._attributes.name: string ("Common")$numeral_date_wo_year_future.Year: $Year$numeral_date_wo_year_future._attributes.name: string ("PreciseDate")
Back to table
numeral_date_wo_year_past
Description
Recognizes the numeric expression of a valid month (1—12) and day (1—31) combination. The combinations 2-30 and 2-31 are not recognized. Single-digit numbers can be expressed in two-digit form where the word zero precedes the name of the single-digit. The year value returned by this rule is set to either the current year or the last year depending on which year places the month and day in the immediate past relative to the current date. Returns a $Year object for the year. See the Year rule for more information. Returns a combination of string and integer values for month and day.Examples
once cero cinco
uno veintidós
uno dosJScript Objects
$numeral_date_wo_year_past.Month._value: integer$numeral_date_wo_year_past.Month._attributes.name: string ("Common")$numeral_date_wo_year_past.Day._value: integer$numeral_date_wo_year_past.Day._attributes.name: string ("Common")$numeral_date_wo_year_past.Year: $Year$numeral_date_wo_year_past._attributes.name: string ("PreciseDate")
Back to table
numeral_date_w_year
Description
Recognizes the numeric expression of a valid month (1—12), day (1—31), and year combination. The combinations 2-30 and 2-31 are not recognized. Single-digit numbers can be expressed in two-digit form where the word zero precedes the name of the single-digit. Returns a $Year object for the year. See the Year rule for more information. Returns a combination of string and integer values for month and day.Examples
siete once cero cinco
uno uno cero uno
uno uno dos mil unoJScript Objects
$numeral_date_w_year.Month._value: integer$numeral_date_w_year.Month._attributes.name: string ("Common")$numeral_date_w_year.Day._value: integer$numeral_date_w_year.Day._attributes.name: string ("Common")$numeral_date_w_year.Year: $Year$numeral_date_w_year._attributes.name: string ("PreciseDate")
Back to table
regular_precise_date
Description
Recognizes a date consisting of the name of a month and a day number expressed as an ordinal number from 1st through 31st. In expressions where the name of the month is spoken before the day number, the word the can optionally precede the day number. Also recognizes a date spoken as "the ordinal of month". Also recognizes a year value if spoken. If a year value is not spoken, the year value returned by this rule is set to the current year. Returns a $Year object for the year. See the Year rule for more information. Returns a combination of string and integer values for month and day. See the Date ruleset document for examples of precise_date returns.Examples
tres de junio
tres de junio mil cincuenta y ocho
tres de junio dos mil cincuenta y ochoJScript Objects
$regular_precise_date.Year: $Year$regular_precise_date.Month._value: integer$regular_precise_date.Month._attributes.name: string ("Derived", "Assumed", "Common")$regular_precise_date.Day._value: integer$regular_precise_date.Day._attributes.name: string ("Common")$regular_precise_date._attributes.name: string ("PreciseDate")$regular_precise_date._attributes.invalidDate: optional string ("true")
Back to table
regular_precise_date_future
Description
Recognizes a date consisting of the name of a month and a day number expressed as an ordinal number from 1st through 31st. In expressions where the name of the month is spoken before the day number, the word the can optionally precede the day number. Also recognizes a date spoken as "the ordinal of month". Also recognizes a year value if spoken. If a year value is not spoken, the year value returned by this rule is set to either the current year or the next year depending on which year places the month and day in the immediate future relative to the current date. Returns a $Year object for the year. See the Year rule for more information. Returns a combination of string and integer values for month and day. See the Date ruleset document for examples of precise_date returns.Examples
tres de junio
tres de junio dos mil cincuenta y ochoJScript Objects
$regular_precise_date_future.Year: $Year$regular_precise_date_future.Month._value: integer$regular_precise_date_future.Month._attributes.name: string ("Derived", "Assumed", "Common")$regular_precise_date_future.Day._value: integer$regular_precise_date_future.Day._attributes.name: string ("Common")$regular_precise_date_future._attributes.name: string ("PreciseDate")$regular_precise_date_future._attributes.invalidDate: optional string ("true")
Back to table
regular_precise_date_past
Description
Recognizes a date consisting of the name of a month and a day number expressed as an ordinal number from 1st through 31st. In expressions where the name of the month is spoken before the day number, the word the can optionally precede the day number. Also recognizes a date spoken as "the ordinal of month". Also recognizes a year value if spoken. If a year value is not spoken, the year value returned by this rule is set to either the current year or the last year depending on which year places the month and day in the immediate past relative to the current date. Returns a $Year object for the year. See the Year rule for more information. Returns a combination of string and integer values for month and day. See the Date ruleset document for examples of precise_date returns.Examples
tres de junio
tres de junio mil cincuenta y ochoJScript Objects
$regular_precise_date_past.Year: $Year$regular_precise_date_past.Month._value: integer$regular_precise_date_past.Month._attributes.name: string ("Derived", "Assumed", "Common")$regular_precise_date_past.Day._value: integer$regular_precise_date_past.Day._attributes.name: string ("Common")$regular_precise_date_past._attributes.name: string ("PreciseDate")$regular_precise_date_past.invalidDate: optional string ("true")
Back to table
DayOfWeek
Description
Recognizes the names of days of the week. Value is of type integer, from 0 through 6, where Sunday=0 and Saturday=6.Examples
miércoles
sábadoJScript Objects
$DayOfWeek._value: integer
Back to table
RelativeMonth
Description
Recognizes either a month name, or expressions equivalent to last month, this month, or next month. Value is of type integer from 1 through 12 for month names where January=1 and December=12. For last month, this month, and next month, returns -1, 0, and 1 respectively. Does not recognize an expression of the year, but can optionally return the values produced by the Year rule.Examples
julio
mes próximo
pasado mesJScript Objects
$RelativeMonth.Month._value: integer$RelativeMonth.Year: $Year (optional)
Back to table
MonthWithOptionalYear
Description
Same as the RelativeMonth rule, except that this rule also recognizes an expression of the year, as well as expressions equivalent to this coming month, the coming month, and the previous month. Returned values are the same as those returned by the RelativeMonth rule, even if an expression of the year is recognized, and regardless of whether the year expressed occurred in the past, or will occur in the future. For example, the utterances July 2000 and July 2009 both return the same value (7).Examples
julio
próximo mes
este mes
diciembre diecinueve noventaiunoJScript Objects
$MonthWithOptionalYear.Month._value: integer$MonthWithOptionalYear.Year: $Year (optional)
Back to table
HardDBwDeadline
Description
Recognizes a relative time expression describing a block of time that extends into the future. Value for the end date of the date block is a $DateFuture object that can contain integers and strings. See the DateBlock ruleset document for examples.Examples
en aproximadamente tres semanas
en los próximos diez días
antes de esta navidad
para el próximo lunesJScript Objects
$HardDBwDeadline.Deadline: $DateFuture
Back to table
HardDBwStartDate
Description
Recognizes a relative time expression describing a block of time which began in the past. Value for the start date of the time block is a $DatePast object that can contain integers and strings. See the DateBlock ruleset document for examples.Examples
en más o menos las últimas tres semanas
en los pasados diez días
luego de esta navidad
después del próximo jueves
desde el once de septiembreJScript Objects
$HardDBwStartDate.StartDate: $DatePast
Back to table
HardClosedDB
Description
Recognizes an expression describing a block of time with a specific start date and end date. Values for start date and end date are $Date objects that can contain integers and strings. See the DateBlock ruleset document for examples.Examples
entre hoy y el próximo miércoles
desde el año nuevo de este año hasta el día del trabajo
empiece desde el día del trabajo hasta el año nuevo
entre el primero de julio hasta el treinta de septiembreJScript Objects
$HardClosedDB.StartDate: $Date$HardClosedDB.EndDate: $Date
Back to table
SoftClosedDB
Description
Recognizes an expression describing a block of time with a start date and end date that are relative to the numbered weeks, quarters, or halves of months or years. Values for start date and end date are $Date objects that can contain integers and strings. See the DateBlock ruleset document for examples.Examples
en la primera semana de junio
segunda mitad del mes que viene
la primera mitad del año próximo
el primer trimestre del año dos cero cero cuatro
la última semana del próximo mes
próximo mes
año dos milJScript Objects
$SoftClosedDB.StartDate: $Date$SoftClosedDB.EndDate: $Date
Back to table
EvaluatedRelativeDB
Description
Recognizes an expression describing a block of time in terms of weeks or weekends that is relative to the current date. Values for the start date and end date of the date block are $Date objects that can contain integers and strings. See the DateBlock ruleset document for examples.Examples
este semana
próximo fin de semana
el fin de semana antepasado
la semana pasada
la semana próximaJScript Objects
$EvaluatedRelativeDB.StartDate: $Date$EvaluatedRelativeDB.EndDate: $Date
Back to table
ApproximatedDB
Description
Recognizes an expression describing an approximate block of time in terms of days, weeks, months, or years. The units of time (days, weeks, months, years) can be modified by the adjectives previous, past, last, next, coming, following, and by the fuzzy quantifiers few, couple, or several, but not by numeric values such as two or three. Value is of type string.Examples
dentro del próximo día
dentro del pasado par de semanas
en el siguiente par de meses
pronto
en las semanas anterioresJScript Objects
$ApproximatedDB.ApproximatedDateBlock._value: string ("WithinAFewDays", "WithinAFewWeeks", "WithinAFewMonths", "WithinAFewYears", "Soon", "InThePastFewDays", "InThePastFewWeeks", "InThePastFewMonths", "InThePastFewYears", "Recently" )
Back to table