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);
#define TESSERACT_VERSION_STR
DLLSYM void tprintf(const char *format,...)
void WriteTrainingSamples(const FEATURE_DEFS_STRUCT &FeatureDefs, char *Directory, LIST CharList, const char *program_feature_type)
void AddToNormProtosList(LIST *NormProtoList, LIST ProtoList, char *CharName)
int NumberOfProtos(LIST ProtoList, bool CountSigProtos, bool CountInsigProtos)
void FreeTrainingSamples(LIST CharList)
void FreeLabeledList(LABELEDLIST LabeledList)
void ParseArguments(int *argc, char ***argv)
void CleanUpUnusedData(LIST ProtoList)
void FreeNormProtoList(LIST CharList)
LABELEDLIST FindList(LIST List, char *Label)
FEATURE_DEFS_STRUCT feature_defs
LABELEDLIST NewLabeledList(const char *Label)
void ReadTrainingSamples(const FEATURE_DEFS_STRUCT &feature_defs, const char *feature_name, int max_samples, UNICHARSET *unicharset, FILE *file, LIST *training_samples)
void Normalize(float *Values)
LIST RemoveInsignificantProtos(LIST ProtoList, bool KeepSigProtos, bool KeepInsigProtos, int N)
void MergeInsignificantProtos(LIST ProtoList, const char *label, CLUSTERER *Clusterer, CLUSTERCONFIG *Config)
MERGE_CLASS FindClass(LIST List, const char *Label)
const char * GetNextFilename(int argc, const char *const *argv)
CLUSTERER * SetUpForClustering(const FEATURE_DEFS_STRUCT &FeatureDefs, LABELEDLIST CharSample, const char *program_feature_type)
MERGE_CLASS NewLabeledClass(const char *Label)
void FreeLabeledClassList(LIST ClassListList)
CLASS_STRUCT * SetUpForFloat2Int(const UNICHARSET &unicharset, LIST LabeledClassList)
struct LABELEDLISTNODE * LABELEDLIST
ShapeTable * LoadShapeTable(const STRING &file_prefix)
MasterTrainer * LoadTrainingData(int argc, const char *const *argv, bool replication, ShapeTable **shape_table, STRING *file_prefix)
void WriteShapeTable(const STRING &file_prefix, const ShapeTable &shape_table)
static const char * Version()