tesseract::MasterTrainer Class Reference
#include <mastertrainer.h>
List of all members.
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 (FILE *fp, 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) |
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 | TestClassifierOnSamples (int report_level, bool replicate_samples, ShapeClassifier *test_classifier, STRING *report_string) |
double | TestClassifier (int report_level, bool replicate_samples, TrainingSampleSet *samples, ShapeClassifier *test_classifier, STRING *report_string) |
float | ShapeDistance (const ShapeTable &shapes, int s1, int s2) |
Constructor & Destructor Documentation
tesseract::MasterTrainer::MasterTrainer |
( |
NormalizationMode |
norm_mode, |
|
|
bool |
shape_analysis, |
|
|
bool |
replicate_samples, |
|
|
int |
debug_level | |
|
) |
| | |
tesseract::MasterTrainer::~MasterTrainer |
( |
|
) |
|
Member Function Documentation
void tesseract::MasterTrainer::AddSample |
( |
bool |
verification, |
|
|
const char * |
unichar_str, |
|
|
TrainingSample * |
sample | |
|
) |
| | |
bool tesseract::MasterTrainer::AddSpacingInfo |
( |
const char * |
filename |
) |
|
void tesseract::MasterTrainer::DebugCanonical |
( |
const char * |
unichar_str1, |
|
|
const char * |
unichar_str2 | |
|
) |
| | |
bool tesseract::MasterTrainer::DeSerialize |
( |
bool |
swap, |
|
|
FILE * |
fp | |
|
) |
| | |
void tesseract::MasterTrainer::DisplaySamples |
( |
const char * |
unichar_str1, |
|
|
int |
cloud_font, |
|
|
const char * |
unichar_str2, |
|
|
int |
canonical_font | |
|
) |
| | |
int tesseract::MasterTrainer::GetBestMatchingFontInfoId |
( |
const char * |
filename |
) |
|
int tesseract::MasterTrainer::GetFontInfoId |
( |
const char * |
font_name |
) |
|
void tesseract::MasterTrainer::IncludeJunk |
( |
|
) |
|
bool tesseract::MasterTrainer::LoadFontInfo |
( |
const char * |
filename |
) |
|
void tesseract::MasterTrainer::LoadPageImages |
( |
const char * |
filename |
) |
|
void tesseract::MasterTrainer::LoadUnicharset |
( |
const char * |
filename |
) |
|
bool tesseract::MasterTrainer::LoadXHeights |
( |
const char * |
filename |
) |
|
const ShapeTable& tesseract::MasterTrainer::master_shapes |
( |
|
) |
const [inline] |
void tesseract::MasterTrainer::PostLoadCleanup |
( |
|
) |
|
void tesseract::MasterTrainer::PreTrainingSetup |
( |
|
) |
|
void tesseract::MasterTrainer::ReadTrainingSamples |
( |
FILE * |
fp, |
|
|
const FEATURE_DEFS_STRUCT & |
feature_defs, |
|
|
bool |
verification | |
|
) |
| | |
void tesseract::MasterTrainer::ReplicateAndRandomizeSamplesIfRequired |
( |
|
) |
|
bool tesseract::MasterTrainer::Serialize |
( |
FILE * |
fp |
) |
const |
void tesseract::MasterTrainer::SetFeatureSpace |
( |
const IntFeatureSpace & |
fs |
) |
[inline] |
void tesseract::MasterTrainer::SetupFlatShapeTable |
( |
ShapeTable * |
shape_table |
) |
|
void tesseract::MasterTrainer::SetupMasterShapes |
( |
|
) |
|
float tesseract::MasterTrainer::ShapeDistance |
( |
const ShapeTable & |
shapes, |
|
|
int |
s1, |
|
|
int |
s2 | |
|
) |
| | |
void tesseract::MasterTrainer::TestClassifierOnSamples |
( |
int |
report_level, |
|
|
bool |
replicate_samples, |
|
|
ShapeClassifier * |
test_classifier, |
|
|
STRING * |
report_string | |
|
) |
| | |
const UNICHARSET& tesseract::MasterTrainer::unicharset |
( |
|
) |
const [inline] |
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 | |
|
) |
| | |
The documentation for this class was generated from the following files: