#include <pageres.h>
Definition at line 138 of file pageres.h.
◆ ROW_RES() [1/2]
◆ ROW_RES() [2/2]
ROW_RES::ROW_RES |
( |
bool |
merge_similar_words, |
|
|
ROW * |
the_row |
|
) |
| |
Definition at line 120 of file pageres.cpp.
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());
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);
bool flag(WERD_FLAGS mask) const
void copy_on(WERD_RES *word_res)
const double kMaxWordGapRatio
int32_t whole_word_rej_count
TBOX bounding_box() const
void set_flag(WERD_FLAGS mask, bool value)
WERD_RES_LIST word_res_list
const double kMaxWordSizeRatio
const double kMaxLineSizeRatio
◆ ~ROW_RES()
◆ char_count
int32_t ROW_RES::char_count |
◆ rej_count
int32_t ROW_RES::rej_count |
◆ row
◆ whole_word_rej_count
int32_t ROW_RES::whole_word_rej_count |
◆ word_res_list
WERD_RES_LIST ROW_RES::word_res_list |
The documentation for this class was generated from the following files: