link-grammar-5.8.0/link-grammar/linkage/freeli.c
/* Partial, but not full initialization of the linkage struct ... */
Partial, but not full initialization of the linkage struct
Partial but not full initialization of the linkage struct
void partial_init_linkage(Sentence sent, Linkage lkg, unsigned int N_words)
{
	lkg->num_links = 0;
	lkg->lasz = 2 * N_words;
	lkg->link_array = (Link *) malloc(lkg->lasz * sizeof(Link));
	memset(lkg->link_array, 0, lkg->lasz * sizeof(Link));
	lkg->num_words = N_words;
	lkg->cdsz =  N_words;
	lkg->chosen_disjuncts = (Disjunct **) exalloc(lkg->cdsz * sizeof(Disjunct *));
	memset(lkg->chosen_disjuncts, 0, N_words * sizeof(Disjunct *));
	lkg->disjunct_list_str = NULL;
	lkg->pp_domains = NULL;
	lkg->sent = sent;
}
void partial_init_linkage ( Sentence sent , Linkage lkg , unsigned int N_words ) { lkg -> num_links = 0 ; lkg -> lasz = 2 * N_words ; lkg -> link_array = ( Link * ) malloc ( lkg -> lasz * sizeof ( Link ) ) ; memset ( lkg -> link_array , 0 , lkg -> lasz * sizeof ( Link ) ) ; lkg -> num_words = N_words ; lkg -> cdsz = N_words ; lkg -> chosen_disjuncts = ( Disjunct * * ) exalloc ( lkg -> cdsz * sizeof ( Disjunct * ) ) ; memset ( lkg -> chosen_disjuncts , 0 , N_words * sizeof ( Disjunct * ) ) ; lkg -> disjunct_list_str = NULL ; lkg -> pp_domains = NULL ; lkg -> sent = sent ; }
Partial, but not full initialization of the linkage struct ...
Partial but not full initialization of the linkage struct ...