14#ifndef TESSERACT_TRAINING_COMMONTRAINING_H_
15#define TESSERACT_TRAINING_COMMONTRAINING_H_
18# include "config_auto.h"
31TESS_COMMON_TRAINING_API
37static 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
68TESS_COMMON_TRAINING_API
72TESS_COMMON_TRAINING_API
73extern CLUSTERCONFIG
Config;
107TESS_COMMON_TRAINING_API
123TESS_COMMON_TRAINING_API
124std::unique_ptr<MasterTrainer>
LoadTrainingData(
const char *
const *filelist,
bool replication,
125 ShapeTable **shape_table, std::string &file_prefix);
129TESS_COMMON_TRAINING_API
131 const char *feature_name,
int max_samples,
138TESS_COMMON_TRAINING_API
141TESS_COMMON_TRAINING_API
144TESS_COMMON_TRAINING_API
147TESS_COMMON_TRAINING_API
149 LABELEDLIST CharSample,
const char *program_feature_type);
151TESS_COMMON_TRAINING_API
153 bool KeepInsigProtos,
int N);
155TESS_COMMON_TRAINING_API
158TESS_COMMON_TRAINING_API
162TESS_COMMON_TRAINING_API
165TESS_COMMON_TRAINING_API
171TESS_COMMON_TRAINING_API
174TESS_COMMON_TRAINING_API
177TESS_COMMON_TRAINING_API
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)
internal::ValueArray< T... > Values(T... v)
static const char * Version()
LABELEDLISTNODE(const char *label)
MERGE_CLASS_NODE(const char *label)
tesseract::CLASS_TYPE Class
int NumMerged[MAX_NUM_PROTOS]