This API is brief, because the functionality is parallel to functionality in LVSpeechPortABNF.h and SpeechParseTree.h
#include <LVSpeechGrammar.h>
#include <TextParseTree.h>
LV_SPEECH_GRAMMAR_NO_ERROR
LV_SPEECH_GRAMMAR_WARNING
LV_SPEECH_GRAMMAR_ERROR
class LVSpeechGrammarRepresents an SRGS-ABNF style grammar description |
|
|
int AddRule (const char* rule_name, const char* rule_expansion) |
|
|
int RemoveRule (const char* rule_name) |
see LVSpeechPortABNF_RemoveRule |
|
int SetRoot (const char* rule_name) |
see LVSpeechPortABNF_SetRoot |
|
int ValidateGrammar () |
see LVSpeechPortABNF_ValidateGrammar |
|
int LoadGrammarFromFile (const char* filename_or_url) |
|
|
void RegisterLoggingCallback(GrammarLogCallback CB, void* data) |
The callback function needs to be of the form: void CB(const char* msg, int error_level, void* data) |
|
|
|
class LVTextParserRepresents a compiled parsing tool, for parsing text sentences using a given grammar. |
|
|
LVTextParser (const LVSpeechGrammar& Grammar) |
Initialized by an LVSpeechGrammar object |
|
int ParseText (const char* sentence) |
returns the number of successful parses |
|
const TextParseTree& GetParseTree(int index) |
|
|
int GetNumberOfParses() |
same return value as the previous call to ParseText |
|
|
|
class TextParseTreeRepresents a parse tree (sentence diagram) for a given sentence and grammar |
see class SpeechParseTree |
Complete Help Topic List | Speech Engine Product Information