|
Tesseract
3.02
|
#include <rejctmap.h>
Definition at line 101 of file rejctmap.h.
| REJ::REJ | ( | ) | [inline] |
Definition at line 121 of file rejctmap.h.
{ //constructor
}
| REJ::REJ | ( | const REJ & | source | ) | [inline] |
Definition at line 124 of file rejctmap.h.
{
flags1 = source.flags1;
flags2 = source.flags2;
}
| BOOL8 REJ::accept_if_good_quality | ( | ) |
Definition at line 86 of file rejctmap.cpp.
{ //potential rej?
return (rejected () &&
!perm_rejected () &&
flag (R_BAD_PERMUTER) &&
!flag (R_POOR_MATCH) &&
!flag (R_NOT_TESS_ACCEPTED) &&
!flag (R_CONTAINS_BLANKS) &&
(!rej_between_nn_and_mm () &&
!rej_between_mm_and_quality_accept () &&
!rej_between_quality_and_minimal_rej_accept ()));
}
| BOOL8 REJ::accepted | ( | ) | [inline] |
Definition at line 159 of file rejctmap.h.
{ //Is char accepted?
return !rejected ();
}
| char REJ::display_char | ( | ) | [inline] |
Definition at line 144 of file rejctmap.h.
{
if (perm_rejected ())
return MAP_REJECT_PERM;
else if (accept_if_good_quality ())
return MAP_REJECT_POTENTIAL;
else if (rejected ())
return MAP_REJECT_TEMP;
else
return MAP_ACCEPT;
}
Definition at line 137 of file rejctmap.h.
| void REJ::full_print | ( | FILE * | fp | ) |
Definition at line 237 of file rejctmap.cpp.
{
#ifndef SECURE_NAMES
fprintf (fp, "R_TESS_FAILURE: %s\n", flag (R_TESS_FAILURE) ? "T" : "F");
fprintf (fp, "R_SMALL_XHT: %s\n", flag (R_SMALL_XHT) ? "T" : "F");
fprintf (fp, "R_EDGE_CHAR: %s\n", flag (R_EDGE_CHAR) ? "T" : "F");
fprintf (fp, "R_1IL_CONFLICT: %s\n", flag (R_1IL_CONFLICT) ? "T" : "F");
fprintf (fp, "R_POSTNN_1IL: %s\n", flag (R_POSTNN_1IL) ? "T" : "F");
fprintf (fp, "R_REJ_CBLOB: %s\n", flag (R_REJ_CBLOB) ? "T" : "F");
fprintf (fp, "R_MM_REJECT: %s\n", flag (R_MM_REJECT) ? "T" : "F");
fprintf (fp, "R_BAD_REPETITION: %s\n", flag (R_BAD_REPETITION) ? "T" : "F");
fprintf (fp, "R_POOR_MATCH: %s\n", flag (R_POOR_MATCH) ? "T" : "F");
fprintf (fp, "R_NOT_TESS_ACCEPTED: %s\n",
flag (R_NOT_TESS_ACCEPTED) ? "T" : "F");
fprintf (fp, "R_CONTAINS_BLANKS: %s\n",
flag (R_CONTAINS_BLANKS) ? "T" : "F");
fprintf (fp, "R_BAD_PERMUTER: %s\n", flag (R_BAD_PERMUTER) ? "T" : "F");
fprintf (fp, "R_HYPHEN: %s\n", flag (R_HYPHEN) ? "T" : "F");
fprintf (fp, "R_DUBIOUS: %s\n", flag (R_DUBIOUS) ? "T" : "F");
fprintf (fp, "R_NO_ALPHANUMS: %s\n", flag (R_NO_ALPHANUMS) ? "T" : "F");
fprintf (fp, "R_MOSTLY_REJ: %s\n", flag (R_MOSTLY_REJ) ? "T" : "F");
fprintf (fp, "R_XHT_FIXUP: %s\n", flag (R_XHT_FIXUP) ? "T" : "F");
fprintf (fp, "R_BAD_QUALITY: %s\n", flag (R_BAD_QUALITY) ? "T" : "F");
fprintf (fp, "R_DOC_REJ: %s\n", flag (R_DOC_REJ) ? "T" : "F");
fprintf (fp, "R_BLOCK_REJ: %s\n", flag (R_BLOCK_REJ) ? "T" : "F");
fprintf (fp, "R_ROW_REJ: %s\n", flag (R_ROW_REJ) ? "T" : "F");
fprintf (fp, "R_UNLV_REJ: %s\n", flag (R_UNLV_REJ) ? "T" : "F");
fprintf (fp, "R_HYPHEN_ACCEPT: %s\n", flag (R_HYPHEN_ACCEPT) ? "T" : "F");
fprintf (fp, "R_NN_ACCEPT: %s\n", flag (R_NN_ACCEPT) ? "T" : "F");
fprintf (fp, "R_MM_ACCEPT: %s\n", flag (R_MM_ACCEPT) ? "T" : "F");
fprintf (fp, "R_QUALITY_ACCEPT: %s\n", flag (R_QUALITY_ACCEPT) ? "T" : "F");
fprintf (fp, "R_MINIMAL_REJ_ACCEPT: %s\n",
flag (R_MINIMAL_REJ_ACCEPT) ? "T" : "F");
#endif
}
Definition at line 130 of file rejctmap.h.
{ //from this
flags1 = source.flags1;
flags2 = source.flags2;
return *this;
}
| BOOL8 REJ::perm_rejected | ( | ) |
Definition at line 27 of file rejctmap.cpp.
{ //Is char perm reject?
return (flag (R_TESS_FAILURE) ||
flag (R_SMALL_XHT) ||
flag (R_EDGE_CHAR) ||
flag (R_1IL_CONFLICT) ||
flag (R_POSTNN_1IL) ||
flag (R_REJ_CBLOB) ||
flag (R_BAD_REPETITION) || flag (R_MM_REJECT));
}
| BOOL8 REJ::recoverable | ( | ) | [inline] |
Definition at line 166 of file rejctmap.h.
{
return (rejected () && !perm_rejected ());
}
| BOOL8 REJ::rejected | ( | ) |
Definition at line 76 of file rejctmap.cpp.
{ //Is char rejected?
if (flag (R_MINIMAL_REJ_ACCEPT))
return FALSE;
else
return (perm_rejected () ||
rej_between_quality_and_minimal_rej_accept () ||
(!flag (R_QUALITY_ACCEPT) && rej_before_quality_accept ()));
}
| void REJ::setrej_1Il_conflict | ( | ) |
Definition at line 114 of file rejctmap.cpp.
{ //Initial reject map
set_flag(R_1IL_CONFLICT);
}
| void REJ::setrej_bad_permuter | ( | ) |
Definition at line 156 of file rejctmap.cpp.
{ //POTENTIAL reject_word
set_flag(R_BAD_PERMUTER);
}
| void REJ::setrej_bad_quality | ( | ) |
Definition at line 186 of file rejctmap.cpp.
{ //TEMP reject_word
set_flag(R_BAD_QUALITY);
}
| void REJ::setrej_bad_repetition | ( | ) |
Definition at line 134 of file rejctmap.cpp.
{ //Odd repeated char
set_flag(R_BAD_REPETITION);
}
| void REJ::setrej_block_rej | ( | ) |
Definition at line 196 of file rejctmap.cpp.
{ //TEMP reject_word
set_flag(R_BLOCK_REJ);
}
| void REJ::setrej_contains_blanks | ( | ) |
Definition at line 150 of file rejctmap.cpp.
{
//TEMP reject_word
set_flag(R_CONTAINS_BLANKS);
}
| void REJ::setrej_doc_rej | ( | ) |
Definition at line 191 of file rejctmap.cpp.
{ //TEMP reject_word
set_flag(R_DOC_REJ);
}
| void REJ::setrej_dubious | ( | ) |
Definition at line 166 of file rejctmap.cpp.
{ //PostNN dubious limit
set_flag(R_DUBIOUS);
}
| void REJ::setrej_edge_char | ( | ) |
Definition at line 109 of file rejctmap.cpp.
{ //Close to image edge
set_flag(R_EDGE_CHAR);
}
| void REJ::setrej_hyphen | ( | ) |
Definition at line 161 of file rejctmap.cpp.
{ //PostNN dubious hyphen or .
set_flag(R_HYPHEN);
}
| void REJ::setrej_hyphen_accept | ( | ) |
Definition at line 211 of file rejctmap.cpp.
{ //NN Flipped a char
set_flag(R_HYPHEN_ACCEPT);
}
| void REJ::setrej_minimal_rej_accept | ( | ) |
Definition at line 231 of file rejctmap.cpp.
{
//Accept all except blank
set_flag(R_MINIMAL_REJ_ACCEPT);
}
| void REJ::setrej_mm_accept | ( | ) |
Definition at line 221 of file rejctmap.cpp.
{ //Matrix matcher
set_flag(R_MM_ACCEPT);
}
| void REJ::setrej_mm_reject | ( | ) |
Definition at line 129 of file rejctmap.cpp.
{ //Matrix matcher
set_flag(R_MM_REJECT);
}
| void REJ::setrej_mostly_rej | ( | ) |
Definition at line 176 of file rejctmap.cpp.
{ //TEMP reject_word
set_flag(R_MOSTLY_REJ);
}
| void REJ::setrej_nn_accept | ( | ) |
Definition at line 216 of file rejctmap.cpp.
{ //NN Flipped a char
set_flag(R_NN_ACCEPT);
}
| void REJ::setrej_no_alphanums | ( | ) |
Definition at line 171 of file rejctmap.cpp.
{ //TEMP reject_word
set_flag(R_NO_ALPHANUMS);
}
| void REJ::setrej_not_tess_accepted | ( | ) |
Definition at line 144 of file rejctmap.cpp.
{
//TEMP reject_word
set_flag(R_NOT_TESS_ACCEPTED);
}
| void REJ::setrej_poor_match | ( | ) |
Definition at line 139 of file rejctmap.cpp.
{ //Failed Rays heuristic
set_flag(R_POOR_MATCH);
}
| void REJ::setrej_postNN_1Il | ( | ) |
Definition at line 119 of file rejctmap.cpp.
{ //1Il after NN
set_flag(R_POSTNN_1IL);
}
| void REJ::setrej_quality_accept | ( | ) |
Definition at line 226 of file rejctmap.cpp.
{ //Quality flip a char
set_flag(R_QUALITY_ACCEPT);
}
| void REJ::setrej_rej_cblob | ( | ) |
Definition at line 124 of file rejctmap.cpp.
{ //Insert duff blob
set_flag(R_REJ_CBLOB);
}
| void REJ::setrej_row_rej | ( | ) |
Definition at line 201 of file rejctmap.cpp.
{ //TEMP reject_word
set_flag(R_ROW_REJ);
}
| void REJ::setrej_small_xht | ( | ) |
Definition at line 104 of file rejctmap.cpp.
{ //Small xht char/wd
set_flag(R_SMALL_XHT);
}
| void REJ::setrej_tess_failure | ( | ) |
Definition at line 99 of file rejctmap.cpp.
{ //Tess generated blank
set_flag(R_TESS_FAILURE);
}
| void REJ::setrej_unlv_rej | ( | ) |
Definition at line 206 of file rejctmap.cpp.
{ //TEMP reject_word
set_flag(R_UNLV_REJ);
}
| void REJ::setrej_xht_fixup | ( | ) |
Definition at line 181 of file rejctmap.cpp.
{ //xht fixup
set_flag(R_XHT_FIXUP);
}