A method for programming a grammar code for a speech-enabled computer program, comprising the steps of: enabling a plurality of natural command grammars containing respective representations of valid expressions for said speech-enabled computer program; providing as one of said valid expressions a plurality of ordered words virtually certain not to be uttered by someone not already aware of said plurality of ordered words; and, causing said program to automatically initiate a perceptible action in response to recognition of said plurality of ordered words. The method can further comprise the step of providing translation rules for said plurality of command grammars, wherein speech recognition of said plurality of ordered words invokes one of said translation rules, said invoked one of said translation rules initiating said perceptible action. The action can be activation of a predetermined printer function, displaying a predetermined message on a display device and printing a predetermined message.
A method for automatically generating a minimal set of test phrases for testing a natural commands grammar includes the steps of selecting a line of text in the natural commands grammar; forming a test phrase for the selected line of text; detecting a previous inclusion of the test phrase in the minimal set of test phrases; and, adding the test phrase to the minimal set of test phrases only if the test phrase has not been detected as having been previously included in the minimal set of test phrases in the detecting step.