Use a loaded grammar object to parse a sentence.
int ParseSentence(const char* sentence)
sentence
The sentence to parse.
0
The sentence is not covered by the grammar.
non-0
The number of distinct parses.
Assume a grammar was defined as:
root $yes_no;
$yes_no = $yes | $no;
$yes = yes [please];
$no = no [thank you];
You can use this grammar to validate sentences as follows:
int count = grammar.ParseSentence("no thank you"); // returns 1
int count = grammar.ParseSentence("no thanks"); // returns 0
With this function, you can identify how well a grammar covers your targeted transcript set.
Complete Help Topic List | Speech Engine Product Information