#include <pageres.h>
Inheritance diagram for WERD_RES:
Definition at line 164 of file pageres.h.
WERD_RES::WERD_RES | ( | ) | [inline] |
WERD_RES::WERD_RES | ( | WERD * | the_word | ) | [inline] |
Definition at line 249 of file pageres.h.
References best_choice, bold, caps_height, combination, CR_NONE, done, ep_choice, FALSE, font1, font1_count, font2, font2_count, guessed_caps_ht, guessed_x_ht, italic, NULL, outword, part_of_combo, raw_choice, reject_spaces, tess_accepted, tess_failed, tess_would_adapt, TRUE, unlv_crunch_mode, word, and x_height.
00250 { //real word 00251 word = the_word; 00252 outword = NULL; 00253 best_choice = NULL; 00254 raw_choice = NULL; 00255 ep_choice = NULL; 00256 tess_failed = FALSE; 00257 tess_accepted = FALSE; 00258 tess_would_adapt = FALSE; 00259 done = FALSE; 00260 unlv_crunch_mode = CR_NONE; 00261 italic = FALSE; 00262 bold = FALSE; 00263 font1 = -1; 00264 font1_count = 0; 00265 font2 = -1; 00266 font2_count = 0; 00267 x_height = 0.0; 00268 caps_height = 0.0; 00269 guessed_x_ht = TRUE; 00270 guessed_caps_ht = TRUE; 00271 combination = FALSE; 00272 part_of_combo = FALSE; 00273 reject_spaces = FALSE; 00274 }
WERD_RES::WERD_RES | ( | const WERD_RES & | source | ) | [inline] |
WERD_RES::~WERD_RES | ( | ) |
Destructor
Definition at line 186 of file pageres.cpp.
References best_choice, combination, ep_choice, NULL, outword, raw_choice, and word.
00186 { 00187 if (combination) 00188 delete word; 00189 if (outword != NULL) 00190 delete outword; 00191 if (best_choice != NULL) { 00192 delete best_choice; 00193 delete raw_choice; 00194 } 00195 if (ep_choice != NULL) { 00196 delete ep_choice; 00197 } 00198 }
void WERD_RES::copy_on | ( | WERD_RES * | word_res | ) | [inline] |
Definition at line 285 of file pageres.h.
References WERD::copy_on(), WERD::flag(), WERD::set_flag(), W_EOL, and word.
Referenced by ROW_RES::ROW_RES(), and transform_to_next_perm().
00286 { //from this word 00287 word->set_flag (W_EOL, word_res->word->flag (W_EOL)); 00288 word->copy_on (word_res->word); 00289 }
void ELIST_LINK::de_serialise_asc | ( | FILE * | f | ) | [inherited] |
Reimplemented in ICOORDELT.
Definition at line 39 of file elst.cpp.
References ABORT, ERRCODE::error(), and SERIALISE_LINKS.
00040 { 00041 SERIALISE_LINKS.error ("ELIST_LINK::de_serialise_asc", ABORT, 00042 "Don't call this, override!"); 00043 }
Assign word_res
Definition at line 125 of file pageres.cpp.
References best_choice, bold, caps_height, combination, denorm, done, ep_choice, font1, font1_count, font2, font2_count, guessed_caps_ht, guessed_x_ht, italic, NULL, ELIST_LINK::operator=(), outword, part_of_combo, raw_choice, reject_map, reject_spaces, tess_accepted, tess_failed, tess_would_adapt, unlv_crunch_mode, word, and x_height.
00127 { 00128 this->ELIST_LINK::operator= (source); 00129 if (source.combination) { 00130 word = new WERD; 00131 *word = *(source.word); //deep copy 00132 } 00133 else 00134 word = source.word; //pt to same word 00135 00136 if (source.outword != NULL) { 00137 outword = new WERD; 00138 *outword = *(source.outword);//deep copy 00139 } 00140 else 00141 outword = NULL; 00142 00143 denorm = source.denorm; 00144 if (source.best_choice != NULL) { 00145 best_choice = new WERD_CHOICE; 00146 *best_choice = *(source.best_choice); 00147 raw_choice = new WERD_CHOICE; 00148 *raw_choice = *(source.raw_choice); 00149 } 00150 else { 00151 best_choice = NULL; 00152 raw_choice = NULL; 00153 } 00154 if (source.ep_choice != NULL) { 00155 ep_choice = new WERD_CHOICE; 00156 *ep_choice = *(source.ep_choice); 00157 } 00158 else 00159 ep_choice = NULL; 00160 reject_map = source.reject_map; 00161 tess_failed = source.tess_failed; 00162 tess_accepted = source.tess_accepted; 00163 tess_would_adapt = source.tess_would_adapt; 00164 done = source.done; 00165 unlv_crunch_mode = source.unlv_crunch_mode; 00166 italic = source.italic; 00167 bold = source.bold; 00168 font1 = source.font1; 00169 font1_count = source.font1_count; 00170 font2 = source.font2; 00171 font2_count = source.font2_count; 00172 x_height = source.x_height; 00173 caps_height = source.caps_height; 00174 guessed_x_ht = source.guessed_x_ht; 00175 guessed_caps_ht = source.guessed_caps_ht; 00176 combination = source.combination; 00177 part_of_combo = source.part_of_combo; 00178 reject_spaces = source.reject_spaces; 00179 return *this; 00180 }
void ELIST_LINK::serialise_asc | ( | FILE * | f | ) | [inherited] |
Generates an error, as it should never be called.
Definition at line 32 of file elst.cpp.
References ABORT, ERRCODE::error(), and SERIALISE_LINKS.
00033 { 00034 SERIALISE_LINKS.error ("ELIST_LINK::serialise_asc", ABORT, 00035 "Don't call this, override!"); 00036 }
tess output
Definition at line 176 of file pageres.h.
Referenced by adapt_to_good_ems(), break_noisiest_blob_word(), check_block_occ(), check_debug_pt(), classify_word_pass1(), classify_word_pass2(), convert_bad_unlv_chs(), digit_or_numeric_punct(), doc_and_block_rejection(), ensure_rep_chars_are_consistent(), est_ambigs(), eval_word_spacing(), failure_count(), fix_rep_char(), fix_sp_fp_word(), fixspace_dbg(), fixspace_thinks_word_done(), font_recognition_pass(), fp_eval_word_spacing(), garbage_word(), get_rep_char(), improve_estimate(), insert_rej_cblobs(), make_epaper_choice(), match_word_pass2(), merge_tess_fails(), operator=(), potential_word_crunch(), re_estimate_x_ht(), recog_all_words(), reject_all_ems(), reject_all_fullstops(), reject_ambigs(), reject_suspect_fullstops(), set_unlv_suspects(), set_word_fonts(), terrible_word_crunch(), TessBaseAPI::TesseractToText(), tilde_crunch(), tilde_delete(), transform_to_next_perm(), uniformly_spaced(), unrej_good_chs(), unrej_good_quality_words(), WERD_RES(), word_adaptable(), word_char_quality(), word_outline_errs(), worst_noise_blob(), write_map(), write_results(), write_shm_text(), write_unlv_text(), and ~WERD_RES().
Definition at line 201 of file pageres.h.
Referenced by add_in_one_row(), font_recognition_pass(), operator=(), set_word_fonts(), WERD_RES(), and write_shm_text().
float WERD_RES::caps_height |
Post match estimate.
Definition at line 215 of file pageres.h.
Referenced by check_block_occ(), classify_word_pass2(), operator=(), re_estimate_x_ht(), and WERD_RES().
Handling of two fuzzy gap wds.
To deal with fuzzy spaces we need to be able to combine "words" to form combinations when we suspect that the gap is a non-space. The (new) text ord code generates separate words for EVERY fuzzy gap - flags in the word indicate whether the gap is below the threshold (fuzzy kern) and is thus NOT a real word break by default, or above the threshold (fuzzy space) and this is a real word break by default.
The WERD_RES list contains all these words PLUS "combination" words built out of (copies of) the words split by fuzzy kerns. The separate parts have their "part_of_combo" flag set true and should be IGNORED on a default reading of the list.
Combination words are FOLLOWED by the sequence of part_of_combo words which they combine.
Definition at line 240 of file pageres.h.
Referenced by fix_fuzzy_spaces(), fix_noisy_space_list(), fix_sp_fp_word(), initialise_search(), operator=(), ROW_RES::ROW_RES(), transform_to_next_perm(), WERD_RES(), and ~WERD_RES().
for use on outword
Definition at line 174 of file pageres.h.
Referenced by check_block_occ(), classify_word_pass1(), classify_word_pass2(), make_epaper_choice(), match_word_pass2(), operator=(), re_estimate_x_ht(), uniformly_spaced(), unrej_good_chs(), word_blob_quality(), word_char_quality(), and write_shm_text().
ready for output?
Definition at line 199 of file pageres.h.
Referenced by break_noisiest_blob_word(), check_debug_pt(), classify_word_pass1(), classify_word_pass2(), fix_rep_char(), fixspace_dbg(), fixspace_thinks_word_done(), fp_eval_word_spacing(), operator=(), transform_to_next_perm(), and WERD_RES().
FIX: ep text ??
Definition at line 180 of file pageres.h.
Referenced by operator=(), WERD_RES(), write_results(), and ~WERD_RES().
primary font
Definition at line 203 of file pageres.h.
Referenced by add_in_one_row(), font_recognition_pass(), operator=(), set_word_fonts(), WERD_RES(), and write_shm_text().
number of voters
Definition at line 205 of file pageres.h.
Referenced by add_in_one_row(), font_recognition_pass(), operator=(), set_word_fonts(), WERD_RES(), and write_shm_text().
secondary font
Definition at line 207 of file pageres.h.
Referenced by add_in_one_row(), font_recognition_pass(), operator=(), set_word_fonts(), and WERD_RES().
number of voters
Definition at line 209 of file pageres.h.
Referenced by add_in_one_row(), font_recognition_pass(), operator=(), set_word_fonts(), and WERD_RES().
FIX:.
Definition at line 219 of file pageres.h.
Referenced by operator=(), re_estimate_x_ht(), and WERD_RES().
FIX:.
Definition at line 217 of file pageres.h.
Referenced by classify_word_pass2(), operator=(), re_estimate_x_ht(), and WERD_RES().
Definition at line 200 of file pageres.h.
Referenced by add_in_one_row(), font_recognition_pass(), operator=(), set_word_fonts(), WERD_RES(), and write_shm_text().
Definition at line 170 of file pageres.h.
Referenced by adapt_to_good_ems(), adapt_to_good_samples(), break_noisiest_blob_word(), check_block_occ(), classify_word_pass1(), classify_word_pass2(), collect_characters_for_adaption(), collect_ems_for_adaption(), est_ambigs(), fixspace_dbg(), fp_eval_word_spacing(), improve_estimate(), insert_rej_cblobs(), make_epaper_choice(), match_current_words(), match_word_pass2(), merge_tess_fails(), operator=(), re_estimate_x_ht(), suspect_em(), suspect_fullstop(), transform_to_next_perm(), uniformly_spaced(), unrej_good_chs(), WERD_RES(), word_blob_quality(), word_char_quality(), word_deletable(), word_outline_errs(), worst_noise_blob(), write_results(), write_shm_text(), and ~WERD_RES().
part of a combo
Definition at line 242 of file pageres.h.
Referenced by fix_sp_fp_word(), initialise_search(), match_current_words(), operator=(), ROW_RES::ROW_RES(), transform_to_next_perm(), and WERD_RES().
top choice permuter
Definition at line 178 of file pageres.h.
Referenced by break_noisiest_blob_word(), classify_word_pass1(), classify_word_pass2(), match_word_pass2(), operator=(), transform_to_next_perm(), WERD_RES(), and ~WERD_RES().
Best_choice rejects.
Definition at line 182 of file pageres.h.
Referenced by check_block_occ(), check_debug_pt(), classify_word_pass1(), classify_word_pass2(), convert_bad_unlv_chs(), doc_and_block_rejection(), est_ambigs(), eval_word_spacing(), fix_rep_char(), fixspace_dbg(), fixspace_thinks_word_done(), fp_eval_word_spacing(), garbage_word(), get_rep_char(), insert_rej_cblobs(), make_epaper_choice(), match_word_pass2(), merge_tess_fails(), operator=(), potential_word_crunch(), re_estimate_x_ht(), recog_all_words(), PAGE_RES_IT::rej_stat_word(), reject_all_ems(), reject_all_fullstops(), reject_ambigs(), reject_suspect_fullstops(), reject_whole_page(), set_unlv_suspects(), terrible_word_crunch(), unrej_good_chs(), unrej_good_quality_words(), word_char_quality(), word_deletable(), worst_noise_blob(), write_map(), write_results(), write_shm_text(), and write_unlv_text().
Reject spacing?
Definition at line 244 of file pageres.h.
Referenced by doc_and_block_rejection(), operator=(), WERD_RES(), write_map(), and write_unlv_text().
Tess thinks its ok?
Definition at line 195 of file pageres.h.
Referenced by check_debug_pt(), classify_word_pass1(), fixspace_dbg(), fixspace_thinks_word_done(), fp_eval_word_spacing(), match_word_pass2(), operator=(), set_unlv_suspects(), WERD_RES(), and word_adaptable().
Nothing recognized.
If tess_failed is TRUE, one of the following tests failed when Tess returned:
Definition at line 193 of file pageres.h.
Referenced by classify_word_pass1(), classify_word_pass2(), eval_word_spacing(), match_word_pass2(), operator=(), and WERD_RES().
Tess would adapt?
Definition at line 197 of file pageres.h.
Referenced by classify_word_pass1(), operator=(), WERD_RES(), and word_adaptable().
FIX:.
Definition at line 211 of file pageres.h.
Referenced by operator=(), tilde_crunch(), tilde_delete(), WERD_RES(), word_deletable(), and write_results().
Definition at line 168 of file pageres.h.
Referenced by adapt_to_good_ems(), adapt_to_good_samples(), break_noisiest_blob_word(), check_debug_pt(), classify_word_pass1(), classify_word_pass2(), collect_characters_for_adaption(), collect_ems_for_adaption(), copy_on(), doc_and_block_rejection(), fix_fuzzy_spaces(), fix_sp_fp_word(), fixspace_dbg(), make_epaper_choice(), match_word_pass2(), operator=(), output_pass(), ROW_RES::ROW_RES(), tilde_delete(), transform_to_next_perm(), unrej_good_chs(), WERD_RES(), word_blob_quality(), word_char_quality(), write_map(), write_results(), write_shm_text(), write_unlv_text(), and ~WERD_RES().
float WERD_RES::x_height |
Post match estimate.
Definition at line 213 of file pageres.h.
Referenced by check_block_occ(), classify_word_pass2(), operator=(), re_estimate_x_ht(), and WERD_RES().