#include <pageres.h>
Definition at line 140 of file pageres.h.
| ROW_RES::ROW_RES |
( |
bool |
merge_similar_words, |
|
|
ROW * |
the_row |
|
) |
| |
Definition at line 122 of file pageres.cpp.
133 bool add_next_word =
false;
137 for (word_it.mark_cycle_pt(); !word_it.cycled_list(); word_it.forward()) {
138 auto* word_res =
new WERD_RES(word_it.data());
143 word_res->part_of_combo =
true;
145 }
else if (merge_similar_words) {
146 union_box = word_res->word->bounding_box();
147 add_next_word = !word_res->word->flag(
W_REP_CHAR) &&
149 word_res->odd_size = !add_next_word;
151 WERD* next_word = word_it.data_relative(1);
152 if (merge_similar_words) {
160 int prev_right = union_box.
right();
161 union_box += next_box;
165 add_next_word =
false;
173 if (combo ==
nullptr) {
174 copy_word =
new WERD;
175 *copy_word = *(word_it.data());
179 word_res_it.add_to_end(combo);
181 word_res->part_of_combo =
true;
185 word_res_it.add_to_end(word_res);
WERD_RES_LIST word_res_list
int32_t whole_word_rej_count
const double kMaxWordGapRatio
void copy_on(WERD_RES *word_res)
TBOX bounding_box() const
const double kMaxWordSizeRatio
const double kMaxLineSizeRatio
bool flag(WERD_FLAGS mask) const
void set_flag(WERD_FLAGS mask, bool value)
| int32_t ROW_RES::char_count |
| int32_t ROW_RES::rej_count |
| int32_t ROW_RES::whole_word_rej_count |
| WERD_RES_LIST ROW_RES::word_res_list |
The documentation for this class was generated from the following files: