29 "Merge the fragments in the ratings matrix and delete them"
30 " after merging", params()),
36 "force associator to run regardless of what enable_assoc is."
37 "This is used for CJK where component grouping is necessary.",
39 INT_MEMBER(wordrec_num_seg_states, 30,
"Segmentation states",
41 double_MEMBER(wordrec_worst_state, 1.0,
"Worst segmentation state",
44 "Use information from fragments to guide chopping process",
46 INT_MEMBER(repair_unchopped_blobs, 1,
"Fix blobs that aren't chopped",
48 double_MEMBER(tessedit_certainty_threshold, -2.25,
"Good blob limit",
54 BOOL_MEMBER(chop_vertical_creep, 0,
"Vertical creep",
56 INT_MEMBER(chop_split_length, 10000,
"Split Length",
58 INT_MEMBER(chop_same_distance, 2,
"Same distance",
60 INT_MEMBER(chop_min_outline_points, 6,
"Min Number of Points on Outline",
62 INT_MEMBER(chop_inside_angle, -50,
"Min Inside Angle Bend",
64 INT_MEMBER(chop_min_outline_area, 2000,
"Min Outline Area",
66 double_MEMBER(chop_split_dist_knob, 0.5,
"Split length adjustment",
68 double_MEMBER(chop_overlap_knob, 0.9,
"Split overlap adjustment",
70 double_MEMBER(chop_center_knob, 0.15,
"Split center adjustment",
72 double_MEMBER(chop_sharpness_knob, 0.06,
"Split sharpness adjustment",
74 double_MEMBER(chop_width_change_knob, 5.0,
"Width change adjustment",
80 INT_MEMBER(chop_x_y_weight, 3,
"X / Y length weight",
82 INT_MEMBER(segment_adjust_debug, 0,
"Segmentation adjustment debug",
85 "include fixed-pitch heuristics in char segmentation",
88 "use new state cost heuristics for segmentation state evaluation",
91 "base factor for adding segmentation cost into word rating."
92 "It's a multiplying factor, the larger the value above 1, "
93 "the bigger the effect of segmentation cost.",
96 "weight associated with char rating in combined cost of state",
99 "weight associated with width evidence in combined cost of"
102 "weight associated with seam cut in combined cost of state",
105 "max char width-to-height ratio allowed in segmentation",
108 "Debug level for wordrec", params()),
110 "Print blamer debug messages", params()),
112 "Try to set the blame for errors", params()),
114 "Enable new segmentation search path.", params()),
116 "SegSearch debug level", params()),
118 "Maximum number of pain points stored in the queue",
120 INT_MEMBER(segsearch_max_futile_classifications, 10,
121 "Maximum number of pain point classifications per word that"
122 "did not result in finding a better word choice.",
125 "Maximum character width-to-height ratio", params()),
127 "Maximum character width-to-height ratio for"
128 " fixed-pitch fonts",
131 "Save alternative paths found during chopping"
132 " and segmentation search",
152 for (
int i = 0; i < from.
size(); ++i) {
153 BLOB_CHOICE_LIST *cc_list =
new BLOB_CHOICE_LIST();
162 if (choice ==
NULL)
return false;
165 for (i = 0; i < truth_text.
length(); ++i) truth_str += truth_text[i];
167 for (i = 0; i < choice->
length(); ++i) {
170 return (truth_str == normed_choice_str);
184 for (
int i = 0; i < choice->
Length; char_choice++, i++) {
186 char_choice->
Class, 1, 0, 0);
198 tprintf(
"SaveAltChoices: %s %g\n",
void delete_data_pointers()
bool ChoiceIsCorrect(const UNICHARSET &uni_set, const WERD_CHOICE *choice, const GenericVector< STRING > &truth_text)
const STRING & unichar_string() const
void set_rating(float new_val)
const char * get_normed_unichar(UNICHAR_ID unichar_id) const
void SaveAltChoices(const LIST &best_choices, WERD_RES *word)
GenericVector< WERD_CHOICE * > alt_choices
void CopyCharChoices(const BLOB_CHOICE_LIST_VECTOR &from, BLOB_CHOICE_LIST_VECTOR *to)
#define INT_MEMBER(name, val, comment, vec)
GenericVector< GenericVector< int > > alt_states
WERD_CHOICE * prev_word_best_choice_
const UNICHARSET * uch_set
UnicityTable< FontInfo > & get_fontinfo_table()
BLOB_CHOICE_LIST_CLIST * blob_choices
const char * string() const
DLLSYM void tprintf(const char *format,...)
void set_certainty(float new_val)
void(Wordrec::* fill_lattice_)(const MATRIX &ratings, const LIST &best_choices, const UNICHARSET &unicharset, BlamerBundle *blamer_bundle)
#define iterate_list(x, l)
LanguageModel * language_model_
void set_blob_choices(BLOB_CHOICE_LIST_CLIST *blob_choices)
static BLOB_CHOICE * deep_copy(const BLOB_CHOICE *src)
void append_unichar_id_space_allocated(UNICHAR_ID unichar_id, char fragment_length, float rating, float certainty)
const UNICHAR_ID unichar_id(int index) const
#define BOOL_MEMBER(name, val, comment, vec)
#define double_MEMBER(name, val, comment, vec)