Tesseract  3.02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BlamerBundle Struct Reference

#include <pageres.h>

List of all members.

Public Member Functions

 BlamerBundle ()
 ~BlamerBundle ()
void ClearResults ()
void CopyTruth (const BlamerBundle &other)
void CopyResults (const BlamerBundle &other)
 BlamerBundle (const BlamerBundle &other)
const char * IncorrectReason () const
bool NoTruth () const
void SetBlame (IncorrectResultReason irr, const STRING &msg, const WERD_CHOICE *choice, bool debug)
void FillDebugString (const STRING &msg, const WERD_CHOICE *choice, STRING *debug)

Static Public Member Functions

static const char * IncorrectReasonName (IncorrectResultReason irr)

Public Attributes

bool truth_has_char_boxes
tesseract::BoxWord truth_word
tesseract::BoxWord norm_truth_word
int norm_box_tolerance
GenericVector< STRINGtruth_text
IncorrectResultReason incorrect_result_reason
STRING debug
STRING misadaption_debug
bool segsearch_is_looking_for_blame
float best_correctly_segmented_rating
GenericVector< int > correct_segmentation_cols
GenericVector< int > correct_segmentation_rows
bool best_choice_is_dict_and_top_choice
char * lattice_data
int lattice_size
tesseract::ParamsTrainingBundle params_training_bundle

Detailed Description

Definition at line 97 of file pageres.h.


Constructor & Destructor Documentation

BlamerBundle::BlamerBundle ( )
inline
BlamerBundle::~BlamerBundle ( )
inline

Definition at line 102 of file pageres.h.

{ delete[] lattice_data; }
BlamerBundle::BlamerBundle ( const BlamerBundle other)
inline

Definition at line 142 of file pageres.h.

{
this->CopyTruth(other);
this->CopyResults(other);
}

Member Function Documentation

void BlamerBundle::CopyTruth ( const BlamerBundle other)
inline
void BlamerBundle::FillDebugString ( const STRING msg,
const WERD_CHOICE choice,
STRING debug 
)

Definition at line 63 of file pageres.cpp.

{
(*debug) += "Truth ";
for (int i = 0; i < this->truth_text.length(); ++i) {
(*debug) += this->truth_text[i];
}
if (!this->truth_has_char_boxes) (*debug) += " (no char boxes)";
if (choice != NULL) {
(*debug) += " Choice ";
STRING choice_str;
choice->string_and_lengths(&choice_str, NULL);
(*debug) += choice_str;
}
if (msg.length() > 0) {
(*debug) += "\n";
(*debug) += msg;
}
(*debug) += "\n";
}
const char * BlamerBundle::IncorrectReason ( ) const

Definition at line 59 of file pageres.cpp.

const char * BlamerBundle::IncorrectReasonName ( IncorrectResultReason  irr)
static

Definition at line 55 of file pageres.cpp.

{
}
bool BlamerBundle::NoTruth ( ) const
inline

Definition at line 147 of file pageres.h.

void BlamerBundle::SetBlame ( IncorrectResultReason  irr,
const STRING msg,
const WERD_CHOICE choice,
bool  debug 
)
inline

Definition at line 151 of file pageres.h.

{
this->debug = this->IncorrectReason();
this->debug += " to blame: ";
this->FillDebugString(msg, choice, &(this->debug));
if (debug) tprintf("SetBlame(): %s", this->debug.string());
}

Member Data Documentation

bool BlamerBundle::best_choice_is_dict_and_top_choice

Definition at line 194 of file pageres.h.

float BlamerBundle::best_correctly_segmented_rating

Definition at line 187 of file pageres.h.

GenericVector<int> BlamerBundle::correct_segmentation_cols

Definition at line 190 of file pageres.h.

GenericVector<int> BlamerBundle::correct_segmentation_rows

Definition at line 191 of file pageres.h.

STRING BlamerBundle::debug

Definition at line 178 of file pageres.h.

IncorrectResultReason BlamerBundle::incorrect_result_reason

Definition at line 176 of file pageres.h.

char* BlamerBundle::lattice_data

Definition at line 196 of file pageres.h.

int BlamerBundle::lattice_size

Definition at line 197 of file pageres.h.

STRING BlamerBundle::misadaption_debug

Definition at line 180 of file pageres.h.

int BlamerBundle::norm_box_tolerance

Definition at line 172 of file pageres.h.

tesseract::BoxWord BlamerBundle::norm_truth_word

Definition at line 170 of file pageres.h.

tesseract::ParamsTrainingBundle BlamerBundle::params_training_bundle

Definition at line 199 of file pageres.h.

bool BlamerBundle::segsearch_is_looking_for_blame

Definition at line 184 of file pageres.h.

bool BlamerBundle::truth_has_char_boxes

Definition at line 164 of file pageres.h.

GenericVector<STRING> BlamerBundle::truth_text

Definition at line 174 of file pageres.h.

tesseract::BoxWord BlamerBundle::truth_word

Definition at line 167 of file pageres.h.


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