A method and apparatus are described for specifying arbitrary words in a
rule-based grammar, such as a context-free grammar. A wildcard identifier
is used in a context-free grammar file in place of a predefined category
of words. Artificial phoneme combinations that represent generic words in
a speech engine's vocabulary database, and that represent pronunciations
of the predefined category of words are defined by rules. A speech engine
uses the artificial phoneme combinations to determine acceptable words to
listen to, and generates a results object comprising generic words
corresponding to the artificial phoneme combinations, as well as
non-generic words that do not exist in a given CFG, where the generic and
non-generic words exist in the speech engine's vocabulary database. The
word having the highest confidence level that is not a generic word is
selected as the word most likely to have been spoken by the user.