131 bool add_next_word =
false;
135 for (word_it.mark_cycle_pt(); !word_it.cycled_list(); word_it.forward()) {
136 auto* word_res =
new WERD_RES(word_it.data());
137 word_res->x_height = the_row->
x_height();
141 word_res->part_of_combo =
true;
143 }
else if (merge_similar_words) {
144 union_box = word_res->word->bounding_box();
145 add_next_word = !word_res->word->flag(
W_REP_CHAR) &&
147 word_res->odd_size = !add_next_word;
149 WERD* next_word = word_it.data_relative(1);
150 if (merge_similar_words) {
158 int prev_right = union_box.
right();
159 union_box += next_box;
163 add_next_word =
false;
171 if (combo ==
nullptr) {
172 copy_word =
new WERD;
173 *copy_word = *(word_it.data());
177 word_res_it.add_to_end(combo);
179 word_res->part_of_combo =
true;
183 word_res_it.add_to_end(word_res);
const double kMaxLineSizeRatio
const double kMaxWordSizeRatio
const double kMaxWordGapRatio
@ W_FUZZY_NON
fuzzy nonspace
@ W_REP_CHAR
repeated character
int32_t whole_word_rej_count
WERD_RES_LIST word_res_list
void copy_on(WERD_RES *word_res)
void set_flag(WERD_FLAGS mask, bool value)
TBOX bounding_box() const
bool flag(WERD_FLAGS mask) const