Go to the source code of this file.
◆ compute_reject_threshold()
Definition at line 229 of file reject.cpp.
229 {
230 float threshold;
231 float bestgap = 0.0f;
232 float gapstart;
233
234 int blob_count = word->
length();
237 for (int i = 0; i < blob_count; ++i) {
239 }
241 gapstart = ratings[0] - 1;
242 if (blob_count >= 3) {
243 for (int index = 0; index < blob_count - 1; index++) {
244 if (ratings[index + 1] - ratings[index] > bestgap) {
245 bestgap = ratings[index + 1] - ratings[index];
246
247 gapstart = ratings[index];
248 }
249 }
250 }
251 threshold = gapstart + bestgap / 2;
252
253 return threshold;
254}
void resize_no_init(int size)
◆ dont_allow_1Il()
◆ flip_0O()
◆ flip_hyphens()
◆ non_0_digit()
bool non_0_digit |
( |
const char * |
str, |
|
|
int |
length |
|
) |
| |
◆ reject_blanks()
Definition at line 181 of file reject.cpp.
181 {
182 int16_t i;
183 int16_t offset;
184
188
190 }
191}
WERD_CHOICE * best_choice
const STRING & unichar_string() const
const STRING & unichar_lengths() const
◆ reject_poor_matches()
void reject_poor_matches |
( |
WERD_RES * |
word | ) |
|
Definition at line 210 of file reject.cpp.
210 {
217 }
218}
float compute_reject_threshold(WERD_CHOICE *word)
UNICHAR_ID unichar_id(int index) const
◆ word_contains_non_1_digit()
bool word_contains_non_1_digit |
( |
const char * |
word, |
|
|
const char * |
word_lengths |
|
) |
| |