Browse
 
Tools
Rss Categories

Methods

11 LVGrammar::GetParseTree

Return the parse tree object with the specified index. Function LVParseTree GetParseTree(int index) Parameters index The index of the parse tree handle to be returned. It should be in the range [0, (GetNumberOfParses() -1) ]. Return Values NULL The index…

12 LVGrammar::GetTagFormat

Return the interpretation tag format setting for the grammar. Function const char* GetTagFormat() Parameters None. Return Values The tag format of the grammar. See Also LVGrammar C++ API Summary LVGrammar::SetTagFormat LVGrammar_GetTagFormat (C API)

13 LVGrammar::InterpretParses

Generate semantic interpretation results from the parse trees generated by the previous call to ParseSentence. Function int InterpretParses() Parameters None. Return Values Non Negative integer Number of available interpretations. Remarks Always call ParseSentence…

14 LVGrammar::LoadGrammar

Loads a grammar from a local file or remote file via http or ftp. Grammar can be written in ABNF or XML notations. Function int LoadGrammar(const char* grammar_location) Parameters grammar_location A file descriptor or uri that points to a valid SRGS grammar…

15 LVGrammar::LoadGrammarFromBuffer

Loads a grammar from a null terminated string buffer. Grammar can be written in ABNF or XML notations. Function int LoadGrammarFromBuffer(const char* gram_contents) Parameters gram_contents A null terminated string containing the contents of a valid SRGS…

16 LVGrammar::LVGrammar

Functions LVGrammar() LVGrammar(GrammarLogCB log, void* userdata) LVGrammar(const LVGrammar& other) Parameters log Error / warning reporting callback function pointer. userdata The logging callback function pointer. other Existing grammar object. Remarks…

17 LVGrammar::operator =

Assignment operator. Function LVGrammar& operator = (const LVGrammar& other) Parameters other Existing grammar object. See Also LVGrammar C++ API Summary LVGrammar_Copy (C API)

18 LVGrammar::ParseSentence

Use a loaded grammar object to parse a sentence. Function int ParseSentence(const char* sentence) Parameters sentence The sentence to parse. Return Values 0 The sentence is not covered by the grammar. non-0 The number of distinct parses. Example Assume a…

19 LVGrammar::RegisterLoggingCallback

Registers a callback so the object can report warnings and errors to the grammar author via the callback function. Function void RegisterLoggingCallback (GrammarLogCB log, void* userData) Parameters log The logging callback function pointer. userdata The…

20 LVGrammar::RemoveRule (Deprecated)

LVGrammar::RemoveRule (Deprecated) Remove rules to a grammar object. Function int RemoveRule(const char* rule_name) Parameters rule_name The name of the rule Return Values LV_SUCCESS No errors; the rule has been successfully added or removed. LV_GRAMMAR_SYNTAX_WARNING…