64 void Tesseract::set_done(
70 if (tessedit_ok_mode == 0) {
77 else if (tessedit_ok_mode == 1) {
81 if (word->
done && (pass == 1) && one_ell_conflict (word,
FALSE))
87 else if (tessedit_ok_mode == 2) {
91 if (word->
done && (pass == 1) && one_ell_conflict (word,
FALSE))
101 if (tessedit_rejection_debug)
102 tprintf (
"\nVETO Tess accepting poor word \"%s\"\n",
111 else if (tessedit_ok_mode == 3) {
115 if (word->
done && (pass == 1) && one_ell_conflict (word,
FALSE))
124 if (tessedit_rejection_debug)
125 tprintf (
"\nVETO Tess accepting poor word \"%s\"\n",
134 else if (tessedit_ok_mode == 4) {
138 if (word->
done && (pass == 1) && one_ell_conflict (word,
FALSE))
147 (test_ambig_word (word)))) {
149 if (tessedit_rejection_debug)
150 tprintf (
"\nVETO Tess accepting poor word \"%s\"\n",
159 else if (tessedit_ok_mode == 5) {
163 if (word->
done && (pass == 1) && one_ell_conflict (word,
FALSE))
171 (test_ambig_word (word)))) {
173 if (tessedit_rejection_debug)
174 tprintf (
"\nVETO Tess accepting poor word \"%s\"\n",
182 tprintf (
"BAD tessedit_ok_mode\n");
195 void Tesseract::make_reject_map(
197 BLOB_CHOICE_LIST_CLIST *blob_choices,
205 check_debug_pt(word, -1);
206 set_done(word, pass);
212 if (tessedit_reject_mode == 0) {
215 }
else if (tessedit_reject_mode == 5) {
224 one_ell_conflict(word,
TRUE);
234 if (rej_use_tess_blanks &&
239 if (rej_use_good_perm) {
240 if ((best_choice->
permuter() == SYSTEM_DAWG_PERM ||
241 best_choice->
permuter() == FREQ_DAWG_PERM ||
242 best_choice->
permuter() == USER_DAWG_PERM) &&
243 (!rej_use_sensible_wd ||
244 acceptable_word_string(*word->
uch_set,
249 }
else if (best_choice->
permuter() == NUMBER_PERM) {
250 if (rej_alphas_in_number_perm) {
251 for (i = 0, offset = 0;
269 tprintf(
"BAD tessedit_reject_mode\n");
273 if (tessedit_image_border > -1)
274 reject_edge_blobs(word);
276 check_debug_pt (word, 10);
277 if (tessedit_rejection_debug) {
279 tprintf(
"Certainty: %f Rating: %f\n",
285 check_debug_pt(word, 20);
const STRING & unichar_string() const
bool get_isalpha(UNICHAR_ID unichar_id) const
void rej_word_not_tess_accepted()
void reject_poor_matches(WERD_RES *word, BLOB_CHOICE_LIST_CLIST *blob_choices)
void flip_0O(WERD_RES *word)
void rej_word_bad_permuter()
void flip_hyphens(WERD_RES *word)
const UNICHARSET * uch_set
const char * string() const
DLLSYM void tprintf(const char *format,...)
const STRING & unichar_lengths() const
void rej_word_small_xht()
void rej_word_contains_blanks()
void reject_blanks(WERD_RES *word)
void initialise(inT16 length)
WERD_CHOICE * best_choice