All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
REJ Class Reference

#include <rejctmap.h>

Public Member Functions

 REJ ()
 
 REJ (const REJ &source)
 
REJoperator= (const REJ &source)
 
BOOL8 flag (REJ_FLAGS rej_flag)
 
char display_char ()
 
BOOL8 perm_rejected ()
 
BOOL8 rejected ()
 
BOOL8 accepted ()
 
BOOL8 accept_if_good_quality ()
 
BOOL8 recoverable ()
 
void setrej_tess_failure ()
 
void setrej_small_xht ()
 
void setrej_edge_char ()
 
void setrej_1Il_conflict ()
 
void setrej_postNN_1Il ()
 
void setrej_rej_cblob ()
 
void setrej_mm_reject ()
 
void setrej_bad_repetition ()
 
void setrej_poor_match ()
 
void setrej_not_tess_accepted ()
 
void setrej_contains_blanks ()
 
void setrej_bad_permuter ()
 
void setrej_hyphen ()
 
void setrej_dubious ()
 
void setrej_no_alphanums ()
 
void setrej_mostly_rej ()
 
void setrej_xht_fixup ()
 
void setrej_bad_quality ()
 
void setrej_doc_rej ()
 
void setrej_block_rej ()
 
void setrej_row_rej ()
 
void setrej_unlv_rej ()
 
void setrej_nn_accept ()
 
void setrej_hyphen_accept ()
 
void setrej_mm_accept ()
 
void setrej_quality_accept ()
 
void setrej_minimal_rej_accept ()
 
void full_print (FILE *fp)
 

Detailed Description

Definition at line 100 of file rejctmap.h.

Constructor & Destructor Documentation

REJ::REJ ( )
inline

Definition at line 120 of file rejctmap.h.

120  { //constructor
121  }
REJ::REJ ( const REJ source)
inline

Definition at line 123 of file rejctmap.h.

124  {
125  flags1 = source.flags1;
126  flags2 = source.flags2;
127  }

Member Function Documentation

BOOL8 REJ::accept_if_good_quality ( )

Definition at line 83 of file rejctmap.cpp.

83  { //potential rej?
84  return (rejected () &&
85  !perm_rejected () &&
86  flag (R_BAD_PERMUTER) &&
87  !flag (R_POOR_MATCH) &&
90  (!rej_between_nn_and_mm () &&
91  !rej_between_mm_and_quality_accept () &&
92  !rej_between_quality_and_minimal_rej_accept ()));
93 }
BOOL8 rejected()
Definition: rejctmap.cpp:73
BOOL8 perm_rejected()
Definition: rejctmap.cpp:24
BOOL8 flag(REJ_FLAGS rej_flag)
Definition: rejctmap.h:136
BOOL8 REJ::accepted ( )
inline

Definition at line 158 of file rejctmap.h.

158  { //Is char accepted?
159  return !rejected ();
160  }
BOOL8 rejected()
Definition: rejctmap.cpp:73
char REJ::display_char ( )
inline

Definition at line 143 of file rejctmap.h.

143  {
144  if (perm_rejected ())
145  return MAP_REJECT_PERM;
146  else if (accept_if_good_quality ())
147  return MAP_REJECT_POTENTIAL;
148  else if (rejected ())
149  return MAP_REJECT_TEMP;
150  else
151  return MAP_ACCEPT;
152  }
#define MAP_REJECT_POTENTIAL
Definition: rejctmap.h:98
BOOL8 rejected()
Definition: rejctmap.cpp:73
BOOL8 perm_rejected()
Definition: rejctmap.cpp:24
#define MAP_ACCEPT
Definition: rejctmap.h:95
#define MAP_REJECT_TEMP
Definition: rejctmap.h:97
BOOL8 accept_if_good_quality()
Definition: rejctmap.cpp:83
#define MAP_REJECT_PERM
Definition: rejctmap.h:96
BOOL8 REJ::flag ( REJ_FLAGS  rej_flag)
inline

Definition at line 136 of file rejctmap.h.

136  {
137  if (rej_flag < 16)
138  return flags1.bit (rej_flag);
139  else
140  return flags2.bit (rej_flag - 16);
141  }
BOOL8 bit(uinT8 bit_num) const
Definition: bits16.h:56
void REJ::full_print ( FILE *  fp)

Definition at line 234 of file rejctmap.cpp.

234  {
235  fprintf (fp, "R_TESS_FAILURE: %s\n", flag (R_TESS_FAILURE) ? "T" : "F");
236  fprintf (fp, "R_SMALL_XHT: %s\n", flag (R_SMALL_XHT) ? "T" : "F");
237  fprintf (fp, "R_EDGE_CHAR: %s\n", flag (R_EDGE_CHAR) ? "T" : "F");
238  fprintf (fp, "R_1IL_CONFLICT: %s\n", flag (R_1IL_CONFLICT) ? "T" : "F");
239  fprintf (fp, "R_POSTNN_1IL: %s\n", flag (R_POSTNN_1IL) ? "T" : "F");
240  fprintf (fp, "R_REJ_CBLOB: %s\n", flag (R_REJ_CBLOB) ? "T" : "F");
241  fprintf (fp, "R_MM_REJECT: %s\n", flag (R_MM_REJECT) ? "T" : "F");
242  fprintf (fp, "R_BAD_REPETITION: %s\n", flag (R_BAD_REPETITION) ? "T" : "F");
243  fprintf (fp, "R_POOR_MATCH: %s\n", flag (R_POOR_MATCH) ? "T" : "F");
244  fprintf (fp, "R_NOT_TESS_ACCEPTED: %s\n",
245  flag (R_NOT_TESS_ACCEPTED) ? "T" : "F");
246  fprintf (fp, "R_CONTAINS_BLANKS: %s\n",
247  flag (R_CONTAINS_BLANKS) ? "T" : "F");
248  fprintf (fp, "R_BAD_PERMUTER: %s\n", flag (R_BAD_PERMUTER) ? "T" : "F");
249  fprintf (fp, "R_HYPHEN: %s\n", flag (R_HYPHEN) ? "T" : "F");
250  fprintf (fp, "R_DUBIOUS: %s\n", flag (R_DUBIOUS) ? "T" : "F");
251  fprintf (fp, "R_NO_ALPHANUMS: %s\n", flag (R_NO_ALPHANUMS) ? "T" : "F");
252  fprintf (fp, "R_MOSTLY_REJ: %s\n", flag (R_MOSTLY_REJ) ? "T" : "F");
253  fprintf (fp, "R_XHT_FIXUP: %s\n", flag (R_XHT_FIXUP) ? "T" : "F");
254  fprintf (fp, "R_BAD_QUALITY: %s\n", flag (R_BAD_QUALITY) ? "T" : "F");
255  fprintf (fp, "R_DOC_REJ: %s\n", flag (R_DOC_REJ) ? "T" : "F");
256  fprintf (fp, "R_BLOCK_REJ: %s\n", flag (R_BLOCK_REJ) ? "T" : "F");
257  fprintf (fp, "R_ROW_REJ: %s\n", flag (R_ROW_REJ) ? "T" : "F");
258  fprintf (fp, "R_UNLV_REJ: %s\n", flag (R_UNLV_REJ) ? "T" : "F");
259  fprintf (fp, "R_HYPHEN_ACCEPT: %s\n", flag (R_HYPHEN_ACCEPT) ? "T" : "F");
260  fprintf (fp, "R_NN_ACCEPT: %s\n", flag (R_NN_ACCEPT) ? "T" : "F");
261  fprintf (fp, "R_MM_ACCEPT: %s\n", flag (R_MM_ACCEPT) ? "T" : "F");
262  fprintf (fp, "R_QUALITY_ACCEPT: %s\n", flag (R_QUALITY_ACCEPT) ? "T" : "F");
263  fprintf (fp, "R_MINIMAL_REJ_ACCEPT: %s\n",
264  flag (R_MINIMAL_REJ_ACCEPT) ? "T" : "F");
265 }
BOOL8 flag(REJ_FLAGS rej_flag)
Definition: rejctmap.h:136
REJ& REJ::operator= ( const REJ source)
inline

Definition at line 129 of file rejctmap.h.

130  { //from this
131  flags1 = source.flags1;
132  flags2 = source.flags2;
133  return *this;
134  }
BOOL8 REJ::perm_rejected ( )

Definition at line 24 of file rejctmap.cpp.

