find_phrase()

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

Synopsis:

#include "asr/asrm.h"
 
int find_phrase(cfg_item_t *base, const char *result, int start_terminal, int *terminal, int *conf, int def_id)

Arguments:

base

The configuration structure to search.

result

The result string to search for.

start_terminal

Not used.

terminal

On success, terminal is set to the index of the first 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 phrase isn't found.

Library:

libasr

Description:

The find_phrase() function finds the specified string in the specified configuration and returns the ID of the matching configuration item. The configuration item must contain an exact match.

Returns:

The configuration ID of the matching configuration item; the default ID if a match isn't found.