LVParseTree_Node API

An LVParseTree is made out of Node objects.  Each node represents a word, rule, or tag that  was seen by the engine as it decoded an utterance against the matching grammar.

Use <LVSpeechPort.h> or <LV_SRE_ParseTree.h>

Return Type

Function

Description

 

 

 

H_PARSE_TREE_NODE

LVParseTree_Node_GetParent (H_PARSE_TREE_NODE Node)

Provides access to the parent node of this node.  Note: the parent of the tree's root node is NULL.

H_PARSE_TREE_CHILDREN_ITR

LVParseTree_Node_CreateChildrenIteratorBegin(H_PARSE_TREE_NODE Node)

Traverses the immediate children of this node.

H_PARSE_TREE_CHILDREN_ITR

LVParseTree_Node_CreateChildrenIteratorEnd(H_PARSE_TREE_NODE Node)

Marks the end of traversal for the ChildrenIterator

H_PARSE_TREE_ITR

LVParseTree_Node_CreateIteratorBegin(H_PARSE_TREE_NODE Node)

Provides an iterator that walks each node in the sub tree rooted by this node in a top-to-bottom, left-to-right fashion.

H_PARSE_TREE_ITR

LVParseTree_Node_CreateIteratorBegin(H_PARSE_TREE_NODE Node)

Marks the end of traversal for the parse tree iterator

H_PARSE_TREE_TERMINAL_ITR

LVParseTree_Node_CreateTerminalIteratorBegin(H_PARSE_TREE_NODE Node)

Traverses the terminals(words) of the subtree rooted by this node.

LH_PARSE_TREE_TERMINAL_ITR

LVParseTree_Node_CreateTerminalIteratorEnd(H_PARSE_TREE_NODE Node)

Marks the end of traversal for the TerminalIterator.

H_PARSE_TREE_TAG_ITR

LVParseTree_Node_CreateTagIteratorBegin(H_PARSE_TREE_NODE Node)

Traverses the tags  (semantic data) in the subtree rooted by this node.

H_PARSE_TREE_TAG_ITR

LVParseTree_Node_CreateTagIteratorEnd(H_PARSE_TREE_NODE Node)

Marks the end of traversal for the TagIterator.

int

LVParseTree_Node_IsRule (void)

Returns true if this node represents a matched rule in a grammar.  Note: rule nodes are the only nodes that can have children.  The children of a rule node match the right hand side of the grammar rule that is represented by this node.

int

LVParseTree_Node_IsTerminal (void)

Returns true if this node represents a terminal (word) in a grammar.  Note: the parent of a terminal node is always a rule in the matching grammar that contains this terminal.

int

LVParseTree_Node_IsTag (void)

Returns true if this node represents a tag (semantic data) in a grammar.  Note: the parent of a tag node is always a rule in the matching grammar that contains this tag.

 

 

 

const char*

LVParseTree_Node_GetText (void)

For a rule node, this is the partial sentence that caused the rule to match.
For a terminal node, this is the word that the node represents.
For a tag node, this is the tag data.

const char*

LVParseTree_Node_GetPhonemes (void)

For a rule node, this is the phonetic pronunciation of the partial sentence that caused the rule to match.
For a terminal node, this is the phonetic pronunciation of the word that was spoken.
For a tag node, this is empty.

const char*

LVParseTree_Node_GetRuleName (void)

For a rule node, this is the name of the rule being represented.
For a tag or terminal node, this is the name of the node's parent.

int

LVParseTree_Node_GetScore (void)

For a rule node, this is the confidence of the rule being matched.
For a terminal node, this is the confidence of the word being spoken.
For a tag node, this is the parent rule's score.

int

LVParseTree_Node_GetStartTime (void)

For a rule node, this is the the start time of the first word that matched this rule (elapsed time from the start of the utterance, in milliseconds).
For a terminal node, this is the start time of the word.
For a tag node, this is the start time of the first word after the tag/ the end time of the last word before the tag.

int

LVParseTree_Node_GetEndTime (void)

For a rule node, this is the the end time of the last word that matched this rule (elapsed time from the start of the utterance, in milliseconds).
For a terminal node, this is the end time of the word.
For a tag node, this is the start time of the first word after the tag/ the end time of the last word before the tag.

 

 

 

 

 

 

 

 


Complete Help Topic List | Speech Engine Product Information