link-grammar-5.8.0/link-grammar/tokenize/wordgraph.c
/**
 * Find the sentence word of which the given word has part.
 * This is done by going upward in the wordgraph along the unsplit_word
 * path until finding a word that is an original sentence word.
 */
Find the sentence word of which the given word has part.
This is done by going upward in the wordgraph along the unsplit_word
path until finding a word that is an original sentence word.
Find the sentence word of which the given word has part . This is done by going upward in the wordgraph along the unsplit_word path until finding a word that is an original sentence word .
Gword *wg_get_sentence_word(const Sentence sent, Gword *word)
{
		if (MT_INFRASTRUCTURE == word->morpheme_type) return NULL;
		while (!IS_SENTENCE_WORD(sent, word))
		{
			word = word->unsplit_word;
			assert(NULL != word, "wg_get_sentence_word(): NULL unsplit word");
		}
		assert(NULL != word->subword, "wg_get_sentence_word(): NULL subword");
		return word;
}
Gword * wg_get_sentence_word ( const Sentence sent , Gword * word ) { if ( MT_INFRASTRUCTURE == word -> morpheme_type ) return NULL ; while ( ! IS_SENTENCE_WORD ( sent , word ) ) { word = word -> unsplit_word ; assert ( NULL != word , " " ) ; } assert ( NULL != word -> subword , " " ) ; return word ; }
Find the sentence word of which the given word has part.
Find the sentence word of which the given word has part .