120 WERD_IT word_it(the_row->word_list());
122 WERD_RES *combo =
nullptr;
130 bool add_next_word =
false;
133 the_row->x_height() + the_row->ascenders() - the_row->descenders();
134 for (word_it.mark_cycle_pt(); !word_it.cycled_list(); word_it.forward()) {
135 auto *word_res =
new WERD_RES(word_it.data());
136 word_res->x_height = the_row->x_height();
140 word_res->part_of_combo =
true;
141 combo->copy_on(word_res);
142 }
else if (merge_similar_words) {
143 union_box = word_res->word->bounding_box();
144 add_next_word = !word_res->word->flag(
W_REP_CHAR) &&
146 word_res->odd_size = !add_next_word;
148 WERD *next_word = word_it.data_relative(1);
149 if (merge_similar_words) {
150 if (add_next_word && !next_word->flag(
W_REP_CHAR)) {
156 TBOX next_box = next_word->bounding_box();
157 int prev_right = union_box.right();
158 union_box += next_box;
162 add_next_word =
false;
170 if (combo ==
nullptr) {
171 copy_word =
new WERD;
172 *copy_word = *(word_it.data());
173 combo =
new WERD_RES(copy_word);
174 combo->x_height = the_row->x_height();
175 combo->combination =
true;
176 word_res_it.add_to_end(combo);
178 word_res->part_of_combo =
true;
182 word_res_it.add_to_end(word_res);
@ W_REP_CHAR
repeated character
@ W_FUZZY_NON
fuzzy nonspace
const double kMaxWordSizeRatio
const double kMaxLineSizeRatio
const double kMaxWordGapRatio
WERD_RES_LIST word_res_list
int32_t whole_word_rej_count