swirec_language_translation_table

Specifies a text file that maps language declarations in grammars to Nuance language codes.

Value

Path of a translation file

Default

(Recognizer language codes)

How to set

In Management Station set on the Nuance recognition service. If not using Management Station, set in a Recognizer configuration file (User-nrsxx.xml).

Usage

Useful if grammars contain language codes that are different than default codes, or if they contain abbreviations that are ambiguous.

Performance

After changing the value, evaluate the effect on runtime processing latency before applying the change to a production system.

The Recognizer uses this translation table if a grammar specifies an ambiguous xml:lang value.

You can copy the default translation file (provided with Recognizer) to an application or voice browser directory and modify the mappings. Then use this parameter to point to the new file.

Reasons for changing language mappings:

  • If your grammars use language strings that are not recognized by Recognizer, you can provide a new mapping. For example, if grammars specify "English-USA," you could map the value to "en-us."
  • If your grammars use abbreviated language strings that are ambiguous, you can map them explicitly. For example, does the string "en" indicate US English, UK English, Australian English, or Indian English? If the default translation makes incorrect assumptions about an abbreviation, correct them with a translation file of your own. For example, if the default translation table maps "fr" to "fr-ca" (Canadian French), you might change the mapping to "fr-FR" (French as spoken in France).

Each line in the file describes one mapping. The format is:

GrammarlangString<tab>RecognizerLangCode

For example:

en-uk<tab>en-gb
en<tab>en-us
de<tab>de-de
en<tab>en-us
es<tab>es-us
fr<tab>fr-ca
it<tab>it-it
ja<tab>ja-jp
ko<tab>ko-kr
nl<tab>nl-nl
pt<tab>pt-br
sv<tab>sv-se
zh<tab>zh-tw

Recognizer invokes the translation table when it detects a grammar-language-string that does not match a known language code. It performs the mapping and ensures that the language is loaded into the recognition engine. (If language is not installed, Recognizer returns an error to indicate invalid language.)

If Recognizer cannot find an exact match between the grammar-language-string and the GrammarlangString column of the translation file, it removes any suffix from the grammar-language-string and tries again. For example, it would change en-us-region to en-us and perform a second lookup in the translation file.

You can download the most recent languages available for the Recognizer from Nuance Network at Nuance Network. Click the Languages link under the Nuance Recognizer product.