LVParseTree::Node

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>

Function Return Type Description
Node(void) XXXXXX Constructs an empty node.
Node(const Node& other) XXXXXX Copy constructor
operator=(const Node& other) LVParseTree::Node& Assignment operator
~Node(void) XXXXXX destructor
Parent (void) LVParseTree::Node Provides access to the parent node of this node. Note: the parent of the tree's root node has an empty parent.
ChildrenBegin (void) LVParseTree::ChildrenIterator Traverses the immediate children of this node.
ChildrenEnd (void) LVParseTree::ChildrenIterator Marks the end of traversal for the ChildrenIterator
SubTreeBegin (void) LVParseTree::Iterator Provides an iterator that walks each node in the sub tree rooted by this node in a top-to-bottom, left-to-right fashion.
SubTreeEnd (void) LVParseTree::Iterator Marks the end of traversal for the parse tree iterator
TerminalsBegin (void) LVParseTree::TerminalIterator Traverses the terminals(words) of the subtree rooted by this node.
TerminalsEnd (void) LVParseTree::TerminalIterator Marks the end of traversal for the TerminalIterator.
TagsBegin (void) LVParseTree::TagIterator Traverses the tags  (semantic data) in the subtree rooted by this node.
TagsEnd (void) LVParseTree::TagIterator Marks the end of traversal for the TagIterator.
IsRule (void) bool 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.
IsTerminal (void) bool 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.
IsTag (void) bool 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.
Text (void) const char* 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.
Phonemes (void) const char* 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.
RuleName (void) const char* 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.
Score (void) int 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.
StartTime (void) int 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.
EndTime (void) int 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.
© 2012 LumenVox LLC. All rights reserved.