24  { //Is char perm reject?
25  return (flag (R_TESS_FAILURE) ||
26  flag (R_SMALL_XHT) ||
27  flag (R_EDGE_CHAR) ||
28  flag (R_1IL_CONFLICT) ||
29  flag (R_POSTNN_1IL) ||
30  flag (R_REJ_CBLOB) ||
32 }
BOOL8 flag(REJ_FLAGS rej_flag)
Definition: rejctmap.h:136
BOOL8 REJ::recoverable ( )
inline

Definition at line 165 of file rejctmap.h.

165  {
166  return (rejected () && !perm_rejected ());
167  }
BOOL8 rejected()
Definition: rejctmap.cpp:73
BOOL8 perm_rejected()
Definition: rejctmap.cpp:24
BOOL8 REJ::rejected ( )

Definition at line 73 of file rejctmap.cpp.

73  { //Is char rejected?
75  return FALSE;
76  else
77  return (perm_rejected () ||
78  rej_between_quality_and_minimal_rej_accept () ||
79  (!flag (R_QUALITY_ACCEPT) && rej_before_quality_accept ()));
80 }
BOOL8 perm_rejected()
Definition: rejctmap.cpp:24
BOOL8 flag(REJ_FLAGS rej_flag)
Definition: rejctmap.h:136
#define FALSE
Definition: capi.h:29
void REJ::setrej_1Il_conflict ( )

Definition at line 111 of file rejctmap.cpp.

111  { //Initial reject map
112  set_flag(R_1IL_CONFLICT);
113 }
void REJ::setrej_bad_permuter ( )

Definition at line 153 of file rejctmap.cpp.

153  { //POTENTIAL reject_word
154  set_flag(R_BAD_PERMUTER);
155 }
void REJ::setrej_bad_quality ( )

Definition at line 183 of file rejctmap.cpp.

183  { //TEMP reject_word
184  set_flag(R_BAD_QUALITY);
185 }
void REJ::setrej_bad_repetition ( )

Definition at line 131 of file rejctmap.cpp.

131  { //Odd repeated char
132  set_flag(R_BAD_REPETITION);
133 }
void REJ::setrej_block_rej ( )

Definition at line 193 of file rejctmap.cpp.

193  { //TEMP reject_word
194  set_flag(R_BLOCK_REJ);
195 }
void REJ::setrej_contains_blanks ( )

Definition at line 147 of file rejctmap.cpp.

147  {
148  //TEMP reject_word
149  set_flag(R_CONTAINS_BLANKS);
150 }
void REJ::setrej_doc_rej ( )

Definition at line 188 of file rejctmap.cpp.

188  { //TEMP reject_word
189  set_flag(R_DOC_REJ);
190 }
void REJ::setrej_dubious ( )

Definition at line 163 of file rejctmap.cpp.

163  { //PostNN dubious limit
164  set_flag(R_DUBIOUS);
165 }
void REJ::setrej_edge_char ( )

Definition at line 106 of file rejctmap.cpp.

106  { //Close to image edge
107  set_flag(R_EDGE_CHAR);
108 }
void REJ::setrej_hyphen ( )

Definition at line 158 of file rejctmap.cpp.

158  { //PostNN dubious hyphen or .
159  set_flag(R_HYPHEN);
160 }
void REJ::setrej_hyphen_accept ( )

Definition at line 208 of file rejctmap.cpp.

208  { //NN Flipped a char
209  set_flag(R_HYPHEN_ACCEPT);
210 }
void REJ::setrej_minimal_rej_accept ( )

Definition at line 228 of file rejctmap.cpp.

228  {
229  //Accept all except blank
230  set_flag(R_MINIMAL_REJ_ACCEPT);
231 }
void REJ::setrej_mm_accept ( )

Definition at line 218 of file rejctmap.cpp.

218  { //Matrix matcher
219  set_flag(R_MM_ACCEPT);
220 }
void REJ::setrej_mm_reject ( )

Definition at line 126 of file rejctmap.cpp.

126  { //Matrix matcher
127  set_flag(R_MM_REJECT);
128 }
void REJ::setrej_mostly_rej ( )

Definition at line 173 of file rejctmap.cpp.

173  { //TEMP reject_word
174  set_flag(R_MOSTLY_REJ);
175 }
void REJ::setrej_nn_accept ( )

Definition at line 213 of file rejctmap.cpp.

213  { //NN Flipped a char
214  set_flag(R_NN_ACCEPT);
215 }
void REJ::setrej_no_alphanums ( )

Definition at line 168 of file rejctmap.cpp.

168  { //TEMP reject_word
169  set_flag(R_NO_ALPHANUMS);
170 }
void REJ::setrej_not_tess_accepted ( )

Definition at line 141 of file rejctmap.cpp.

141  {
142  //TEMP reject_word
143  set_flag(R_NOT_TESS_ACCEPTED);
144 }
void REJ::setrej_poor_match ( )

Definition at line 136 of file rejctmap.cpp.

136  { //Failed Rays heuristic
137  set_flag(R_POOR_MATCH);
138 }
void REJ::setrej_postNN_1Il ( )

Definition at line 116 of file rejctmap.cpp.

116  { //1Il after NN
117  set_flag(R_POSTNN_1IL);
118 }
void REJ::setrej_quality_accept ( )

Definition at line 223 of file rejctmap.cpp.

223  { //Quality flip a char
224  set_flag(R_QUALITY_ACCEPT);
225 }
void REJ::setrej_rej_cblob ( )

Definition at line 121 of file rejctmap.cpp.

121  { //Insert duff blob
122  set_flag(R_REJ_CBLOB);
123 }
void REJ::setrej_row_rej ( )

Definition at line 198 of file rejctmap.cpp.

198  { //TEMP reject_word
199  set_flag(R_ROW_REJ);
200 }
void REJ::setrej_small_xht ( )

Definition at line 101 of file rejctmap.cpp.

101  { //Small xht char/wd
102  set_flag(R_SMALL_XHT);
103 }
void REJ::setrej_tess_failure ( )

Definition at line 96 of file rejctmap.cpp.

96  { //Tess generated blank
97  set_flag(R_TESS_FAILURE);
98 }
void REJ::setrej_unlv_rej ( )

Definition at line 203 of file rejctmap.cpp.

203  { //TEMP reject_word
204  set_flag(R_UNLV_REJ);
205 }
void REJ::setrej_xht_fixup ( )

Definition at line 178 of file rejctmap.cpp.

178  { //xht fixup
179  set_flag(R_XHT_FIXUP);
180 }

The documentation for this class was generated from the following files: