ext/sentence.c
void
rlink_init_sentence( void )
{
#ifdef FOR_RDOC
	rlink_mLinkParser = rb_define_module( "LinkParser" );
	rlink_eLpError = rb_define_class_under( rlink_mLinkParser, "Error", rb_eRuntimeError );
#endif

	rlink_cSentence = rb_define_class_under( rlink_mLinkParser, "Sentence",
	 	rb_cObject );
	
	rb_define_alloc_func( rlink_cSentence, rlink_sentence_s_alloc );

	rb_define_method( rlink_cSentence, "initialize", rlink_sentence_init, 2 );
	rb_define_method( rlink_cSentence, "parse", rlink_sentence_parse, -1 );
	rb_define_method( rlink_cSentence, "parsed?", rlink_sentence_parsed_p, 0 );
	rb_define_method( rlink_cSentence, "linkages", rlink_sentence_linkages, 0 );

	rb_define_method( rlink_cSentence, "options", rlink_sentence_options, 0 );

	rb_define_method( rlink_cSentence, "length", rlink_sentence_length, 0 );
	rb_define_method( rlink_cSentence, "word", rlink_sentence_word, 1 );
	rb_define_method( rlink_cSentence, "words", rlink_sentence_words, 0 );
	rb_define_method( rlink_cSentence, "[]", rlink_sentence_aref, -1 );

	rb_define_method( rlink_cSentence, "null_count", 
		rlink_sentence_null_count, 0 );
	rb_define_method( rlink_cSentence, "num_linkages_found", 
		rlink_sentence_num_linkages_found, 0 );
	rb_define_method( rlink_cSentence, "num_valid_linkages", 
		rlink_sentence_num_valid_linkages, 0 );
	rb_define_method( rlink_cSentence, "num_linkages_post_processed", 
		rlink_sentence_num_linkages_post_processed, 0 );
	rb_define_method( rlink_cSentence, "num_violations", 
		rlink_sentence_num_violations, 1 );
	rb_define_method( rlink_cSentence, "disjunct_cost", 
		rlink_sentence_disjunct_cost, 1 );

/*
	link_public_api(char *) sentence_get_nth_word(Sentence sent, int i);
	link_public_api(int) sentence_nth_word_has_disjunction(Sentence sent, int i);
*/

}
/*
 * Document-class: LinkParser::Sentence
 * 
 * A Sentence is the API's representation of an input string,
 * tokenized and interpreted according to a specific Dictionary. After
 * a Sentence is created and parsed, various attributes of the
 * resulting set of linkages can be obtained.
 * 
 */


A Sentence is the API's representation of an input string,
tokenized and interpreted according to a specific Dictionary. After
a Sentence is created and parsed, various attributes of the
resulting set of linkages can be obtained.
A Sentence is the API ' s representation of an input string tokenized and interpreted according to a specific Dictionary . After a Sentence is created and parsed various attributes of the resulting set of linkages can be obtained .
void
rlink_init_sentence( void )
{
#ifdef FOR_RDOC
	rlink_mLinkParser = rb_define_module( "LinkParser" );
	rlink_eLpError = rb_define_class_under( rlink_mLinkParser, "Error", rb_eRuntimeError );
#endif
	rlink_cSentence = rb_define_class_under( rlink_mLinkParser, "Sentence",
	 	rb_cObject );
	rb_define_alloc_func( rlink_cSentence, rlink_sentence_s_alloc );
	rb_define_method( rlink_cSentence, "initialize", rlink_sentence_init, 2 );
	rb_define_method( rlink_cSentence, "parse", rlink_sentence_parse, -1 );
	rb_define_method( rlink_cSentence, "parsed?", rlink_sentence_parsed_p, 0 );
	rb_define_method( rlink_cSentence, "linkages", rlink_sentence_linkages, 0 );
	rb_define_method( rlink_cSentence, "options", rlink_sentence_options, 0 );
	rb_define_method( rlink_cSentence, "length", rlink_sentence_length, 0 );
	rb_define_method( rlink_cSentence, "word", rlink_sentence_word, 1 );
	rb_define_method( rlink_cSentence, "words", rlink_sentence_words, 0 );
	rb_define_method( rlink_cSentence, "[]", rlink_sentence_aref, -1 );
	rb_define_method( rlink_cSentence, "null_count", 
		rlink_sentence_null_count, 0 );
	rb_define_method( rlink_cSentence, "num_linkages_found", 
		rlink_sentence_num_linkages_found, 0 );
	rb_define_method( rlink_cSentence, "num_valid_linkages", 
		rlink_sentence_num_valid_linkages, 0 );
	rb_define_method( rlink_cSentence, "num_linkages_post_processed", 
		rlink_sentence_num_linkages_post_processed, 0 );
	rb_define_method( rlink_cSentence, "num_violations", 
		rlink_sentence_num_violations, 1 );
	rb_define_method( rlink_cSentence, "disjunct_cost", 
		rlink_sentence_disjunct_cost, 1 );
}
void rlink_init_sentence ( void ) { #ifdef FOR_RDOC rlink_mLinkParser = rb_define_module ( " " ) ; rlink_eLpError = rb_define_class_under ( rlink_mLinkParser , " " , rb_eRuntimeError ) ; #endif rlink_cSentence = rb_define_class_under ( rlink_mLinkParser , " " , rb_cObject ) ; rb_define_alloc_func ( rlink_cSentence , rlink_sentence_s_alloc ) ; rb_define_method ( rlink_cSentence , " " , rlink_sentence_init , 2 ) ; rb_define_method ( rlink_cSentence , " " , rlink_sentence_parse , -1 ) ; rb_define_method ( rlink_cSentence , " " , rlink_sentence_parsed_p , 0 ) ; rb_define_method ( rlink_cSentence , " " , rlink_sentence_linkages , 0 ) ; rb_define_method ( rlink_cSentence , " " , rlink_sentence_options , 0 ) ; rb_define_method ( rlink_cSentence , " " , rlink_sentence_length , 0 ) ; rb_define_method ( rlink_cSentence , " " , rlink_sentence_word , 1 ) ; rb_define_method ( rlink_cSentence , " " , rlink_sentence_words , 0 ) ; rb_define_method ( rlink_cSentence , " " , rlink_sentence_aref , -1 ) ; rb_define_method ( rlink_cSentence , " " , rlink_sentence_null_count , 0 ) ; rb_define_method ( rlink_cSentence , " " , rlink_sentence_num_linkages_found , 0 ) ; rb_define_method ( rlink_cSentence , " " , rlink_sentence_num_valid_linkages , 0 ) ; rb_define_method ( rlink_cSentence , " " , rlink_sentence_num_linkages_post_processed , 0 ) ; rb_define_method ( rlink_cSentence , " " , rlink_sentence_num_violations , 1 ) ; rb_define_method ( rlink_cSentence , " " , rlink_sentence_disjunct_cost , 1 ) ; }
Document-class: LinkParser::Sentence
Document - class : LinkParser :: Sentence
/*
	link_public_api(char *) sentence_get_nth_word(Sentence sent, int i);
	link_public_api(int) sentence_nth_word_has_disjunction(Sentence sent, int i);
*/