Beispiel #1
0
/*
 * Run the EM algorithm with the loaded corpus and using the current
 * configuration settings.  The +start+ parameter can take the following
 * values:
 *  * random - starting alpha are randomized
 *  * seeded - loaded based on the corpus values
 *  * <filename> - path to the file containing the model
 */
static VALUE wrap_em(VALUE self, VALUE start) {
	if (!corpus_loaded)
		return Qnil;
	
	run_quiet_em(STR2CSTR(start), last_corpus);

	return Qnil;
}
Beispiel #2
0
/*
 * Run the EM algorithm with the loaded corpus and using the current
 * configuration settings.  The +start+ parameter can take the following
 * values:
 *  * random - starting alpha are randomized
 *  * seeded - loaded based on the corpus values
 *  * <filename> - path to the file containing the model
 */
static VALUE wrap_em(VALUE self, VALUE start) {
	if (!corpus_loaded)
		return Qnil;

	run_quiet_em(StringValuePtr(start), last_corpus);

	return Qnil;
}