Ejemplo n.º 1
0
/**
 * @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;
    }
Ejemplo n.º 2
0
/**
 * @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;
}
Ejemplo n.º 3
0
/**
 * @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;
}
Ejemplo n.º 4
0
void Wordrec::mfeature_init() {
  SetupExtractors();
  InitAdaptiveClassifier();
}