![]() |
Cisco Customer Response Applications Editor Step Reference Guide (3.1)
|
|||||||||
Grammar Step Descriptions
![]() |
||||||||||
|
Table of ContentsGrammar Step DescriptionsCreate Language Grammar Create Menu Grammar Using Grammar Formats Grammar Step DescriptionsThe steps in the Grammar palette of the Cisco Customer Response Applications (CRA) Editor provide script designers with a way to specify a set of all possible spoken phrases and/or Dual Tone Multi-Frequency (DTMF) digits to be recognized by CRA applications and acted upon during run time.
This chapter contains the following sections: Figure 10-1 shows the steps in the Grammar palette as they appear in the Palette pane of the CRA Editor. Figure 10-1 Grammar Palette Steps Create Language GrammarUse the Language Grammar step to select a set of grammars based on the language context of the call. Grammar selection is based on the standard search for a matching language. For example, assuming a language context of {L[fr_FR], L[en_GB]}, the search would return the first grammar defined for the following languages: Figure 10-2 shows the customizer window for the Create Language Grammar step. Figure 10-2 Create Language Grammar Customizer Window Table 10-1 describes the properties of the Create Language Grammar step. Table 10-1 Create Language Grammar Properties To use the Create Language Grammar customizer window to select a set of grammars, perform the following procedure: ProcedureStep 1 From the Output Grammar drop-down menu, choose the variable that stores the language grammar information. Step 2 Click Add. The Add Language Grammar dialog box appears. (See Figure 10-3 .) Figure 10-3 Add Language Grammar Dialog Box Step 3 To choose the language to be added to the Language/Grammar list, take one of the following actions: The Define Language dialog box appears. (See Figure 10-4 .) Figure 10-4 Define Language Dialog Box The Define Language dialog box closes, and the name of the language appears in the Language text field of the Add Language Grammar dialog box. Step 4 From the Grammar drop-down menu, choose the Grammar variable that stores the grammar information for the language. Step 5 Click OK. The Add Language Grammar dialog box closes, and the names of the language and grammar appear in the Language and Grammar columns of the Create Language Grammar customizer window. Step 6 Repeat Steps 3 to 5 as needed to add languages and grammars as desired. (If you want to modify an existing language, click Modify. The Edit Language Grammar dialog box appears, which contains the same fields as the Add Language Grammar dialog box and is configured in the same way.) Step 7 Click OK. The Create Language Grammar customizer window closes. Create Menu GrammarUse the Create Menu Grammar step to create spoken word and/or DTMF menus in which the user makes a single choice from multiple options. Each step holds the equivalent phrases or digits for the menu in corresponding languages. For each Create Menu Grammar step you create, you must assign a script variable of type grammar as the output variable. By default, the actual language in which any grammar is played is determined by the language associated with the contact. When you define multiple grammars to be available, the script chooses a single grammar based on the language of the contact. Figure 10-5 shows the customizer window for the Create Menu Grammar step. Figure 10-5 Create Menu Grammar Customizer Window Table 10-2 describes the properties of the Create Menu Grammar step. Table 10-2 Create Menu Grammar Properties
To use the Create Menu Grammar customizer window to provide grammar for menus, perform the following procedure: ProcedureStep 1 From the Output Grammar drop-down menu, choose the variable that stores the menu grammar information. Step 2 Click Add. The Add Phrase dialog box appears. (See Figure 10-6 .) Figure 10-6 Add Phrase Dialog Box Step 3 In the Grammar field, enter a value directly or take one of the following actions: Step 4 In the Tag text field, enter a tag name. Tags for grammars are case-sensitive. Step 5 Click OK. The Add Phrase dialog box closes, and the names of the grammar and tag appear in the Grammar and Tag columns of the Create Menu Grammar customizer window. Step 6 Repeat Steps 3 to 5 as needed to add grammars and tags as desired. (If you want to modify an existing grammar, click Modify. The Edit Phrase dialog boxappears, which contains the same fields as the Add Phrase dialog box and is configured in the same way.) Step 7 To import a list of phrases and tags delimited by tabs from a text file, click Import. The Select a File dialog box appears. (See Figure 10-7 .) Figure 10-7 Select a File Dialog Box Step 8 Browse to the desired file, and then click Open. The Select a File dialog box closes, and the phrases and tags appear in the Grammar/Tag list of the Create Menu Grammar customizer window. Step 9 Click OK. The Create Menu Grammar customizer window closes. Using Grammar FormatsThe following sections describe the two types of grammar formats you can use to specify grammars: Using GSL File Grammar FormatThe CRA Engine uses a language called Nuance Grammar Specification Language (GSL). Table 10-3 describes sample expressions you can use to specify grammars in GSL. The following are examples of GSL language statements: In this example, the caller can say "I want" or "I need", followed by a number from zero to nine, and then either "pencil" or "pencils". Using the Digit File Grammar FormatThe Digit File Grammar Format (".digit") is based on Java Properties File, in which keys are defined as "dtmf-x", where "x" is from the set "0123456789*#ABCD" or one of "star" or "pound", where values are the corresponding tag to be returned when a key is pressed or recognized. You can also use an optional entry defined as "word=true" to specify that the word representation of each DTMF digit should be automatically included during a recognition.
|
|||||||||
|
|