Getting the Semantic Interpretation Data

After a decode, one or more legal parses may match the decoded utterance.  For each match, semantic interpretation data can be returned.

Example

Suppose you load the phone_number grammar into the speechport,

And the Speech Engine decoded:

eight five eight seven o seven o seven o seven

Then there would be one interpretation, and it would look like the following as XML:

<areacode>
         858
</areacode>
<number>
         7070707
</number>

Or like this as an ECMAScript object declaration:

{
     areacode: "858",
     number: "7070707",
}

To get the interpretation data, you can either get the interpretation string, an xml formation of the data, or get an interpretation data object:

In addition, there are also functions to tell you the grammar that generated the interpretation data, as well as the mode, language, and top-level rule of that grammar.

C++ API

const char*    LVSpeechPort::GetInterpretationString(int voicechannel, int index);

LVSemanticData LVSpeechPort::GetInterpretationData(int voicechannel, int index);

const char* LVSpeechPort::GetInterpretationGrammarLabel(int voicechannel, int index);

const char* LVSpeechPort::GetInterpretationLanguage(int voicechannel, int index);

const char* LVSpeechPort::GetInterpretationMode(int voicechannel, int index);

const char* LVSpeechPort::GetInterpretationTopLevelRule(int voicechannel, int index);

C API

const char* LV_SRE_GetInterpretationString(HPORT hport, int voicechannel, int index);

H_SI_DATA   LV_SRE_GetInterpretationData(HPORT hport, int voicechannel, ind index);

const char* LV_SRE_GetInterpretationGrammarLabel(HPORT hport, int voicechannel, int index);

const char* LV_SRE_GetInterpretationLanguage(HPORT hport, int voicechannel, int index);

const char* LV_SRE_GetInterpretationMode(HPORT hport, int voicechannel, int index);

const char* LV_SRE_GetInterpretationTopLevelRule(HPORT hport, int voicechannel, int index);

See Also

 


Complete Help Topic List | Speech Engine Product Information