UniMRCP  1.7.0
Typedefs | Functions
apt_nlsml_doc.h File Reference

NLSML Result Handling. More...

#include <apr_xml.h>
#include "apt.h"
Include dependency graph for apt_nlsml_doc.h:

Go to the source code of this file.

Typedefs

typedef typedefAPT_BEGIN_EXTERN_C struct nlsml_result_t nlsml_result_t
 
typedef struct nlsml_interpretation_t nlsml_interpretation_t
 
typedef struct nlsml_enrollment_result_t nlsml_enrollment_result_t
 
typedef struct nlsml_verification_result_t nlsml_verification_result_t
 
typedef struct nlsml_instance_t nlsml_instance_t
 
typedef struct nlsml_input_t nlsml_input_t
 

Functions

nlsml_result_t * nlsml_result_parse (const char *data, apr_size_t length, apr_pool_t *pool)
 
void nlsml_result_trace (const nlsml_result_t *result, apr_pool_t *pool)
 
nlsml_interpretation_t * nlsml_first_interpretation_get (const nlsml_result_t *result)
 
nlsml_interpretation_t * nlsml_next_interpretation_get (const nlsml_result_t *result, const nlsml_interpretation_t *interpretation)
 
nlsml_enrollment_result_t * nlsml_first_enrollment_result_get (const nlsml_result_t *result)
 
nlsml_enrollment_result_t * nlsml_next_enrollment_result_get (const nlsml_result_t *result, const nlsml_enrollment_result_t *enrollment_result)
 
nlsml_verification_result_t * nlsml_first_verification_result_get (const nlsml_result_t *result)
 
nlsml_verification_result_t * nlsml_next_verification_result_get (const nlsml_result_t *result, const nlsml_verification_result_t *verification_result)
 
const char * nlsml_result_grammar_get (const nlsml_result_t *result)
 
nlsml_instance_t * nlsml_interpretation_first_instance_get (const nlsml_interpretation_t *interpretation)
 
nlsml_instance_t * nlsml_interpretation_next_instance_get (const nlsml_interpretation_t *interpretation, const nlsml_instance_t *instance)
 
nlsml_input_t * nlsml_interpretation_input_get (const nlsml_interpretation_t *interpretation)
 
float nlsml_interpretation_confidence_get (const nlsml_interpretation_t *interpretation)
 
const char * nlsml_interpretation_grammar_get (const nlsml_interpretation_t *interpretation)
 
const apr_xml_elem * nlsml_instance_elem_get (const nlsml_instance_t *instance)
 
apt_bool_t nlsml_instance_swi_suppress (nlsml_instance_t *instance)
 
const char * nlsml_instance_content_generate (const nlsml_instance_t *instance, apr_pool_t *pool)
 
const apr_xml_elem * nlsml_input_elem_get (const nlsml_input_t *input)
 
const char * nlsml_input_content_generate (const nlsml_input_t *input, apr_pool_t *pool)
 
const char * nlsml_input_mode_get (const nlsml_input_t *input)
 
float nlsml_input_confidence_get (const nlsml_input_t *input)
 
const char * nlsml_input_timestamp_start_get (const nlsml_input_t *input)
 
const char * nlsml_input_timestamp_end_get (const nlsml_input_t *input)
 

Detailed Description

NLSML Result Handling.

Remarks
This is an MRCP version independent and vendor consistent implementation of the NSLML parser. The interface reflects the NLSML schema defined in http://tools.ietf.org/html/rfc6787#section-16.1.

Function Documentation

◆ nlsml_first_enrollment_result_get()

nlsml_enrollment_result_t* nlsml_first_enrollment_result_get ( const nlsml_result_t *  result)

Get first enrollment result

Parameters
resultthe parsed NLSML result which holds the list of enrollment-result elements

◆ nlsml_first_interpretation_get()

nlsml_interpretation_t* nlsml_first_interpretation_get ( const nlsml_result_t *  result)

Get first interpretation

Parameters
resultthe parsed NLSML result which holds the list of interpretation elements

◆ nlsml_first_verification_result_get()

nlsml_verification_result_t* nlsml_first_verification_result_get ( const nlsml_result_t *  result)

Get first verification result

Parameters
resultthe parsed NLSML result which holds the list of verification-result elements

◆ nlsml_input_confidence_get()

float nlsml_input_confidence_get ( const nlsml_input_t *  input)

Get input confidence

Parameters
inputthe parsed input element
Remarks
the confidence is stored and returned as a float value for both MRCPv2 and MRCPv1

◆ nlsml_input_content_generate()

const char* nlsml_input_content_generate ( const nlsml_input_t *  input,
apr_pool_t *  pool 
)

Generate a plain text content of the input element

Parameters
inputthe parsed input to generate content of
poolthe memory pool to use

