LVSemanticData Summary

An LVSemanticData object is the result of the semantic interpretation process.  A user's spoken input is combined with a grammar containing semantic tag instructions to create a compound object.  An LVSemanticData object can be one of the following types:

Return Value

Function

Description

H_SI_DATA

LVSemanticData_CreateFromCopy(H_SI_DATA other)

Creates a new object from an old one.  The new one will need to be released when no longer in use.

const char*

LVSemanticData_Print(H_SI_DATA data, int format)

Prints the data in XML or ECMAScript formats.

int

LVSemanticData_GetType(H_SI_DATA data)

Returns the type of thedata.

const char*

LVSemanticData_GetString(H_SI_DATA data)

If the data is of type SI_TYPE_STRING, returns the string contents.

int

LVSemanticData_GetInt(H_SI_DATA data)

If the data is of type SI_TYPE_INT, returns the integer.

double

LVSemanticData_GetDouble(H_SI_DATA data)

If the data is of type SI_TYPE_DOUBLE, returns the double.

int

LVSemanticData_GetBool(H_SI_DATA data)

If the data is of type SI_TYPE_BOOL, returns a 1 for true, 0 for false

int

LVSemanticObject_GetNumberOfProperties(H_SI_DATA data)

If the data is of type SI_TYPE_OBJECT, returns the number of properties (member data) it contains.

const char*

LVSemanticObject_GetPropertyName(H_SI_DATA data,
                             int i)

If the data is of type SI_TYPE_OBJECT, returns the name of the ith property

int

LVSemanticObject_PropertyExists(H_SI_DATA data,
                            const char* prop_name)

If the data is of type SI_TYPE_OBJECT, returns 1 if the object contains a value named prop_name, 0 otherwise.

H_SI_DATA

LVSemanticObject_GetPropertyValue(H_SI_DATA data,
                            const char* prop_name)

If the data is of type SI_TYPE_OBJECT, returns the member data named prop_name.

int

LVSemanticArray_GetSize(H_SI_DATA data)

If the data is of type SI_TYPE_ARRAY, returns the number of elements in the array.

H_SI_DATA

LVSemanticArray_GetElement(H_SI_DATA data, int i)

If the data is of type SI_TYPE_ARRAY, returns the ith element in the array.

 


Complete Help Topic List | Speech Engine Product Information