Additional Publicly Scoped Rules for French (Canada)
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
trentième
deux mille sept cent cinquante-neuvième
quatre cent deuxièmeJScript 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
trentièmes
deux mille sept cent cinquante-neuvièmes
quatre cent deuxièmesJScript 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 quart
deux quarts
trois quarts
un demiJScript 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
trente
cinquante
quatre-vingt-dixJScript Objects
$tensfrag._value: integer
Back to table
onesfrag
Description
Recognizes a number from 1 through 19, inclusive. Value is of type integer.Examples
douze
dixJScript Objects
$onesfrag._value: integer
Back to table
teens
Description
Recognizes the numbers 10 through 19 inclusive. Value is of type integer.Examples
dix
quatorze
seizeJScript 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
vingt et une
un
dix billions dix milliards dix millions mille vingt-neufJScript 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
zéro
mille vingt-sept
mille six cent quatre-vingt-dix-septJScript 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
trois cent dix-neuf
trois cents
unJScript 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
un
dix billions dix milliards dix millions mille six cent quatre-vingt-quatorzeJScript 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
un
dix milliards dix millions mille cinquante-troisJScript 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
un
dix millions mille dixJScript 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
un
mille six cent quatre-vingt-dix-septJScript 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
trois cent quinze
deux
six cent neufJScript 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
neuf milliardième
quatre billionième
mille sept cent soixante-sixièmeJScript 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
quatre billionième
seizième
mille trois cent vingtièmeJScript 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
sept milliardième
seizième
mille trois cent vingtièmeJScript 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
sept millionièmes
seizième
mille trois cent vingtièmeJScript 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
trois cent vingt et unièmes
seizième
mille trois cent vingtièmeJScript 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
trois cent vingt et unièmes
seizième
trois centièmesJScript 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
dix dix
dix dix dix dix dix dix dix dix dix dix dix dix dix dix dix dix dix dix dix vingt-six
un deux trois quatre cinqJScript 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
quarante
cinquante
quatre-vingt-dixJScript 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
zéro zéro
zéro un
vingt
vingt-quatreJScript Objects
$twodigit._value: integer
Back to table
digit
Description
Recognizes the single digit numbers 0 through 9 inclusive. Value is of type integer.Examples
huit
neuf
septJScript 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
deux
quatre
unJScript 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
zéro neuf
deux mille et sept
l'an mille neuf cents quatre-vingt-dix-neuf
l'année zéro quatre
cette annéeJScript 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
vingt-deux
trente et un
sixJScript 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
janvier
décembreJScript 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
trente et un
vingt-trois
vingtJScript Objects
$one2thirtyone._value: integer
Back to table
one2twelve
Description
Recognizes the cardinal numbers 1 through 12. Value is of type integer.Examples
huit
neuf
sixJScript 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
dix-sept
l'année deux mille dix-neuf
mille cinq cent cinq
l'an passéJScript 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
l’année deux mille deux
l’année mille neuf cent cinq
l’année quatre-vingt-dix-neuf
l’année deux mille un
l’année deux mille onze
l’année prochaine
cette annéeJScript 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
deux neuf
trois six
six dix-septJScript 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
trois trente et un
zéro six quatre
quatre septJScript 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
deux dix-sept
trois un
cinq sixJScript 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
deux un quatre-vingt-quatorze
deux un trente et un
deux un mille six cent onzeJScript 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
trente juin dix-huit
trente juin mille six cent sept
trente juin mille cinq centsJScript 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
trente juin dix-huit
trente juin deux mille six cent sept
trente juin deux mille cinq centsJScript 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
trente juin dix-huit
trente juin mille six cent sept
trente juin mille cinq centsJScript 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
dimanche
samediJScript 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
juillet
mois prochain
mois dernierJScript 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
juillet
mois prochain
mois dernier
décembre mille neuf cent quatre-vingt-dix-neufJScript 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
dans environs trois semaines
avant ce noël
d’ici lundi prochain
plus tôt que le premier septembreJScript 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
dans environs les trois dernières semaines
dans les dix jours passés
plus tard que ce noël
après jeudi prochain
depuis le onze septembreJScript 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 aujourd’hui et mercredi prochain
du nouvel an cette année à la journée du travail
commence du jour de travail à la nouvelle année
entre le premier juillet au treize septembreJScript 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
dans la première semaine du juin
la deuxième moitié du mois prochain
le premier quart de l’année deux mille quatre
mois prochain
l’année deux milleJScript 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
cette semaine
ce week-end
l'avant-dernier week-end
la fin de semaine précédente
la fin de semaine prochaineJScript 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
dans le passé mois
d'ici la passée l'année
bientôt
d'ici la l'année suivanteJScript Objects
$ApproximatedDB.ApproximatedDateBlock._value: string ("WithinAFewDays", "WithinAFewWeeks", "WithinAFewMonths", "WithinAFewYears", "Soon", "InThePastFewDays", "InThePastFewWeeks", "InThePastFewMonths", "InThePastFewYears", "Recently" )
Back to table