14 #ifndef TESSERACT_TRAINING_COMMONTRAINING_H_ 15 #define TESSERACT_TRAINING_COMMONTRAINING_H_ 18 #include "config_auto.h" 22 #ifdef DISABLED_LEGACY_ENGINE 36 static inline void CheckSharedLibraryVersion()
40 tprintf(
"ERROR: shared library version mismatch (was %s, expected %s\n" 41 "Did you use a wrong shared tesseract library?\n",
105 static inline void CheckSharedLibraryVersion()
109 tprintf(
"ERROR: shared library version mismatch (was %s, expected %s\n" 110 "Did you use a wrong shared tesseract library?\n",
137 ShapeTable** shape_table,
151 const char *feature_name,
int max_samples,
153 FILE* file,
LIST* training_samples);
159 const char *program_feature_type);
173 const char *program_feature_type);
178 bool KeepInsigProtos,
201 LIST LabeledClassList);
217 bool CountInsigProtos);
222 #endif // def DISABLED_LEGACY_ENGINE 224 #endif // TESSERACT_TRAINING_COMMONTRAINING_H_
void FreeTrainingSamples(LIST CharList)
void ParseArguments(int *argc, char ***argv)
MERGE_CLASS NewLabeledClass(const char *Label)
void FreeLabeledClassList(LIST ClassListList)
struct LABELEDLISTNODE * LABELEDLIST
LIST RemoveInsignificantProtos(LIST ProtoList, bool KeepSigProtos, bool KeepInsigProtos, int N)
void Normalize(float *Values)
CLUSTERER * SetUpForClustering(const FEATURE_DEFS_STRUCT &FeatureDefs, LABELEDLIST CharSample, const char *program_feature_type)
void ReadTrainingSamples(const FEATURE_DEFS_STRUCT &feature_defs, const char *feature_name, int max_samples, UNICHARSET *unicharset, FILE *file, LIST *training_samples)
void WriteShapeTable(const STRING &file_prefix, const ShapeTable &shape_table)
FEATURE_DEFS_STRUCT feature_defs
void FreeLabeledList(LABELEDLIST LabeledList)
LABELEDLIST FindList(LIST List, char *Label)
void CleanUpUnusedData(LIST ProtoList)
int NumberOfProtos(LIST ProtoList, bool CountSigProtos, bool CountInsigProtos)
DLLSYM void tprintf(const char *format,...)
void FreeNormProtoList(LIST CharList)
void AddToNormProtosList(LIST *NormProtoList, LIST ProtoList, char *CharName)
void WriteTrainingSamples(const FEATURE_DEFS_STRUCT &FeatureDefs, char *Directory, LIST CharList, const char *program_feature_type)
MERGE_CLASS FindClass(LIST List, const char *Label)
CLASS_STRUCT * SetUpForFloat2Int(const UNICHARSET &unicharset, LIST LabeledClassList)
void MergeInsignificantProtos(LIST ProtoList, const char *label, CLUSTERER *Clusterer, CLUSTERCONFIG *Config)
const char * GetNextFilename(int argc, const char *const *argv)
static const char * Version()
MasterTrainer * LoadTrainingData(int argc, const char *const *argv, bool replication, ShapeTable **shape_table, STRING *file_prefix)
ShapeTable * LoadShapeTable(const STRING &file_prefix)
LABELEDLIST NewLabeledList(const char *Label)