73 {
74 ViterbiStateEntry *curr_vse = vse;
75 BLOB_CHOICE *curr_b = vse->curr_b;
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92 while (curr_vse->parent_vse != nullptr) {
93 ViterbiStateEntry *parent_vse = curr_vse->parent_vse;
94 const MATRIX_COORD &curr_cell = curr_b->matrix_cell();
95 const MATRIX_COORD &parent_cell = parent_vse->curr_b->matrix_cell();
96 MATRIX_COORD pain_coord(parent_cell.col, curr_cell.row);
97 if (!pain_coord.Valid(*word_res->ratings) ||
98 !word_res->ratings->Classified(parent_cell.col, curr_cell.row, dict_->
WildcardID())) {
99
100
101
102 float rat_subtr = curr_b->rating() + parent_vse->curr_b->rating();
103
104 float ol_subtr =
107
108 float ol_dif = vse->outline_length - ol_subtr;
109
110
111 float priority = ol_dif > 0 ? (vse->ratings_sum - rat_subtr) / ol_dif : 0.0;
113 max_char_wh_ratio_, word_res);
114 } else if (debug_level_ > 3) {
115 tprintf(
"NO pain point (Classified) for col=%d row=%d type=%s\n", pain_coord.col,
117 BLOB_CHOICE_IT b_it(word_res->ratings->get(pain_coord.col, pain_coord.row));
118 for (b_it.mark_cycle_pt(); !b_it.cycled_list(); b_it.forward()) {
119 BLOB_CHOICE *choice = b_it.data();
120 choice->print_full();
121 }
122 }
123
124 curr_vse = parent_vse;
125 curr_b = curr_vse->curr_b;
126 }
127}
void tprintf(const char *format,...)
UNICHAR_ID WildcardID() const
static float ComputeOutlineLength(float rating_cert_scale, const BLOB_CHOICE &b)