/** * @name program_editup * * Initialize all the things in the program that need to be initialized. * init_permute determines whether to initialize the permute functions * and Dawg models. */ void Wordrec::program_editup(const char *textbase, bool init_classifier, bool init_dict) { if (textbase != NULL) imagefile = textbase; InitFeatureDefs(&feature_defs_); InitAdaptiveClassifier(init_classifier); if (init_dict) getDict().Load(Dict::GlobalDawgCache()); pass2_ok_split = chop_ok_split; }
/** * @name program_editup * * Initialize all the things in the program that need to be initialized. * init_permute determines whether to initialize the permute functions * and Dawg models. */ void Wordrec::program_editup(const char *textbase, bool init_classifier, bool init_dict) { if (textbase != NULL) imagefile = textbase; InitFeatureDefs(&feature_defs_); SetupExtractors(&feature_defs_); InitAdaptiveClassifier(init_classifier); if (init_dict) getDict().Load(); pass2_ok_split = chop_ok_split; pass2_seg_states = wordrec_num_seg_states; }
/** * @name program_editup * * Initialize all the things in the program that need to be initialized. * init_permute determines whether to initialize the permute functions * and Dawg models. */ void Wordrec::program_editup(const char *textbase, TessdataManager *init_classifier, TessdataManager *init_dict) { if (textbase != nullptr) imagefile = textbase; InitFeatureDefs(&feature_defs_); InitAdaptiveClassifier(init_classifier); if (init_dict) { getDict().SetupForLoad(Dict::GlobalDawgCache()); getDict().Load(lang, init_dict); getDict().FinishLoad(); } pass2_ok_split = chop_ok_split; }
void Wordrec::mfeature_init() { SetupExtractors(); InitAdaptiveClassifier(); }