asrm_find_phrase()

Find a configuration item containing a result string.

Synopsis:

#include "asr/asrm.h"
 
cfg_item_t* asrm_find_phrase(cfg_item_t *base, const char *result, int start_terminal, asrm_phrase_search_mode_t mode, int *beg_terminal, int *end_terminal, int *conf)

Arguments:

base

The configuration structure to search.

result

The result string to search for.

start_terminal

Not used.

mode

The search mode (from the asrm_phrase_search_mode_t enumeration).

beg_terminal

On success, beg_terminal is set to the index of the first terminal in the match.

end_terminal

On success, end_terminal 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.

Library:

libasr

Description:

The asrm_find_phrase() function searches a configuration structure for a specified result string and returns a pointer to the matching configuration item.

Returns:

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