◆ nlsml_input_elem_get()

const apr_xml_elem* nlsml_input_elem_get ( const nlsml_input_t *  input)

Get an XML representation of the input element

Parameters
inputthe parsed input element

◆ nlsml_input_mode_get()

const char* nlsml_input_mode_get ( const nlsml_input_t *  input)

Get input mode

Parameters
inputthe parsed input element
Remarks
the input mode is either "speech" or "dtmf"

◆ nlsml_input_timestamp_end_get()

const char* nlsml_input_timestamp_end_get ( const nlsml_input_t *  input)

Get end of input timestamp

Parameters
inputthe parsed input element

◆ nlsml_input_timestamp_start_get()

const char* nlsml_input_timestamp_start_get ( const nlsml_input_t *  input)

Get start of input timestamp

Parameters
inputthe parsed input element

◆ nlsml_instance_content_generate()

const char* nlsml_instance_content_generate ( const nlsml_instance_t *  instance,
apr_pool_t *  pool 
)

Generate a plain text content of the instance element

Parameters
instancethe parsed instance to generate content of
poolthe memory pool to use

◆ nlsml_instance_elem_get()

const apr_xml_elem* nlsml_instance_elem_get ( const nlsml_instance_t *  instance)

Get an XML representation of the instance element

Parameters
instancethe parsed instance element

◆ nlsml_instance_swi_suppress()

apt_bool_t nlsml_instance_swi_suppress ( nlsml_instance_t *  instance)

Suppress SWI elements (normalize instance)

Parameters
instancethe parsed instance to suppress SWI sub-elements from

◆ nlsml_interpretation_confidence_get()

float nlsml_interpretation_confidence_get ( const nlsml_interpretation_t *  interpretation)

Get interpretation confidence

Parameters
interpretationthe parsed interpretation element
Remarks
the confidence is stored and returned as a float value for both MRCPv2 and MRCPv1

◆ nlsml_interpretation_first_instance_get()

nlsml_instance_t* nlsml_interpretation_first_instance_get ( const nlsml_interpretation_t *  interpretation)

Get first instance

Parameters
interpretationthe parsed interpretation element which holds the list of instance elements

◆ nlsml_interpretation_grammar_get()

const char* nlsml_interpretation_grammar_get ( const nlsml_interpretation_t *  interpretation)

Get interpretation grammar

Parameters
interpretationthe parsed interpretation element

◆ nlsml_interpretation_input_get()

nlsml_input_t* nlsml_interpretation_input_get ( const nlsml_interpretation_t *  interpretation)

Get input

Parameters
interpretationthe parsed interpretation element which may have 0 or 1 input elements

◆ nlsml_interpretation_next_instance_get()

nlsml_instance_t* nlsml_interpretation_next_instance_get ( const nlsml_interpretation_t *  interpretation,
const nlsml_instance_t *  instance 
)

Get next instance

Parameters
interpretationthe parsed interpretation element which holds the list of instance elements
instancethe current instance element

◆ nlsml_next_enrollment_result_get()

nlsml_enrollment_result_t* nlsml_next_enrollment_result_get ( const nlsml_result_t *  result,
const nlsml_enrollment_result_t *  enrollment_result 
)

Get next enrollment result

Parameters
resultthe parsed NLSML result which holds the list of enrollment-result elements
enrollment_resultthe current enrollment-result element

◆ nlsml_next_interpretation_get()

nlsml_interpretation_t* nlsml_next_interpretation_get ( const nlsml_result_t *  result,
const nlsml_interpretation_t *  interpretation 
)

Get next interpretation

Parameters
resultthe parsed NLSML result which holds the list of interpretation elements
interpretationthe current interpretation element

◆ nlsml_next_verification_result_get()

nlsml_verification_result_t* nlsml_next_verification_result_get ( const nlsml_result_t *  result,
const nlsml_verification_result_t *  verification_result 
)

Get next verification result

Parameters
resultthe parsed NLSML result which holds the list of verification-result elements
verification_resultthe current verification-result element

◆ nlsml_result_grammar_get()

const char* nlsml_result_grammar_get ( const nlsml_result_t *  result)

Get the grammar attribute of the NLSML result

Parameters
resultthe parsed result

◆ nlsml_result_parse()

nlsml_result_t* nlsml_result_parse ( const char *  data,
apr_size_t  length,
apr_pool_t *  pool 
)

Parse NLSML result

Parameters
datathe data to parse
lengththe length of the data
poolthe memory pool to use
Returns
the parsed NLSML result.

◆ nlsml_result_trace()

void nlsml_result_trace ( const nlsml_result_t *  result,
apr_pool_t *  pool 
)

Trace parsed NLSML result (for debug purposes only)

Parameters
resultthe parsed result to output
poolthe memory pool to use