14 #ifndef TESSERACT_TRAINING_COMMONTRAINING_H_
15 #define TESSERACT_TRAINING_COMMONTRAINING_H_
31 TESS_COMMON_TRAINING_API
37 static inline void CheckSharedLibraryVersion() {
41 "ERROR: shared library version mismatch (was %s, expected %s\n"
42 "Did you use a wrong shared tesseract library?\n",
51 #ifndef DISABLED_LEGACY_ENGINE
68 TESS_COMMON_TRAINING_API
72 TESS_COMMON_TRAINING_API
73 extern CLUSTERCONFIG
Config;
107 TESS_COMMON_TRAINING_API
123 TESS_COMMON_TRAINING_API
124 std::unique_ptr<MasterTrainer>
LoadTrainingData(
const char *
const *filelist,
bool replication,
125 ShapeTable **shape_table, std::string &file_prefix);
129 TESS_COMMON_TRAINING_API
131 const char *feature_name,
int max_samples,
138 TESS_COMMON_TRAINING_API
141 TESS_COMMON_TRAINING_API
144 TESS_COMMON_TRAINING_API
147 TESS_COMMON_TRAINING_API
149 LABELEDLIST CharSample,
const char *program_feature_type);
151 TESS_COMMON_TRAINING_API
153 bool KeepInsigProtos,
int N);
155 TESS_COMMON_TRAINING_API
158 TESS_COMMON_TRAINING_API
162 TESS_COMMON_TRAINING_API
165 TESS_COMMON_TRAINING_API
171 TESS_COMMON_TRAINING_API
174 TESS_COMMON_TRAINING_API
177 TESS_COMMON_TRAINING_API
#define TESSERACT_VERSION_STR
void WriteTrainingSamples(const tesseract::FEATURE_DEFS_STRUCT &FeatureDefs, char *Directory, tesseract::LIST CharList, const char *program_feature_type)
MERGE_CLASS FindClass(LIST List, const std::string &Label)
void Normalize(float *Values)
void WriteShapeTable(const std::string &file_prefix, const ShapeTable &shape_table)
void FreeLabeledList(LABELEDLIST LabeledList)
void tprintf(const char *format,...)
void ReadTrainingSamples(const FEATURE_DEFS_STRUCT &feature_definitions, const char *feature_name, int max_samples, UNICHARSET *unicharset, FILE *file, LIST *training_samples)
void ParseArguments(int *argc, char ***argv)
void FreeNormProtoList(LIST CharList)
CLUSTERER * SetUpForClustering(const FEATURE_DEFS_STRUCT &FeatureDefs, LABELEDLIST char_sample, const char *program_feature_type)
ShapeTable * LoadShapeTable(const std::string &file_prefix)
void AddToNormProtosList(LIST *NormProtoList, LIST ProtoList, const std::string &CharName)
FEATURE_DEFS_STRUCT feature_defs
void MergeInsignificantProtos(LIST ProtoList, const char *label, CLUSTERER *Clusterer, CLUSTERCONFIG *clusterconfig)
std::unique_ptr< MasterTrainer > LoadTrainingData(const char *const *filelist, bool replication, ShapeTable **shape_table, std::string &file_prefix)
void FreeTrainingSamples(LIST CharList)
void CleanUpUnusedData(LIST ProtoList)
CLASS_TYPE NewClass(int NumProtos, int NumConfigs)
int NumberOfProtos(LIST ProtoList, bool CountSigProtos, bool CountInsigProtos)
LIST RemoveInsignificantProtos(LIST ProtoList, bool KeepSigProtos, bool KeepInsigProtos, int N)
CLASS_STRUCT * SetUpForFloat2Int(const UNICHARSET &unicharset, LIST LabeledClassList)
void FreeLabeledClassList(LIST ClassList)
LABELEDLIST FindList(LIST List, const std::string &Label)
static const char * Version()
LABELEDLISTNODE(const char *label)
MERGE_CLASS_NODE(const char *label)
tesseract::CLASS_TYPE Class
int NumMerged[MAX_NUM_PROTOS]