tesseract  v4.0.0-17-g361f3264
Open Source OCR Engine
tesseract::ErrorCounter Class Reference

#include <errorcounter.h>

Collaboration diagram for tesseract::ErrorCounter:

Classes

struct  Counts
 

Static Public Member Functions

static double ComputeErrorRate (ShapeClassifier *classifier, int report_level, CountTypes boosting_mode, const FontInfoTable &fontinfo_table, const GenericVector< Pix *> &page_images, SampleIterator *it, double *unichar_error, double *scaled_error, STRING *fonts_report)
 
static void DebugNewErrors (ShapeClassifier *new_classifier, ShapeClassifier *old_classifier, CountTypes boosting_mode, const FontInfoTable &fontinfo_table, const GenericVector< Pix *> &page_images, SampleIterator *it)
 

Private Member Functions

 ErrorCounter (const UNICHARSET &unicharset, int fontsize)
 
 ~ErrorCounter ()=default
 
bool AccumulateErrors (bool debug, CountTypes boosting_mode, const FontInfoTable &font_table, const GenericVector< UnicharRating > &results, TrainingSample *sample)
 
bool AccumulateJunk (bool debug, const GenericVector< UnicharRating > &results, TrainingSample *sample)
 
double ReportErrors (int report_level, CountTypes boosting_mode, const FontInfoTable &fontinfo_table, const SampleIterator &it, double *unichar_error, STRING *fonts_report)
 

Static Private Member Functions

static bool ReportString (bool even_if_empty, const Counts &counts, STRING *report)
 
static bool ComputeRates (const Counts &counts, double rates[CT_SIZE])
 

Private Attributes

double scaled_error_
 
double rating_epsilon_
 
GenericVector< Countsfont_counts_
 
GENERIC_2D_ARRAY< int > unichar_counts_
 
GenericVector< int > multi_unichar_counts_
 
STATS ok_score_hist_
 
STATS bad_score_hist_
 
const UNICHARSETunicharset_
 

Constructor & Destructor Documentation

◆ ErrorCounter()

tesseract::ErrorCounter::ErrorCounter ( const UNICHARSET unicharset,
int  fontsize 
)
private

◆ ~ErrorCounter()

tesseract::ErrorCounter::~ErrorCounter ( )
privatedefault

Member Function Documentation

◆ AccumulateErrors()

bool tesseract::ErrorCounter::AccumulateErrors ( bool  debug,
CountTypes  boosting_mode,
const FontInfoTable font_table,
const GenericVector< UnicharRating > &  results,
TrainingSample sample 
)
private

◆ AccumulateJunk()

bool tesseract::ErrorCounter::AccumulateJunk ( bool  debug,
const GenericVector< UnicharRating > &  results,
TrainingSample sample 
)
private

◆ ComputeErrorRate()

double tesseract::ErrorCounter::ComputeErrorRate ( ShapeClassifier classifier,
int  report_level,
CountTypes  boosting_mode,
const FontInfoTable fontinfo_table,
const GenericVector< Pix *> &  page_images,
SampleIterator it,
double *  unichar_error,
double *  scaled_error,
STRING fonts_report 
)
static

◆ ComputeRates()

bool tesseract::ErrorCounter::ComputeRates ( const Counts counts,
double  rates[CT_SIZE] 
)
staticprivate

◆ DebugNewErrors()

void tesseract::ErrorCounter::DebugNewErrors ( ShapeClassifier new_classifier,
ShapeClassifier old_classifier,
CountTypes  boosting_mode,
const FontInfoTable fontinfo_table,
const GenericVector< Pix *> &  page_images,
SampleIterator it 
)
static

◆ ReportErrors()

double tesseract::ErrorCounter::ReportErrors ( int  report_level,
CountTypes  boosting_mode,
const FontInfoTable fontinfo_table,
const SampleIterator it,
double *  unichar_error,
STRING fonts_report 
)
private

◆ ReportString()

bool tesseract::ErrorCounter::ReportString ( bool  even_if_empty,
const Counts counts,
STRING report 
)
staticprivate

Member Data Documentation

◆ bad_score_hist_

STATS tesseract::ErrorCounter::bad_score_hist_
private

◆ font_counts_

GenericVector<Counts> tesseract::ErrorCounter::font_counts_
private

◆ multi_unichar_counts_

GenericVector<int> tesseract::ErrorCounter::multi_unichar_counts_
private

◆ ok_score_hist_

STATS tesseract::ErrorCounter::ok_score_hist_
private

◆ rating_epsilon_

double tesseract::ErrorCounter::rating_epsilon_
private

◆ scaled_error_

double tesseract::ErrorCounter::scaled_error_
private

◆ unichar_counts_

GENERIC_2D_ARRAY<int> tesseract::ErrorCounter::unichar_counts_
private

◆ unicharset_

const UNICHARSET& tesseract::ErrorCounter::unicharset_
private

The documentation for this class was generated from the following files: