Japanese Context tag definitions (SAPI 5.4)

Japanese Context tag definitions

The CONTEXT tag specifies the normalization of a block of text. This specification defines the SAPI predefined attributes (ID) for the CONTEXT tag. These IDs are strings. SAPI does not validate any parameters on the string passed to the engine, and hence, the application can specify engine-specific normalization IDs to the engine. Engine-specific strings begin with the engine vendor's name to avoid confusion between engines.

For example:
<CONTEXT ID = "MS_My_Context"> text </CONTEXT>

The exact implementation of some of these values is dependent on the engine in SAPI 5. In order to force a certain normalization, application developers can choose to normalize the text, or use another SAPI tag or engine-specific ID. Each context tag can contain more than one string.

For example:
<CONTEXT ID = "MS_My_Context"> text1 text2 text3 </CONTEXT>

A clearer example is shown in the following:

  example:
Ee125674.JPN_Context_Example(en-us,VS.85).gif

The following topics are covered in this section:

  • Date
  • Time
  • Number
  • Phone_Number
  • Currency
  • Web
  • Address

 

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 generally 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
  • date_dmy
  • date_ymd
  • date_ym
  • date_my
  • date_dm
  • date_md
  • date_year

 

Back to top

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 or a four-digit number.

Ee125674.JPN_date_mdy(en-us,VS.85).gif

Back to top

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 be represented as a four-digit year.

Ee125674.JPN_date_dmy(en-us,VS.85).gif

Back to top

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 be represented as a four-digit year.

Ee125674.JPN_date_ymd(en-us,VS.85).gif

Back to top

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 be represented as a four-digit year.

Ee125674.JPN_date_ym(en-us,VS.85).gif

Back to top

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 be represented as a four-digit year.

Ee125674.JPN_date_ym(en-us,VS.85).gif

Back to top

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.

Ee125674.JPN_date_dm(en-us,VS.85).gif

Back to top

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.

Ee125674.JPN_date_md(en-us,VS.85).gif

Back to top

date_year

The text specifying the date is normalized so that the number is read as a year.

Ee125674.JPN_date_year(en-us,VS.85).gif

Back to top

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 ':' or ''' or ' " 'and numbers are typically between 01 and 24 for hours, 01 and 59 for minutes and seconds.

When a zero is present in numbers between 01 and 09, the engine can ignore this, or normalize it as "oh". The engine can also place an "and" in the normalized time. The valid string types are:

Ee125674.JPN_time(en-us,VS.85).gif

Back to top

Number

  • number_cardinal
  • number_digit
  • number_fraction
  • number_decimal

 

Back to top

number_cardinal

The text is normalized as a number using the regular format of ones, tens, etc. The engine can place "and" in the normalized text.

Ee125674.JPN_number_cardinal(en-us,VS.85).gif

Back to top

number_digit

The text is normalized digit by digit.

Ee125674.JPN_number_digit(en-us,VS.85).gif

Back to top

number_fraction

The text is normalized as a fraction.

Ee125674.JPN_number_fraction(en-us,VS.85).gif

Back to top

number_decimal

The text is normalized as a decimal value.

Ee125674.JPN_number_decimal(en-us,VS.85).gif

Back to top

Phone_Number

The text is normalized as a phone number. The exact implementation of this is left to the engine developer and may be defined in a future release of SAPI. An example is provided below:

Ee125674.JPN_phone_number(en-us,VS.85).gif

Back to top

Currency

The text is normalized as a currency. The exact implementation of this is left to the engine developer and may be defined in a future release of SAPI. An example is provided below:

Ee125674.JPN_currency(en-us,VS.85).gif

Back to top

Web

web_url

The text is normalized as a URL. The exact implementation of this is left to the engine developer and may be defined in a future release of SAPI. An example is provided below:

Ee125674.JPN_web_url(en-us,VS.85).gif

Back to top

E-mail

E-mail_address

The text is normalized as e-mail. The exact implementation of this is left to the engine developer and may be defined in a future release of SAPI.

Ee125674.JPN_email_address(en-us,VS.85).gif

Back to top

Address

The text is normalized as an address. The exact implementation of this is left to the engine developer and may be defined in a future release of SAPI. An example is provided below:

Ee125674.JPN_address(en-us,VS.85).gif

Back to top