link-grammar-5.8.0/link-grammar/dict-common/idiom.c
/**
 * build_idiom_word_name() -- return idiomized name of given string.
 *
 * Allocates string space and returns a pointer to it.
 * In this string is placed the idiomized name of the given string s.
 * This is the same as s, but with a postfix of ".Ix", where x is an
 * appropriate number.  x is the minimum number that distinguishes
 * this word from others in the dictionary.
 */
- return idiomized name of given string.
Allocates string space and returns a pointer to it.
In this string is placed the idiomized name of the given string s.
This is the same as s, but with a postfix of ".Ix", where x is an
appropriate number.  x is the minimum number that distinguishes
this word from others in the dictionary.
- return idiomized name of given string . Allocates string space and returns a pointer to it . In this string is placed the idiomized name of the given string s . This is the same as s but with a postfix of " . Ix " where x is an appropriate number . x is the minimum number that distinguishes this word from others in the dictionary .
static const char * build_idiom_word_name(Dictionary dict, const char * s)
{
	char buff[2*MAX_WORD];
	int count;
	Dict_node *dn = dictionary_lookup_list(dict, s);
	count = max_postfix_found(dn) + 1;
	free_lookup_list(dict, dn);
	snprintf(buff, sizeof(buff), "%s%cI%d", s, SUBSCRIPT_MARK, count);
	return string_set_add(buff, dict->string_set);
}
static const char * build_idiom_word_name ( Dictionary dict , const char * s ) { char buff [ 2 * MAX_WORD ] ; int count ; Dict_node * dn = dictionary_lookup_list ( dict , s ) ; count = max_postfix_found ( dn ) + 1 ; free_lookup_list ( dict , dn ) ; snprintf ( buff , sizeof ( buff ) , " " , s , SUBSCRIPT_MARK , count ) ; return string_set_add ( buff , dict -> string_set ) ; }
build_idiom_word_name() -- return idiomized name of given string.
build_idiom_word_name () -- return idiomized name of given string .