Browse
 
Tools
Rss Categories

API Functions

11 LVGrammar_GetNumberOfInterpretations

Return the number of semantic interpretations created by the most recent call to LVGrammar_InterpretParses. Function int LVGrammar_GetNumberOfInterpretations(HGRAMMAR Grammar) Parameters Grammar A handle to the grammar. Return Values Non Negative integer…

12 LVGrammar_GetNumberOfMetaData

Return the number of meta data contained in the grammar. Function int LVGrammar_GetNumberOfMetaData(HGRAMMAR Grammar) Parameters Grammar A handle to the grammar. Example If the grammar has following lines: meta 'description' is 'example grammar'; meta 'date'…

13 LVGrammar_GetNumberOfParses

Return the number of parses created by the most recent call of LVGrammar_ParseSentence. Function int LVGrammar_GetNumberOfParses(HGRAMMAR Grammar) Parameters Grammar The handle to a grammar. Return Values 0 The sentence is not covered by the grammar. non-0…

14 LVGrammar_GetTagFormat

Return the interpretation tag format setting for the grammar, Function const char* LVGrammar_GetTagFormat(HGRAMMAR Grammar) Parameters Grammar The handle to a grammar. Return Values The tag format of the grammar. See Also LVGrammar C API Summary LVGrammar_SetTagFormat…

15 LVGrammar_InterpretParses

Generate semantic interpretation results from the parse trees generated by the previous call to LVGrammar_ParseSentence. Function int LVGrammar_InterpretParses(HGRAMMAR Grammar) Parameters Grammar A handle to a grammar. Return Values Non Negative integer…

16 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 LVGrammar_LoadGrammar(HGRAMMAR Grammar, const char* uri) Parameters Grammar A handle to the grammar object. uri A file descriptor…

17 LVGrammar_LoadGrammarFromBuffer

Loads a grammar from a null terminated string buffer.Grammar can be written in ABNF or XML notations. Function int LVGrammar_LoadGrammarFromBuffer(HGRAMMAR Grammar, const char* buffer) Parameters Grammar A handle to the grammar. buffer A null terminated string…

18 LVGrammar_ParseSentence

Use a loaded grammar object to parse a sentence. Function int LVGrammar_ParseSentence(HGRAMMAR Grammar, const char* sentence) Parameters Grammar A handle to the grammar. sentence The sentence to parse. Return Values 0 The sentence is not covered by the grammar.…

19 LVGrammar_RegisterLoggingCallback

Registers a callback so the object can report warnings and errors to the grammar author via the callback function. Function void LVGrammar_RegisterLoggingCallback (HGRAMMAR Grammar, GrammarLogCB log, void* userData) Parameters Grammar A handle to the grammar…

20 LVGrammar_Release

Destroy a grammar object. Function void LVGrammar_Release (HGRAMMAR Grammar) Parameters Grammar The handle to the grammar object to be released. Return Values The grammar objects created by LVGrammar_Create and LVGrammar_CreateFromCopy need to be explicitly…