#include "stopper.h"
#include "emalloc.h"
#include "matchdefs.h"
#include "general.h"
#include <stdio.h>
#include "unichar.h"
#include "callcpp.h"
#include "permute.h"
#include "context.h"
#include "danerror.h"
#include "const.h"
#include "freelist.h"
#include "efio.h"
#include "scanutils.h"
#include "varable.h"
#include "dict.h"
#include "image.h"
#include "ccutil.h"
#include "ratngs.h"
#include "ambigs.h"
#include <string.h>
#include <ctype.h>
#include <math.h>
#define AmbigThreshold | ( | F1, | |||
F2 | ) |
(((F2) - (F1)) * stopper_ambiguity_threshold_gain - \ stopper_ambiguity_threshold_offset)
#define BestCertainty | ( | Choices | ) | (((VIABLE_CHOICE) first_node (Choices))->Certainty) |
---------------------------------------------------------------------------- Macros ----------------------------------------------------------------------------
#define BestFactor | ( | Choices | ) | (((VIABLE_CHOICE) first_node (Choices))->AdjustFactor) |
#define BestRating | ( | Choices | ) | (((VIABLE_CHOICE) first_node (Choices))->Rating) |
#define MAX_WERD_SIZE 100 |
---------------------------------------------------------------------------- Include Files and Type Defines ----------------------------------------------------------------------------
void AddNewChunk | ( | VIABLE_CHOICE | Choice, | |
int | Blob | |||
) |
---------------------------------------------------------------------------- Private Code ----------------------------------------------------------------------------
int CmpChoiceRatings | ( | void * | arg1, | |
void * | arg2 | |||
) |
void ExpandChoice | ( | VIABLE_CHOICE | Choice, | |
EXPANDED_CHOICE * | ExpandedChoice | |||
) |
int FreeBadChoice | ( | void * | item1, | |
void * | item2 | |||
) |
int UniformCertainties | ( | const BLOB_CHOICE_LIST_VECTOR & | Choices, | |
const WERD_CHOICE & | BestChoice | |||
) |
double certainty_scale = 20.0 |
---------------------------------------------------------------------- V a r i a b l e s ---------------------------------------------------------------------- "Certainty scaling factor"
bool save_raw_choices = false |
"Save all explored raw choices"
double stopper_allowable_character_badness = 3.0 |
"Max certaintly variation allowed in a word (in sigma)"
double stopper_ambiguity_threshold_gain = 8.0 |
"Gain factor for ambiguity threshold"
double stopper_ambiguity_threshold_offset = 1.5 |
"Certainty offset for ambiguity threshold"
double stopper_certainty_per_char = -0.50 |
"Certainty to add for each dict char above small word size."
int stopper_debug_level = 0 |
"Stopper debug level"
bool stopper_no_acceptable_choices = false |
"Make AcceptableChoice() always return false. Useful" " when there is a need to explore all segmentations"
double stopper_nondict_certainty_base = -2.50 |
"Certainty threshold for non-dict words"
double stopper_phase2_certainty_rejection_offset = 1.0 |
"Reject certainty offset"
int stopper_smallword_size = 2 |
"Size of dict word to be treated as non-dict word"
int tessedit_truncate_wordchoice_log = 10 |
"Max words to keep in list"
char* word_to_debug = "" |
"Word for which stopper debug information" " should be printed to stdout"
char* word_to_debug_lengths = "" |
"Lengths of unichars in word_to_debug"