asrm_find_phrase_id()

Return the ID of a configuration item containing a result string.

Synopsis:

#include "asr/asrm.h"
 
int asrm_find_phrase_id(cfg_item_t *base, const char *result_string, int start_terminal, int *terminal_end, int *conf, int def_id)

Arguments:

base

The configuration structure to search.

result_string

The result string to search for.

start_terminal

Not used.

terminal_end

On success, terminal_end is set to the index of the last terminal in the match.

conf

On success, conf is set to the confidence level of the match.

def_id

A default ID to return if the configuration item isn't found.

Library:

libasr

Description:

The asrm_find_phrase_id() function searches a configuration for a specified result string and returns the ID of the matching configuration item. The configuration item must contain an exact match.

Returns:

A pointer to the configuration item that was the closest match; NULL on failure.