SR_SemanticGraph Struct Reference


Detailed Description

A Semantic Graph is a data structure representing acceptable phrases and their associated meaning. A graph is made up of nodes and arcs. Arcs are associated with input symbols and output symbols. Input symbols are words that may be spoken, and output symbols are symbols which allow for semantic interpretation. For example, certain output symbols are actually labels which map to script expressions (eScript expressions, similar to JavaScript). These expressions are interpreted by a Semantic Processor in order to determine meaning, such as spoken input symbol: "one", expression: "DIGIT.V='1'", semantic interpretation: "1".

Refer to the SR_SemanticProcessor.h documentation to find out more about parsing, and about semantic interpretation (eScript).

Data Fields

ESR_ReturnCode(* destroy )(struct SR_SemanticGraph_t *self)
ESR_ReturnCode(* load )(struct SR_SemanticGraph_t *self, wordmap *ilabels, const LCHAR *basename, int num_words_to_add)
ESR_ReturnCode(* unload )(struct SR_SemanticGraph_t *self)
ESR_ReturnCode(* save )(struct SR_SemanticGraph_t *self, const LCHAR *filename, int version_number)
ESR_ReturnCode(* addWordToSlot )(struct SR_SemanticGraph_t *self, const LCHAR *slot, const LCHAR *word, const LCHAR *tag, const ESR_BOOL maybeMultiMeaning)
ESR_ReturnCode(* reset )(struct SR_SemanticGraph_t *self)


Field Documentation

ESR_ReturnCode(* SR_SemanticGraph::destroy)(struct SR_SemanticGraph_t *self)

Destroys a semantic graph.

Parameters:
self SR_SemanticGraph handle

ESR_ReturnCode(* SR_SemanticGraph::load)(struct SR_SemanticGraph_t *self, wordmap *ilabels, const LCHAR *basename, int num_words_to_add)

Loads a semantic graph from disk.

Parameters:
self SR_SemanticGraph handle
ilabels Input word labels to be used when building the graph (The should be the same as the output word labels from the recognition graph/context.)
basename File to read graph from (.g2g image or basename for text files)
num_words_to_add Number of words to add dynamically (only applies when loading from text files)
Todo:
complete documentation

ESR_ReturnCode(* SR_SemanticGraph::unload)(struct SR_SemanticGraph_t *self)

Unloads a semantic graph.

Parameters:
self SR_SemanticGraph handle
Returns:
ESR_SUCCESS

ESR_ReturnCode(* SR_SemanticGraph::save)(struct SR_SemanticGraph_t *self, const LCHAR *filename, int version_number)

Saves the semantic graph as a binary image.

Parameters:
self SR_SemanticGraph handle
filename Name of the binary image file.
version_number Target file format version.

ESR_ReturnCode(* SR_SemanticGraph::addWordToSlot)(struct SR_SemanticGraph_t *self, const LCHAR *slot, const LCHAR *word, const LCHAR *tag, const ESR_BOOL maybeMultiMeaning)

Adds a word to the semantic graph at the specified slot. Tag may be defined or NULL.

Parameters:
self SR_SemanticGraph handle
slot Where to insert in graph (only ROOT supported right now)
word Word to add.
word Semantic Tag for the word.
maybeMultiMeaning Indicates that we MAY be adding alternate multiple meanings a previously added word

ESR_ReturnCode(* SR_SemanticGraph::reset)(struct SR_SemanticGraph_t *self)

Removes all words from the semantic graph.

Parameters:
self SR_SemanticGraph handle


Generated on Thu May 1 15:37:28 2008 for SREC by  doxygen 1.5.3