|
Tesseract
3.02
|
#include <pageres.h>
Public Member Functions | |
| ROW_RES () | |
| ROW_RES (ROW *the_row) | |
| ~ROW_RES () | |
Public Attributes | |
| ROW * | row |
| inT32 | char_count |
| inT32 | rej_count |
| inT32 | whole_word_rej_count |
| WERD_RES_LIST | word_res_list |
| ROW_RES::ROW_RES | ( | ROW * | the_row | ) |
Definition at line 137 of file pageres.cpp.
{
WERD_IT word_it(the_row->word_list());
WERD_RES_IT word_res_it(&word_res_list);
WERD_RES *combo = NULL; // current combination of fuzzies
WERD_RES *word_res; // current word
WERD *copy_word;
char_count = 0;
rej_count = 0;
whole_word_rej_count = 0;
row = the_row;
for (word_it.mark_cycle_pt(); !word_it.cycled_list(); word_it.forward()) {
word_res = new WERD_RES(word_it.data());
word_res->x_height = the_row->x_height();
if (word_res->word->flag(W_FUZZY_NON)) {
ASSERT_HOST(combo != NULL);
word_res->part_of_combo = TRUE;
combo->copy_on(word_res);
}
if (word_it.data_relative(1)->flag(W_FUZZY_NON)) {
if (combo == NULL) {
copy_word = new WERD;
//deep copy
*copy_word = *(word_it.data());
combo = new WERD_RES(copy_word);
combo->x_height = the_row->x_height();
combo->combination = TRUE;
word_res_it.add_to_end(combo);
}
word_res->part_of_combo = TRUE;
} else {
combo = NULL;
}
word_res_it.add_to_end(word_res);
}
}
| WERD_RES_LIST ROW_RES::word_res_list |