Chapter 16. Creating Grammars


The development of grammars is a key part of the creation of effective voice user interfaces. Grammar development goes hand-in-hand with the choice of dialog strategies and the crafting of prompts. The interacting goals of grammar development and detailed design are as follows:

  • To create a grammar that accommodates, as much as possible, what real callers will say

  • To craft the call flow, dialog strategies, and prompts in order to guide the caller to stay within the grammar

Clearly, these goals are interrelated. The grammar definition step described in Chapter 8 (definition of the slots and sample phrases for the grammars for each dialog state) is one part of achieving these goals. In general, the grammar writer and the dialog designer must collaborate. A lack of communication can lead to poor solutions to design challenges. For example, if you observe, during the tuning phase, a high out-of-grammar rate, it may imply the need to extend the grammar. Alternatively, it may imply the need to write a prompt that provides the caller greater clarity about what can be said.

A key skill for grammar writing is the ability to imagine the variety of ways callers will express themselves. This skill improves with experience and benefits from linguistic knowledge. However, neither knowledge nor experience, nor even great skill at introspection about your own language use, is enough to ensure high coverage. Grammar development must include the opportunity to extend and refine grammars based on data from real calls to a working system.

Keep in mind that adding new paths to grammars so that they accommodate a greater range of caller input creates new recognition challenges; for example, there will be new opportunities for ambiguities and confusions during the recognition search. Therefore, the goal is to maximize coverage and minimize overcoverage in other words, to maximize inclusion in the grammar of word strings (words, phrases, and sentences) callers are likely to say, while minimizing inclusion of word strings rarely or never spoken. Only analysis of real caller data can ensure that you will accomplish this goal.

Earlier sections of the book discuss two primary approaches to grammar: rule-based and statistical. Rule-based grammars involve an explicit definition of all word strings, whereas statistical grammars involve learning the probabilities of the various possible word strings from data. Keep in mind that grammars, as discussed here, include both a syntactic component (a description of possible word strings) and a semantic component (a description of the meaning associated with each word string). In rule-based grammars, the syntactic and semantic definitions are combined. Natural language interpretation directives are embedded within the grammar rules. In contrast, with statistical grammars, the definition of the syntax is usually separate from the definition of the semantics. One (or more than one) file defines the statistics of possible word strings. This is the grammar that defines the search space for recognition. A separate file, used for natural language understanding, defines the mapping from word strings to meanings. The technique for defining the semantics may itself be either rule-based or statistical. These variations are discussed later.

Before we dive into the details of grammar creation, there is one point worth reiterating. As you create a voice user interface, there are many times throughout the entire process when you may refine prompt wording, sometimes in subtle ways. Beyond detailed design, you may refine prompts during tuning. Sometimes you will even refine prompts during the recording session, when the voice coach hears something that doesn't quite work. Whenever a prompt is changed, there are two constituencies who must be notified: the grammar developer (because even subtle changes in wording may imply grammar changes or additions) and the prompt designer (to make sure that the change accords with the larger context in which the design was created, such as considerations of consistency in terminology and persona).

The following sections cover the development, testing, and tuning phases of grammar creation. In each section, we discuss the process for the rule-based and the statistical grammar approach.



Voice User Interface Design 2004
Voice User Interface Design 2004
ISBN: 321185765
EAN: N/A
Year: 2005
Pages: 117

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net