#include "memry.h"
#include "bits16.h"
#include "varable.h"
#include "notdll.h"
Go to the source code of this file.
#define MAP_ACCEPT '1' |
#define MAP_REJECT_PERM '0' |
#define MAP_REJECT_POTENTIAL '3' |
#define MAP_REJECT_TEMP '2' |
enum REJ_FLAGS |
Flags for each sort of rejection or acceptance of each character.
Basically, there is a flag for each sort of rejection or acceptance. This provides a history of what has happened to EACH character.
Determining whether a character is CURRENTLY rejected depends on implicit understanding of the SEQUENCE of possible calls. The flags are defined and grouped in the REJ_FLAGS enum. These groupings are used in determining a characters CURRENT rejection status. Basically, a character is ACCEPTED if
none of the permanent rej flags are set AND ( the character has never been rejected OR an accept flag is set which is LATER than the latest reject flag )
IT IS FUNDAMENTAL THAT ANYONE HACKING THIS CODE UNDERSTANDS THE SIGNIFICANCE OF THIS IMPLIED TEMPORAL ORDERING OF THE FLAGS!!!!
R_TESS_FAILURE | PERM Tess didnt classify. |
R_SMALL_XHT | PERM Xht too small. |
R_EDGE_CHAR | PERM Too close to edge of image. |
R_1IL_CONFLICT | PERM 1Il confusion. |
R_POSTNN_1IL | PERM 1Il unrejected by NN. |
R_REJ_CBLOB | PERM Odd blob. |
R_MM_REJECT | PERM Matrix match rejection (m's). |
R_BAD_REPETITION | TEMP Repeated char which doesn't match trend. |
R_POOR_MATCH | TEMP Ray's original heuristic (Not used). |
R_NOT_TESS_ACCEPTED | TEMP Tess didnt accept WERD. |
R_CONTAINS_BLANKS | TEMP Tess failed on other chs in WERD. |
R_BAD_PERMUTER | POTENTIAL Bad permuter for WERD. |
R_HYPHEN | TEMP Post NN dodgy hyphen or full stop. |
R_DUBIOUS | TEMP Post NN dodgy chars. |
R_NO_ALPHANUMS | TEMP No alphanumerics in word after NN. |
R_MOSTLY_REJ | TEMP Most of word rejected so rej the rest. |
R_XHT_FIXUP | TEMP Xht tests unsure. |
R_BAD_QUALITY | TEMP Quality metrics bad for WERD. |
R_DOC_REJ | TEMP Document rejection. |
R_BLOCK_REJ | TEMP Block rejection. |
R_ROW_REJ | TEMP Row rejection. |
R_UNLV_REJ | TEMP ~ turned to - or ^ turned to space. |
R_NN_ACCEPT | NN acceptance. |
R_HYPHEN_ACCEPT | Hyphen acceptance. |
R_MM_ACCEPT | Matrix match acceptance. |
R_QUALITY_ACCEPT | Accept word in good quality doc. |
R_MINIMAL_REJ_ACCEPT | Accept EVERYTHING except tess failures. |
Definition at line 61 of file rejctmap.h.
00062 { 00063 /* Reject modes which are NEVER overridden */ 00064 R_TESS_FAILURE, 00065 R_SMALL_XHT, 00066 R_EDGE_CHAR, 00067 R_1IL_CONFLICT, 00068 R_POSTNN_1IL, 00069 R_REJ_CBLOB, 00070 R_MM_REJECT, 00071 R_BAD_REPETITION, 00072 00073 /* Initial reject modes (pre NN_ACCEPT) */ 00074 R_POOR_MATCH, 00075 R_NOT_TESS_ACCEPTED, 00076 R_CONTAINS_BLANKS, 00077 R_BAD_PERMUTER, 00078 00079 /* Reject modes generated after NN_ACCEPT but before MM_ACCEPT */ 00080 R_HYPHEN, 00081 R_DUBIOUS, 00082 R_NO_ALPHANUMS, 00083 R_MOSTLY_REJ, 00084 R_XHT_FIXUP, 00085 00086 /* Reject modes generated after MM_ACCEPT but before QUALITY_ACCEPT */ 00087 R_BAD_QUALITY, 00088 00089 /* Reject modes generated after QUALITY_ACCEPT but before MINIMAL_REJ accep*/ 00090 R_DOC_REJ, 00091 R_BLOCK_REJ, 00092 R_ROW_REJ, 00093 R_UNLV_REJ, 00094 00095 /* Accept modes which occur inbetween the above rejection groups */ 00096 R_NN_ACCEPT, 00097 R_HYPHEN_ACCEPT, 00098 R_MM_ACCEPT, 00099 R_QUALITY_ACCEPT, 00100 R_MINIMAL_REJ_ACCEPT 00101 };