Chinese Context tag definitions
The CONTEXT tag specifies the normalization of a block of text. The context tag ID attribute contains the text string specifying the type of normalization to apply to the text block. The ID attribute of the Chinese engine specific context tags begin with "CHS_". CONTEXT tag ID attribute strings that do not begin with quot;CHS_" use English context text normalization.
For example:
<CONTEXT ID = "CHS_My_Context"> 12/21/99 </CONTEXT>
Each context tag can contain more than one string.
For example:
<CONTEXT ID = "date_mdy"> 12/21/99 11/21/99 10/21/99 </CONTEXT>
is normalized to "Nine nine Nian twelve Yue twenty-one Ri nine nine Nian eleven Yue twenty-one Ri nine nine Nian ten Yue twenty-one Ri"
The following topics are covered in this section:
Date
This context specifies that the number passed to the engine is a date. Dates generally have the format of number [delimiter] number [delimiter] number or number [delimiter] number where the delimiter may be a '.', '/' or '-', and numbers are typically between 01 and 12 for months, 01 and 31 for days. A year is a two- or four-digit number.
If a date format does not fall within the range shown below, the application cannot expect a consistent result and the engine may interpret it freely. The valid string types are:
Date_mdy
The text specifying the date is normalized so that the first group of numbers is the month, the second group is the day and the third group is the year. In the case where the year is a two-digit number, the engine reads it as a two-digit number. In the case where the year is a four-digit number, the engine reads it as a four-digit number.
This a common tag with the English engine.
Date_dmy
The text specifying the date is normalized so that the first group of numbers is the day, the second group is the month and the third group is the year. In the case where the year is a two-digit number, the engine reads it as a two-digit number. If the year is represented as a four-digit number, it is represented as a four-digit year.
This a common tag with the English engine.
Date_ymd
The text specifying the date is normalized so that the first group of numbers is the year, the second group is the month and the third group is the day. In the case where the year is a two-digit number, the engine reads it as a two-digit number. If the year is represented as a four-digit number, it is represented as a four-digit year.
This a common tag with the English engine.
CHS_Date_ymdhm
The text specifying the date is normalized so that the first group of numbers is the year, the second group is the month, the third group is the day, the fourth group is the hour and the fifth group is the minute. In the case where the year is a two-digit number, the engine reads it as a two-digit number. If the year is represented as a four-digit number, it is represented as a four-digit year. The text format for time needs to specify the hour as a number between 00 and 23 (in case of with PM/AM before, between 01 and 12), and the minute as a number between 01 and 59.
This is a Chinese specific context tag.
Date_ym
The text specifying the date is normalized so that the first group of numbers is the year and the second group is the month. In the case where the year is a two-digit number, the engine reads it as a two-digit number. If the year is represented as a four-digit number, it is represented as a four-digit year.
This a common tag with the English engine
Date_my
The text specifying the date is normalized so that the first group of numbers is the month and the second group is the year. In the case where the year is a two-digit number, the engine reads it as a two-digit number. If the year is represented as a four-digit number, it is represented as a four-digit year.
This a common tag with the English engine.
Date_md
The text specifying the date is normalized so that the first group of numbers is the month and the second group is the day.
This a common tag with the English engine.
Date_dm
The text specifying the date is normalized so that the first group of numbers is the day and the second group is the month.
This a common tag with the English engine.
Date_year
The text specifying the date is normalized so that the number is read as a year. This year should be a four-digit number.
This a common tag with the English engine.
Time
This context specifies that the number passed to the engine is a time. Times generally have the format of number [delimiter] number [delimiter] number or number [delimiter] number where the delimiter is ':' and numbers are typically between 00 and 23 for hours (in case of with PM/AM before, it needs to be between 01 and 12), 00 and 59 for minutes and seconds.
When a zero is present in numbers between 01 and 09, the engine ignores it.
This is a Chinese engine specific context tag.
CHS_time_hms
The text specifying the time is normalized so that the first group of numbers is the hour, the second group is the minute and the third group is the second.
This is a Chinese engine specific context tag.
CHS_time_hm
The text specifying the time is normalized so that the first group of numbers is the hour and the second group is the minute.
This is a Chinese engine specific context tag.
Number
This context specifies how to read the number passed to the engine.
- number_cardinal
- number_digit
- number_fraction
- number_decimal
- CHS_number_percentage
- CHS_number_scientific
number_cardinal
The text is normalized as a number using the regular format of ones, tens, etc.
This a common tag with the English engine.
number_digit
The text is normalized digit by digit.
This a common tag with the English engine.
number_fraction
The text is normalized as a fraction
This a common tag with the English engine.
number_decimal
The text is normalized as a decimal value.
This a common tag with the English engine.
CHS_number_percentage
The text is normalized as a percentage value.
This is a Chinese engine specific context tag.
CHS_number_scientific
The text is normalized as a scientific value.
This is a Chinese engine specific context tag.
Phone_Number/address_postal
The text is normalized as a phone number or address postal.
CHS_phone_postal
The phone number and address postal is almost the same as that of number_cardinal--the only difference is that "1" is read as "yao1"
This is a Chinese engine specific context tag.