The AirSF CommandTalk grammar and vocabulary browser defines the voice commands you can give to AirSF CommandTalk. To be more precise, it defines the sequences of words that the speech recognizer is prepared to accept. If you say something that is not within the language defined by the AirSF CommandTalk grammar and vocabulary, the recognizer will not be able to correctly understand what you have said. It may think you have said some other sequence of words permitted by the grammar and vocabulary, or it may not come up with any sequence of words at all.
You should also be aware that some of the word sequences permitted by
this grammar and vocabulary may be recognized correctly, but still may
not be executed correctly as an application command. Some of these
word sequences may not be sensible application commands, but some may
be reasonable commands that are simply not fully implemented in later
stages of processing. In either case, the system will try to explain
what the problem is.
Basic Grammar Rules
A grammar consists of a set of rules defining grammar categories in
terms of sequences of other grammar categories and/or words. A
category is simply a type of word or phrase that we have defined to
help us enumerate the commands that the system understands. Every
voice command that AirSF CommandTalk can understand can be constructed by
expanding the definition of one of the top-level categories shown on
the grammar browser home page. If
there is more than one top-level category shown there, it means that
the system expects different commands in different situations.
Consult the AirSF CommandTalk User's Manual for an explanation of when
different top-level categories can be used.
Here is a possible grammar rule defining the natural ways to say
the numbers 0 through 99 (Note that all the examples on this page are
for illustrative purposes only, and do not necessarily correspond to
the actual AirSF CommandTalk grammar):
Categories are written in italics and enclosed in angle brackets. The category being defined (the head of the
rule) appears at the top of the rule and to the left. In
this example, the head of the rule is <number-to-99>. The remaining lines (the body of the
rule) list the different ways that the head category can be
expressed. This rule gives four ways of saying numbers from 0
through 99: either a digit, or a "teen" number ("ten","eleven",
"twelve", etc.), a decade number ("twenty", "thirty",
"forty", etc.), or a decade number followed by a nonzero digit.
The rule defining the category for digits might be expressed as
follows:
zero
This says that a digit can be either the word "zero" or a nonzero
digit.
Recursive Grammar Rules
Most grammar rules simply define how a category is composed out of
sequences of other categories and words. A recursive grammar rule is
a special type of rule in which a category appears inside its own
definition. For example, we could define a digit sequence to be a
list of any number of digits as follows:
This says a digit sequence can be either a single digit, or a single
digit followed by a digit sequence. Rules such as this are used to
allow a category to contain an arbitrary-length sequence of subphrases
or words inside it. In this case, a digit sequence must contain a
digit, but it may optionally contain another digit sequence following
the first digit. This lets us string together as many digits as we
wish to form a digit sequence.
Browsing the Grammar
The AirSF CommandTalk grammar and vocabulary browser is implemented as a
set of inter-linked pages designed to be browsed with a World Wide Web
browser (such as Netscape Navigator). The principal way of browsing
is simply to follow the links associated with each of the categories
that appear in a grammar rule. Selecting (clicking on) a category in
the body of the rule shows the rule that defines
that category. Thus, selecting the category <digit> from
the body of the first sample rule presented
above takes you to a page containing the second
sample rule. This lets you start at the top of the grammar and
work your way down to find the words that are used to give any
particular command. To go back up the way you came down, simply use
the "back" button of your web browser.
Selecting the head of a rule shows all the other rules in which that category is used. For example, if you go to the page that defines <nonzero-digit> and select the head of the rule, you will get to a page containing the following:
The rules that use the category "<nonzero-digit>" are:Two things that should be noted about the pages that show how categories are used are
- <number-to-99>
- <digit>
The grammar can also be browsed bottom up from the vocabulary list. This lists all the words and fixed phrases in the vocabulary, with each one linked to a page showing all the rules that use the word or phrase, in the same form as the pages that show all the rules that use a particuarly category. If the vocabulary is large, you may find it useful to employ the search feature of your web browser (the "find" button in Netscape Navigator) to locate the item you are looking for in the vocabulary list.
Finally, once you have gained some familiarity with the categories of the grammar, you may find the category list useful. This lists all the categories in the grammar (except the top-level categories) as follows:
Selecting![]()
<decade>
![]()
<digit>
![]()
<digit-sequence>
![]()
<nonzero-digit>
![]()
<number-to-99>
![]()
<teen>
shows all the rules that use
a category, and selecting
shows how
the category is defined.
All of these methods of entering the browser are available at the top of every page, where a variant of the following selection menu is presented: