link-grammar-5.8.0/link-grammar/dict-common/idiom.c
/**
 * Generate a new connector name obtained from the current_name.
 * allocate string space for it.
 * @return a pointer to connector name.
 */
Generate a new connector name obtained from the current_name.
allocate string space for it.
@return a pointer to connector name.
Generate a new connector name obtained from the current_name . allocate string space for it . @return a pointer to connector name .
static const char * generate_id_connector(Dictionary dict)
{
	char buff[IDIOM_LINK_SZ+4];
	unsigned int i;
	char * t;
	for (i=0; dict->current_idiom[i] == 'A'; i++)
	  ;
	t = buff;
	*t++ = 'I';
	*t++ = 'D';
	for (; i < IDIOM_LINK_SZ; i++)
	{
		*t++ = dict->current_idiom[i];
	}
	*t++ = '\0';
	return string_set_add(buff, dict->string_set);
}
static const char * generate_id_connector ( Dictionary dict ) { char buff [ IDIOM_LINK_SZ + 4 ] ; unsigned int i ; char * t ; for ( i = 0 ; dict -> current_idiom [ i ] == ' ' ; i ++ ) ; t = buff ; * t ++ = ' ' ; * t ++ = ' ' ; for ( ; i < IDIOM_LINK_SZ ; i ++ ) { * t ++ = dict -> current_idiom [ i ] ; } * t ++ = ' \0 ' ; return string_set_add ( buff , dict -> string_set ) ; }
Generate a new connector name obtained from the current_name.
Generate a new connector name obtained from the current_name .
/* i is now the number of characters of current_name to skip */ /* All idiom connector names start with the two letters "ID" */