Rule Activation

To begin using a context-free grammar to recognize speech, the application must first activate a specific rule in the grammar. This puts the rule at the starting node of the recognition.

Continuing the examples described at the beginning of this section, if an application activates the <Actions> rule, the speaker can say "Send mail to Bob Marks." However, if the application activates the <Names> rule instead, the user can say "Bob Marks" but cannot say "Send mail to Bob Marks."

Note that a grammar can have several rules activated at one time. For example, if both <Actions> and <Names> are activated, the speaker can say "Send mail to Bob Marks" or "Bob Marks."

The context-free grammar format requires a list of all of the rules that can be activated (called exported rules). Grammar designers should keep this list to a minimum because the efficiency of the grammar — both the processing required and the accuracy of recognition — can be affected by the number of exported rules.