14 #ifndef TESSERACT_TRAINING_COMMONTRAINING_H_ 15 #define TESSERACT_TRAINING_COMMONTRAINING_H_ 18 #include "config_auto.h" 23 #ifdef DISABLED_LEGACY_ENGINE 37 static inline void CheckSharedLibraryVersion()
41 tprintf(
"ERROR: shared library version mismatch (was %s, expected %s\n" 42 "Did you use a wrong shared tesseract library?\n",
106 static inline void CheckSharedLibraryVersion()
110 tprintf(
"ERROR: shared library version mismatch (was %s, expected %s\n" 111 "Did you use a wrong shared tesseract library?\n",
138 ShapeTable** shape_table,
152 const char *feature_name,
int max_samples,
154 FILE* file,
LIST* training_samples);
160 const char *program_feature_type);
174 const char *program_feature_type);
179 bool KeepInsigProtos,
202 LIST LabeledClassList);
218 bool CountInsigProtos);
223 #endif // def DISABLED_LEGACY_ENGINE 225 #endif // TESSERACT_TRAINING_COMMONTRAINING_H_ void FreeLabeledList(LABELEDLIST LabeledList)
DLLSYM void tprintf(const char *format,...)
MERGE_CLASS NewLabeledClass(const char *Label)
int NumberOfProtos(LIST ProtoList, bool CountSigProtos, bool CountInsigProtos)
void AddToNormProtosList(LIST *NormProtoList, LIST ProtoList, char *CharName)
static const char * Version()
#define TESSERACT_VERSION_STR
LABELEDLIST NewLabeledList(const char *Label)
LABELEDLIST FindList(LIST List, char *Label)
ShapeTable * LoadShapeTable(const STRING &file_prefix)
MERGE_CLASS FindClass(LIST List, const char *Label)
void WriteShapeTable(const STRING &file_prefix, const ShapeTable &shape_table)
void Normalize(float *Values)
struct LABELEDLISTNODE * LABELEDLIST
void CleanUpUnusedData(LIST ProtoList)
const char * GetNextFilename(int argc, const char *const *argv)
void FreeTrainingSamples(LIST CharList)
void MergeInsignificantProtos(LIST ProtoList, const char *label, CLUSTERER *Clusterer, CLUSTERCONFIG *Config)
void FreeLabeledClassList(LIST ClassListList)
FEATURE_DEFS_STRUCT feature_defs
MasterTrainer * LoadTrainingData(int argc, const char *const *argv, bool replication, ShapeTable **shape_table, STRING *file_prefix)
CLASS_STRUCT * SetUpForFloat2Int(const UNICHARSET &unicharset, LIST LabeledClassList)
void ParseArguments(int *argc, char ***argv)
void FreeNormProtoList(LIST CharList)
LIST RemoveInsignificantProtos(LIST ProtoList, bool KeepSigProtos, bool KeepInsigProtos, int N)
CLUSTERER * SetUpForClustering(const FEATURE_DEFS_STRUCT &FeatureDefs, LABELEDLIST CharSample, const char *program_feature_type)
void WriteTrainingSamples(const FEATURE_DEFS_STRUCT &FeatureDefs, char *Directory, LIST CharList, 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)