tesseract
3.05.02
|
#include <mastertrainer.h>
Public Member Functions | |
MasterTrainer (NormalizationMode norm_mode, bool shape_analysis, bool replicate_samples, int debug_level) | |
~MasterTrainer () | |
bool | Serialize (FILE *fp) const |
bool | DeSerialize (bool swap, FILE *fp) |
void | LoadUnicharset (const char *filename) |
void | SetFeatureSpace (const IntFeatureSpace &fs) |
void | ReadTrainingSamples (const char *page_name, const FEATURE_DEFS_STRUCT &feature_defs, bool verification) |
void | AddSample (bool verification, const char *unichar_str, TrainingSample *sample) |
void | LoadPageImages (const char *filename) |
void | PostLoadCleanup () |
void | PreTrainingSetup () |
void | SetupMasterShapes () |
void | IncludeJunk () |
void | ReplicateAndRandomizeSamplesIfRequired () |
bool | LoadFontInfo (const char *filename) |
bool | LoadXHeights (const char *filename) |
bool | AddSpacingInfo (const char *filename) |
int | GetFontInfoId (const char *font_name) |
int | GetBestMatchingFontInfoId (const char *filename) |
const STRING & | GetTRFileName (int index) const |
void | SetupFlatShapeTable (ShapeTable *shape_table) |
CLUSTERER * | SetupForClustering (const ShapeTable &shape_table, const FEATURE_DEFS_STRUCT &feature_defs, int shape_id, int *num_samples) |
void | WriteInttempAndPFFMTable (const UNICHARSET &unicharset, const UNICHARSET &shape_set, const ShapeTable &shape_table, CLASS_STRUCT *float_classes, const char *inttemp_file, const char *pffmtable_file) |
const UNICHARSET & | unicharset () const |
TrainingSampleSet * | GetSamples () |
const ShapeTable & | master_shapes () const |
void | DebugCanonical (const char *unichar_str1, const char *unichar_str2) |
void | DisplaySamples (const char *unichar_str1, int cloud_font, const char *unichar_str2, int canonical_font) |
void | TestClassifierVOld (bool replicate_samples, ShapeClassifier *test_classifier, ShapeClassifier *old_classifier) |
void | TestClassifierOnSamples (CountTypes error_mode, int report_level, bool replicate_samples, ShapeClassifier *test_classifier, STRING *report_string) |
double | TestClassifier (CountTypes error_mode, int report_level, bool replicate_samples, TrainingSampleSet *samples, ShapeClassifier *test_classifier, STRING *report_string) |
float | ShapeDistance (const ShapeTable &shapes, int s1, int s2) |
Definition at line 69 of file mastertrainer.h.
tesseract::MasterTrainer::MasterTrainer | ( | NormalizationMode | norm_mode, |
bool | shape_analysis, | ||
bool | replicate_samples, | ||
int | debug_level | ||
) |
Definition at line 54 of file mastertrainer.cpp.
tesseract::MasterTrainer::~MasterTrainer | ( | ) |
Definition at line 66 of file mastertrainer.cpp.
void tesseract::MasterTrainer::AddSample | ( | bool | verification, |
const char * | unichar_str, | ||
TrainingSample * | sample | ||
) |
Definition at line 186 of file mastertrainer.cpp.
bool tesseract::MasterTrainer::AddSpacingInfo | ( | const char * | filename | ) |
Definition at line 435 of file mastertrainer.cpp.
void tesseract::MasterTrainer::DebugCanonical | ( | const char * | unichar_str1, |
const char * | unichar_str2 | ||
) |
Definition at line 651 of file mastertrainer.cpp.
bool tesseract::MasterTrainer::DeSerialize | ( | bool | swap, |
FILE * | fp | ||
) |
Definition at line 91 of file mastertrainer.cpp.
void tesseract::MasterTrainer::DisplaySamples | ( | const char * | unichar_str1, |
int | cloud_font, | ||
const char * | unichar_str2, | ||
int | canonical_font | ||
) |
Definition at line 711 of file mastertrainer.cpp.
int tesseract::MasterTrainer::GetBestMatchingFontInfoId | ( | const char * | filename | ) |
Definition at line 502 of file mastertrainer.cpp.
int tesseract::MasterTrainer::GetFontInfoId | ( | const char * | font_name | ) |
Definition at line 491 of file mastertrainer.cpp.
|
inline |
Definition at line 192 of file mastertrainer.h.
|
inline |
Definition at line 165 of file mastertrainer.h.
void tesseract::MasterTrainer::IncludeJunk | ( | ) |
Definition at line 318 of file mastertrainer.cpp.
bool tesseract::MasterTrainer::LoadFontInfo | ( | const char * | filename | ) |
Definition at line 356 of file mastertrainer.cpp.
void tesseract::MasterTrainer::LoadPageImages | ( | const char * | filename | ) |
Definition at line 216 of file mastertrainer.cpp.
void tesseract::MasterTrainer::LoadUnicharset | ( | const char * | filename | ) |
Definition at line 111 of file mastertrainer.cpp.
bool tesseract::MasterTrainer::LoadXHeights | ( | const char * | filename | ) |
Definition at line 392 of file mastertrainer.cpp.
|
inline |
Definition at line 195 of file mastertrainer.h.
void tesseract::MasterTrainer::PostLoadCleanup | ( | ) |
Definition at line 234 of file mastertrainer.cpp.
void tesseract::MasterTrainer::PreTrainingSetup | ( | ) |
Definition at line 257 of file mastertrainer.cpp.
void tesseract::MasterTrainer::ReadTrainingSamples | ( | const char * | page_name, |
const FEATURE_DEFS_STRUCT & | feature_defs, | ||
bool | verification | ||
) |
Definition at line 135 of file mastertrainer.cpp.
void tesseract::MasterTrainer::ReplicateAndRandomizeSamplesIfRequired | ( | ) |
Definition at line 344 of file mastertrainer.cpp.
bool tesseract::MasterTrainer::Serialize | ( | FILE * | fp | ) | const |
Definition at line 75 of file mastertrainer.cpp.
|
inline |
Definition at line 85 of file mastertrainer.h.
void tesseract::MasterTrainer::SetupFlatShapeTable | ( | ShapeTable * | shape_table | ) |
Definition at line 519 of file mastertrainer.cpp.
CLUSTERER * tesseract::MasterTrainer::SetupForClustering | ( | const ShapeTable & | shape_table, |
const FEATURE_DEFS_STRUCT & | feature_defs, | ||
int | shape_id, | ||
int * | num_samples | ||
) |
Definition at line 550 of file mastertrainer.cpp.
void tesseract::MasterTrainer::SetupMasterShapes | ( | ) |
Definition at line 269 of file mastertrainer.cpp.
float tesseract::MasterTrainer::ShapeDistance | ( | const ShapeTable & | shapes, |
int | s1, | ||
int | s2 | ||
) |
Definition at line 825 of file mastertrainer.cpp.
double tesseract::MasterTrainer::TestClassifier | ( | CountTypes | error_mode, |
int | report_level, | ||
bool | replicate_samples, | ||
TrainingSampleSet * | samples, | ||
ShapeClassifier * | test_classifier, | ||
STRING * | report_string | ||
) |
Definition at line 798 of file mastertrainer.cpp.
void tesseract::MasterTrainer::TestClassifierOnSamples | ( | CountTypes | error_mode, |
int | report_level, | ||
bool | replicate_samples, | ||
ShapeClassifier * | test_classifier, | ||
STRING * | report_string | ||
) |
Definition at line 776 of file mastertrainer.cpp.
void tesseract::MasterTrainer::TestClassifierVOld | ( | bool | replicate_samples, |
ShapeClassifier * | test_classifier, | ||
ShapeClassifier * | old_classifier | ||
) |
Definition at line 764 of file mastertrainer.cpp.
|
inline |
Definition at line 189 of file mastertrainer.h.
void tesseract::MasterTrainer::WriteInttempAndPFFMTable | ( | const UNICHARSET & | unicharset, |
const UNICHARSET & | shape_set, | ||
const ShapeTable & | shape_table, | ||
CLASS_STRUCT * | float_classes, | ||
const char * | inttemp_file, | ||
const char * | pffmtable_file | ||
) |
Definition at line 590 of file mastertrainer.cpp.