link-grammar-5.8.0/link-grammar/dict-file/read-dict.c
/** Insert ZZZ+ connectors.
 *  This function was mainly used to support using empty-words, a concept
 *  that has been eliminated. However, it is still used to support linking of
 *  quotes that don't get the QUc/QUd links.
 */
Insert ZZZ+ connectors.
This function was mainly used to support using empty-words, a concept
that has been eliminated. However, it is still used to support linking of
quotes that don't get the QUc/QUd links.
Insert ZZZ + connectors . This function was mainly used to support using empty - words a concept that has been eliminated . However it is still used to support linking of quotes that don ' t get the QUc / QUd links .
void add_empty_word(Sentence sent, X_node *x)
{
	Exp *zn, *an;
	const char *ZZZ = string_set_lookup(EMPTY_CONNECTOR, sent->dict->string_set);
	if (MT_WALL == x->word->morpheme_type) return;
	for(; NULL != x; x = x->next)
	{
		if (is_stem(x->string)) continue; 
		zn = Exp_create(sent->Exp_pool);
		zn->dir = '+';
		zn->condesc = condesc_add(&sent->dict->contable, ZZZ);
		zn->multi = false;
		zn->type = CONNECTOR_type;
		zn->operand_next = NULL; 
		zn->cost = 0.0;
		zn = make_optional_node(sent->Exp_pool, zn);
		an = Exp_create(sent->Exp_pool);
		an->type = AND_type;
		an->operand_next = NULL;
		an->cost = 0.0;
		an->operand_first = zn;
		zn->operand_next = x->exp;
		x->exp = an;
	}
}
void add_empty_word ( Sentence sent , X_node * x ) { Exp * zn , * an ; const char * ZZZ = string_set_lookup ( EMPTY_CONNECTOR , sent -> dict -> string_set ) ; if ( MT_WALL == x -> word -> morpheme_type ) return ; for ( ; NULL != x ; x = x -> next ) { if ( is_stem ( x -> string ) ) continue ; zn = Exp_create ( sent -> Exp_pool ) ; zn -> dir = ' ' ; zn -> condesc = condesc_add ( & sent -> dict -> contable , ZZZ ) ; zn -> multi = false ; zn -> type = CONNECTOR_type ; zn -> operand_next = NULL ; zn -> cost = 0.0 ; zn = make_optional_node ( sent -> Exp_pool , zn ) ; an = Exp_create ( sent -> Exp_pool ) ; an -> type = AND_type ; an -> operand_next = NULL ; an -> cost = 0.0 ; an -> operand_first = zn ; zn -> operand_next = x -> exp ; x -> exp = an ; } }
Insert ZZZ+ connectors.
Insert ZZZ + connectors .
/* This function is called only if ZZZ is in the dictionary. */ /* The left-wall already has ZZZ-. The right-wall will not arrive here. */ /* Replace plain-word-exp by {ZZZ+} & (plain-word-exp) in each X_node.  */ /* Ignore stems for now, decreases a little the overhead for
		 * stem-suffix languages. */ /* Avoid an unneeded overhead. */ //lgdebug(+0, "Processing '%s'\n", x->string); /* zn points at {ZZZ+} */ /* unused, but to be on the safe side */ /* an will be {ZZZ+} & (plain-word-exp) */