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>

Return Type

Function

Description

 

 

 

 

Node(void)

Constructs an empty node.

 

Node(const Node& other)

Copy constructor

LVParseTree::Node&

operator=(const Node& other)

Assignment operator

 

~Node(void)

destructor

 

 

 

LVParseTree::Node

Parent (void)

Provides access to the parent node of this node.  Note: the parent of the tree's root node has an empty parent.

LVParseTree::ChildrenIterator

ChildrenBegin (void)

Traverses the immediate children of this node.

LVParseTree::ChildrenIterator

ChildrenEnd (void)

Marks the end of traversal for the ChildrenIterator

 

 

 

LVParseTree::Iterator

SubTreeBegin (void)

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

LVParseTree::Iterator

SubTreeEnd (void)

Marks the end of traversal for the parse tree iterator

LVParseTree::TerminalIterator

TerminalsBegin (void)

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

LVParseTree::TerminalIterator

TerminalsEnd (void)

Marks the end of traversal for the TerminalIterator.

LVParseTree::TagIterator

TagsBegin (void)

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

LVParseTree::TagIterator

TagsEnd (void)

Marks the end of traversal for the TagIterator.

 

 

 

bool

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.

bool

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.

bool

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*

Text (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*

Phonemes (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*

RuleName (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

Score (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

StartTime (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

EndTime (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