Tesseract  3.02
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.

                                                                       {
  return kIncorrectResultReasonNames[irr];
}
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->incorrect_result_reason = irr;
    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

Definition at line 187 of file pageres.h.

Definition at line 178 of file pageres.h.

Definition at line 196 of file pageres.h.

Definition at line 197 of file pageres.h.

Definition at line 180 of file pageres.h.

Definition at line 172 of file pageres.h.

Definition at line 164 of file pageres.h.


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