63 const char *
string,
C_COL color,
66 BLOB_CHOICE_LIST *choices =
NULL;
67 #ifndef GRAPHICS_DISABLED
72 if (choices ==
NULL) {
88 BLOB_CHOICE_IT choices_it(choices);
90 bool incorrect_adapted =
false;
91 UNICHAR_ID incorrect_adapted_id = INVALID_UNICHAR_ID;
92 const char *truth_str = blamer_bundle->
truth_text[b].string();
93 for (choices_it.mark_cycle_pt(); !choices_it.cycled_list();
94 choices_it.forward()) {
95 if (strcmp(truth_str,
getDict().getUnicharset().get_normed_unichar(
96 choices_it.data()->unichar_id())) == 0) {
99 }
else if (choices_it.data()->adapted()) {
100 incorrect_adapted =
true;
101 incorrect_adapted_id = choices_it.data()->unichar_id();
105 STRING debug =
"unichar ";
107 debug +=
" not found in classification list";
110 }
else if (incorrect_adapted) {
111 STRING debug =
"better rating for adapted ";
113 incorrect_adapted_id);
114 debug +=
" than for correct ";
124 #ifndef GRAPHICS_DISABLED
137 float rating,
float certainty) {
138 BLOB_CHOICE_LIST *ratings =
new BLOB_CHOICE_LIST();
140 new BLOB_CHOICE(class_id, rating, certainty, -1, -1, 0, 0, 0,
false);
141 BLOB_CHOICE_IT temp_it(ratings);
142 temp_it.add_after_stay_put(choice);
156 for (; tblob !=
NULL && index < choices.
length();
157 tblob = tblob->
next, index++) {
bool wordrec_display_all_blobs
const char *const id_to_unichar(UNICHAR_ID id) const
IncorrectResultReason incorrect_result_reason
bool x_almost_equal(const TBOX &box, int tolerance) const
void put_match(TBLOB *blob, BLOB_CHOICE_LIST *ratings)
BlobMatchTable blob_match_table
const UNICHARSET & getUnicharset() const
void add_to_match(TBLOB *blob, BLOB_CHOICE_LIST *ratings)
char window_wait(ScrollView *win)
tesseract::BoxWord norm_truth_word
BLOB_CHOICE_LIST * fake_classify_blob(UNICHAR_ID class_id, float rating, float certainty)
BLOB_CHOICE_LIST * call_matcher(const DENORM *denorm, TBLOB *blob)
void print_ratings_list(const char *msg, BLOB_CHOICE_LIST *ratings, const UNICHARSET ¤t_unicharset)
GenericVector< STRING > truth_text
void SetBlame(IncorrectResultReason irr, const STRING &msg, const WERD_CHOICE *choice, bool debug)
bool wordrec_debug_blamer
TBOX bounding_box() const
bool truth_has_char_boxes
const TBOX & BlobBox(int index) const
BLOB_CHOICE_LIST * get_match(TBLOB *blob)
void display_blob(TBLOB *blob, C_COL color)
void update_blob_classifications(TWERD *word, const BLOB_CHOICE_LIST_VECTOR &choices)
BLOB_CHOICE_LIST * classify_blob(TBLOB *blob, const DENORM &denorm, const char *string, C_COL color, BlamerBundle *blamer_bundle)