50 static const double kStopperAmbiguityThresholdGain = 8.0;
53 static const double kStopperAmbiguityThresholdOffset = 1.5;
67 static double StopperAmbigThreshold(
double f1,
double f2) {
68 return (f2 - f1) * kStopperAmbiguityThresholdGain -
69 kStopperAmbiguityThresholdOffset;
78 bool merge_similar_words,
79 BLOCK_LIST *the_block_list,
82 BLOCK_IT block_it(the_block_list);
84 for (block_it.mark_cycle_pt();
85 !block_it.cycled_list(); block_it.forward()) {
86 block_res_it.add_to_end(
new BLOCK_RES(merge_similar_words,
99 ROW_IT row_it (the_block->
row_list ());
113 for (row_it.mark_cycle_pt(); !row_it.cycled_list(); row_it.forward()) {
114 row_res_it.add_to_end(
new ROW_RES(merge_similar_words, row_it.data()));
135 bool add_next_word =
false;
139 for (word_it.mark_cycle_pt(); !word_it.cycled_list(); word_it.forward()) {
147 }
else if (merge_similar_words) {
151 word_res->
odd_size = !add_next_word;
153 WERD* next_word = word_it.data_relative(1);
154 if (merge_similar_words) {
162 int prev_right = union_box.
right();
163 union_box += next_box;
167 add_next_word =
false;
175 if (combo ==
nullptr) {
176 copy_word =
new WERD;
177 *copy_word = *(word_it.data());
181 word_res_it.add_to_end(combo);
187 word_res_it.add_to_end(word_res);
220 WERD_CHOICE_IT wc_it(const_cast<WERD_CHOICE_LIST*>(&source.
best_choices));
222 for (wc_it.mark_cycle_pt(); !wc_it.cycled_list(); wc_it.forward()) {
224 wc_dest_it.add_after_then_move(
new WERD_CHOICE(*choice));
226 if (!wc_dest_it.empty()) {
227 wc_dest_it.move_to_first();
311 const TBOX* norm_box,
314 bool allow_detailed_fx,
322 (pb !=
nullptr && !pb->
IsText())) {
332 float word_xheight = use_body_size && row !=
nullptr && row->
body_size() > 0.0f
336 norm_mode_hint, norm_box, &
denorm);
366 if (blob_count > 0) {
372 for (b_it.mark_cycle_pt(); !b_it.cycled_list(); b_it.forward()) {
373 TBOX box = b_it.data()->bounding_box();
378 delete [] fake_choices;
410 for (
int b = 0; b < num_blobs; ++b) {
414 if (b + 1 < num_blobs) {
435 for (wc_it.mark_cycle_pt(); !wc_it.cycled_list(); wc_it.forward()) {
447 WERD_CHOICE_IT wc_it(const_cast<WERD_CHOICE_LIST*>(&
best_choices));
448 for (wc_it.forward(); !wc_it.at_first(); wc_it.forward()) {
467 tprintf(
"raw_choice has total of states = %d vs ratings dim of %d\n",
473 for (it.mark_cycle_pt(); !it.cycled_list(); it.forward(), ++index) {
476 tprintf(
"Cooked #%d has total of states = %d vs ratings dim of %d\n",
488 (word_to_debug !=
nullptr && *word_to_debug !=
'\0' &&
best_choice !=
nullptr &&
495 for (it.mark_cycle_pt(); !it.cycled_list(); it.forward(), ++index) {
506 tprintf(
"Best choice: accepted=%d, adaptable=%d, done=%d : ",
523 if (debug_level >= 2)
527 for (it.forward(); !it.at_first(); it.forward(), ++index) {
536 int i = 0, j = 0, chunk = 0;
542 while (i < choice->length() && j < best_choice->length()) {
545 if (debug_level >= 2) {
546 choice->
print(
"WorstCertaintyDiffWorseThan");
548 "i %d j %d Choice->Blob[i].Certainty %.4g" 549 " WorstOtherChoiceCertainty %g Threshold %g\n",
551 tprintf(
"Discarding bad choice #%d\n", index);
558 while (choice_chunk < chunk && ++i < choice->length())
559 choice_chunk += choice->
state(i);
561 while (best_chunk < chunk && ++j < best_choice->length())
577 float avg_rating = 0.0f;
578 int num_error_chunks = 0;
581 while (chunk < end_chunk) {
582 if (chunk >= end_raw_chunk) {
594 if (num_error_chunks > 0) {
595 avg_rating /= num_error_chunks;
596 *thresholds = (avg_rating / -certainty_scale) * (1.0 - rating_margin);
598 *thresholds = max_rating;
601 if (*thresholds > max_rating)
602 *thresholds = max_rating;
603 if (*thresholds < min_rating)
604 *thresholds = min_rating;
634 float max_certainty_delta =
637 if (max_certainty_delta > -kStopperAmbiguityThresholdOffset)
638 max_certainty_delta = -kStopperAmbiguityThresholdOffset;
640 max_certainty_delta) {
644 tprintf(
"Discarding choice \"%s\" with an overly low certainty" 645 " %.3f vs best choice certainty %.3f (Threshold: %.3f)\n",
659 bool inserted =
false;
664 if (choice->
rating() > word_choice->
rating() && !inserted) {
666 it.add_before_stay_put(word_choice);
668 if (num_choices == 0)
679 tprintf(
"Discarding duplicate choice \"%s\", rating %g vs %g\n",
687 if (num_choices > max_num_choices)
691 }
while (!it.at_first());
693 if (!inserted && num_choices < max_num_choices) {
694 it.add_to_end(word_choice);
696 if (num_choices == 0)
704 word_choice->
print(
" Word Choice");
716 template<
class T>
static void MovePointerData(T** dest, T**src) {
725 WERD_CHOICE_IT it(const_cast<WERD_CHOICE_LIST*>(&
best_choices));
726 for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) {
727 if (!it.at_first()) alternates_str +=
"\", \"";
728 alternates_str += it.data()->unichar_string();
730 tprintf(
"Alternates for \"%s\": {\"%s\"}\n",
738 for (
int b = start_blob; b <= last_blob; ++b) {
779 word->seam_array.clear();
790 wc_it.add_list_after(&
word->best_choices);
792 if (
word->blamer_bundle !=
nullptr) {
848 for (
int i = 0; i < word_len; ++i) {
874 for (wc_it.mark_cycle_pt(); !wc_it.cycled_list(); wc_it.forward())
875 wc_it.data()->SetAllScriptPositions(position);
890 for (
int c = 0; c < blob_count; ++c) {
891 BLOB_CHOICE_LIST* choice_list =
new BLOB_CHOICE_LIST;
892 BLOB_CHOICE_IT choice_it(choice_list);
893 choice_it.add_after_then_move(choices[c]);
908 for (
int b = 0; b < num_blobs; ++b) {
910 float rating = INT32_MAX;
911 float certainty = -INT32_MAX;
912 BLOB_CHOICE_LIST* choices =
ratings->
get(b, b);
913 if (choices !=
nullptr && !choices->empty()) {
914 BLOB_CHOICE_IT bc_it(choices);
917 rating = choice->
rating();
948 bool modified =
false;
952 if (new_id != INVALID_UNICHAR_ID &&
968 BLOB_CHOICE_IT bc_it(blob_choices);
969 bc_it.add_before_then_move(blob_choice);
998 static int is_simple_quote(
const char* signed_str,
int length) {
999 const unsigned char* str =
1000 reinterpret_cast<const unsigned char*
>(signed_str);
1002 return (length == 1 && (*str ==
'\'' || *str ==
'`')) ||
1004 (length == 3 && ((*str == 0xe2 &&
1005 *(str + 1) == 0x80 &&
1006 *(str + 2) == 0x98) ||
1008 *(str + 1) == 0x80 &&
1009 *(str + 2) == 0x99)));
1017 if (is_simple_quote(ch, strlen(ch)) &&
1018 is_simple_quote(next_ch, strlen(next_ch)))
1020 return INVALID_UNICHAR_ID;
1039 if (strlen(ch) == 1 && strlen(next_ch) == 1 &&
1040 (*ch ==
'-' || *ch ==
'~') && (*next_ch ==
'-' || *next_ch ==
'~'))
1042 return INVALID_UNICHAR_ID;
1069 return INVALID_UNICHAR_ID;
1086 for (
int index = start; index < start +
count - 1; ++index) {
1089 if (seam !=
nullptr && seam->
HasAnySplits())
return false;
1196 return word_res == other.word_res &&
1197 row_res == other.row_res &&
1198 block_res == other.block_res;
1203 if (other.block_res ==
nullptr) {
1205 if (block_res ==
nullptr)
1209 if (block_res ==
nullptr) {
1212 if (block_res == other.block_res) {
1213 if (other.row_res ==
nullptr || row_res ==
nullptr) {
1217 if (row_res == other.row_res) {
1219 ASSERT_HOST(other.word_res !=
nullptr && word_res !=
nullptr);
1220 if (word_res == other.word_res) {
1226 for (word_res_it.mark_cycle_pt(); !word_res_it.cycled_list();
1227 word_res_it.forward()) {
1228 if (word_res_it.data() == word_res) {
1230 }
else if (word_res_it.data() == other.word_res) {
1234 ASSERT_HOST(
"Error: Incomparable PAGE_RES_ITs" ==
nullptr);
1239 for (row_res_it.mark_cycle_pt(); !row_res_it.cycled_list();
1240 row_res_it.forward()) {
1241 if (row_res_it.data() == row_res) {
1243 }
else if (row_res_it.data() == other.row_res) {
1247 ASSERT_HOST(
"Error: Incomparable PAGE_RES_ITs" ==
nullptr);
1252 for (block_res_it.mark_cycle_pt();
1253 !block_res_it.cycled_list(); block_res_it.forward()) {
1254 if (block_res_it.data() == block_res) {
1256 }
else if (block_res_it.data() == other.block_res) {
1261 ASSERT_HOST(
"Error: Incomparable PAGE_RES_ITs" ==
nullptr);
1276 WERD_RES_IT wr_it(&
row()->word_res_list);
1277 for (wr_it.mark_cycle_pt(); !wr_it.cycled_list(); wr_it.forward()) {
1279 if (
word == word_res)
1283 wr_it.add_before_then_move(new_res);
1284 if (wr_it.at_first()) {
1295 static void ComputeBlobEnds(
const WERD_RES& word, C_BLOB_LIST* next_word_blobs,
1301 TBOX blob_box = blob_it.data()->bounding_box();
1303 for (
int b = 1; b < length; ++b) {
1304 blob_box += blob_it.data()->bounding_box();
1309 int blob_end = INT32_MAX;
1310 if (!blob_it.at_first() || next_word_blobs !=
nullptr) {
1311 if (blob_it.at_first())
1312 blob_it.set_to_list(next_word_blobs);
1313 blob_end = (blob_box.
right() + blob_it.data()->bounding_box().left()) / 2;
1324 if (words->
empty()) {
1331 (*words)[0]->word->set_flag(
W_BOL,
true);
1333 (*words)[0]->word->set_blanks(input_word->
word->
space());
1343 WERD_IT w_it(
row()->
row->word_list());
1345 for (w_it.mark_cycle_pt(); !w_it.cycled_list(); w_it.forward()) {
1354 WERD_RES_IT wr_it(&
row()->word_res_list);
1355 for (wr_it.mark_cycle_pt(); !wr_it.cycled_list(); wr_it.forward()) {
1357 if (
word == input_word)
1367 for (
int w = 0; w < words->
size(); ++w) {
1371 C_BLOB_LIST* next_word_blobs =
1372 w + 1 < words->
size() ? (*words)[w + 1]->word->cblob_list() :
nullptr;
1373 ComputeBlobEnds(*word_w, next_word_blobs, &blob_ends);
1379 for (
int i = 0; i < blob_ends.
size(); ++i) {
1380 int end_x = blob_ends[i];
1383 while (!src_b_it.empty() &&
1384 src_b_it.data()->bounding_box().x_middle() < end_x) {
1385 blob_box += src_b_it.data()->bounding_box();
1386 dest_it.add_after_then_move(src_b_it.extract());
1389 while (!rej_b_it.empty() &&
1390 rej_b_it.data()->bounding_box().x_middle() < end_x) {
1391 blob_box += rej_b_it.data()->bounding_box();
1392 dest_it.add_after_then_move(rej_b_it.extract());
1398 if (i > 0 && blob_box.
left() < blob_ends[i - 1])
1399 blob_box.
set_left(blob_ends[i - 1]);
1400 if (blob_box.
right() > end_x)
1402 box_word->InsertBox(i, blob_box);
1407 for (
int i = 0; i < box_word->length(); ++i) {
1408 TBOX box = box_word->BlobBox(i);
1412 for (dest_it.mark_cycle_pt(); !dest_it.cycled_list();
1413 dest_it.forward()) {
1414 TBOX blob_box = dest_it.data()->bounding_box();
1415 if (blob_box.
left() < blob_ends[i] &&
1416 (i == 0 || blob_box.
right() >= blob_ends[i - 1])) {
1417 if (i > 0 && blob_box.
left() < blob_ends[i - 1])
1418 blob_box.
set_left(blob_ends[i - 1]);
1419 if (blob_box.
right() > blob_ends[i])
1421 box_word->ChangeBox(i, blob_box);
1432 w_it.add_before_stay_put(word_w->
word);
1435 (*words)[w] =
nullptr;
1436 wr_it.add_before_stay_put(word_w);
1444 delete w_it.extract();
1445 delete wr_it.extract();
1458 WERD_IT w_it(
row()->
row->word_list());
1459 for (w_it.mark_cycle_pt(); !w_it.cycled_list(); w_it.forward()) {
1460 if (w_it.data() == word_res->
word) {
1465 delete w_it.extract();
1469 WERD_RES_IT wr_it(&
row()->word_res_list);
1470 for (wr_it.mark_cycle_pt(); !wr_it.cycled_list(); wr_it.forward()) {
1471 if (wr_it.data() == word_res) {
1477 delete wr_it.extract();
1490 WERD_RES_IT wr_it(&
row()->word_res_list);
1491 for (wr_it.mark_cycle_pt();
1492 !wr_it.cycled_list() && wr_it.data() != word_res; wr_it.forward()) {
1496 real_word = wr_it.data()->word;
1512 block_res_it.mark_cycle_pt();
1513 prev_block_res =
nullptr;
1514 prev_row_res =
nullptr;
1515 prev_word_res =
nullptr;
1516 block_res =
nullptr;
1519 next_block_res =
nullptr;
1520 next_row_res =
nullptr;
1521 next_word_res =
nullptr;
1522 internal_forward(
true, empty_ok);
1523 return internal_forward(
false, empty_ok);
1534 if (row_res == next_row_res) {
1537 word_res_it.move_to_first();
1538 for (word_res_it.mark_cycle_pt();
1539 !word_res_it.cycled_list() && word_res_it.data() != next_word_res;
1540 word_res_it.forward()) {
1541 if (!word_res_it.data()->part_of_combo) {
1542 if (prev_row_res == row_res) prev_word_res = word_res;
1543 word_res = word_res_it.data();
1547 word_res_it.forward();
1551 for (wr_it.mark_cycle_pt(); !wr_it.cycled_list(); wr_it.forward()) {
1552 if (!wr_it.data()->part_of_combo) {
1553 if (prev_row_res == row_res) prev_word_res = word_res;
1554 word_res = wr_it.data();
1575 WERD_RES *PAGE_RES_IT::internal_forward(
bool new_block,
bool empty_ok) {
1576 bool new_row =
false;
1578 prev_block_res = block_res;
1579 prev_row_res = row_res;
1580 prev_word_res = word_res;
1581 block_res = next_block_res;
1582 row_res = next_row_res;
1583 word_res = next_word_res;
1584 next_block_res =
nullptr;
1585 next_row_res =
nullptr;
1586 next_word_res =
nullptr;
1588 while (!block_res_it.cycled_list()) {
1591 row_res_it.set_to_list(&block_res_it.data()->row_res_list);
1592 row_res_it.mark_cycle_pt();
1593 if (row_res_it.empty() && empty_ok) {
1594 next_block_res = block_res_it.data();
1599 while (!row_res_it.cycled_list()) {
1602 word_res_it.set_to_list(&row_res_it.data()->word_res_list);
1603 word_res_it.mark_cycle_pt();
1606 while (!word_res_it.cycled_list() && word_res_it.data()->part_of_combo)
1607 word_res_it.forward();
1608 if (!word_res_it.cycled_list()) {
1609 next_block_res = block_res_it.data();
1610 next_row_res = row_res_it.data();
1611 next_word_res = word_res_it.data();
1612 word_res_it.forward();
1616 row_res_it.forward();
1620 block_res_it.forward();
1627 (new_block || prev_word_res ==
nullptr) ?
nullptr : prev_word_res->
best_choice;
1639 if (!row)
return nullptr;
1653 while (block_res == next_block_res &&
1654 (next_row_res !=
nullptr && next_row_res->
row !=
nullptr &&
1656 internal_forward(
false,
true);
1658 return internal_forward(
false,
true);
1668 while (block_res == next_block_res) {
1669 internal_forward(
false,
true);
1671 return internal_forward(
false,
true);
1675 int16_t chars_in_word;
1676 int16_t rejects_in_word = 0;
1686 block_res->
rej_count += rejects_in_word;
1688 if (chars_in_word == rejects_in_word)
void BLNormalize(const BLOCK *block, const ROW *row, Pix *pix, bool inverse, float x_height, float baseline_shift, bool numeric_mode, tesseract::OcrEngineMode hint, const TBOX *norm_box, DENORM *word_denorm)
void DebugTopChoice(const char *msg) const
void set_unichar_id(UNICHAR_ID unichar_id, int index)
void ReplaceCurrentWord(tesseract::PointerVector< WERD_RES > *words)
bool PiecesAllNatural(int start, int count) const
WERD_CHOICE_LIST best_choices
WERD_RES_LIST word_res_list
void ConsumeWordResults(WERD_RES *word)
UNICHAR_ID BothHyphens(UNICHAR_ID id1, UNICHAR_ID id2)
const double kMaxWordGapRatio
void MergeAdjacentBlobs(int index)
void remove_unichar_id(int index)
void delete_matrix_pointers()
WERD_RES * start_page(bool empty_ok)
void FakeWordFromRatings(PermuterType permuter)
const double kMaxLineSizeRatio
void SetupBlobWidthsAndGaps()
void CopyResults(const BlamerBundle &other)
tesseract::BoxWord * bln_boxes
WERD_RES * forward_paragraph()
int32_t whole_word_rej_count
MATRIX_COORD MatrixCoord(int index) const
void start_seam_list(TWERD *word, GenericVector< SEAM *> *seam_array)
void SetAllScriptPositions(tesseract::ScriptPos position)
GenericVector< int > blob_widths
const int kWordrecMaxNumJoinChunks
void move(GenericVector< T > *from)
void ComputeAdaptionThresholds(float certainty_scale, float min_rating, float max_rating, float rating_margin, float *thresholds)
int GetBlobsGap(int blob_index)
void ClipToOriginalWord(const BLOCK *block, WERD *original_word)
void append_unichar_id_space_allocated(UNICHAR_ID unichar_id, int blob_count, float rating, float certainty)
MATRIX * ConsumeAndMakeBigger(int ind)
const char * string() const
void CopySimpleFields(const WERD_RES &source)
int state(int index) const
TBOX bounding_box() const
BLOB_CHOICE_LIST * GetBlobChoices(int index) const
void InsertSeam(int blob_number, SEAM *seam)
void MergeBoxes(int start, int end)
bool HyphenBoxesOverlap(const TBOX &box1, const TBOX &box2)
ROW_LIST * row_list()
get rows
const BLOCK * block() const
ROW_RES_LIST row_res_list
static void JoinPieces(const GenericVector< SEAM *> &seams, const GenericVector< TBLOB *> &blobs, int first, int last)
static void BreakPieces(const GenericVector< SEAM *> &seams, const GenericVector< TBLOB *> &blobs, int first, int last)
bool AlternativeChoiceAdjustmentsWorseThan(float threshold) const
const FontInfo * fontinfo
void UpdateStateForSplit(int blob_position)
UNICHAR_ID unichar_to_id(const char *const unichar_repr) const
bool operator==(const PAGE_RES_IT &other) const
_ConstTessMemberResultCallback_0_0< false, R, T1 >::base * NewPermanentTessCallback(const T1 *obj, R(T2::*member)() const)
UNICHAR_ID BothSpaces(UNICHAR_ID id1, UNICHAR_ID id2)
void set_flag(WERD_FLAGS mask, bool value)
bool script_has_xheight() const
void CopyTruth(const BlamerBundle &other)
C_BLOB_LIST * rej_cblob_list()
BLOCK_RES_LIST block_res_list
const TBOX & BlobBox(int index) const
int GetBlobsWidth(int start_blob, int last_blob)
bool Valid(const MATRIX &m) const
WERD_RES * forward_block()
void SetScriptPositions()
int8_t fontinfo_id2_count
GenericVector< STRING > correct_text
bool dangerous_ambig_found() const
bool PrepareToInsertSeam(const GenericVector< SEAM *> &seams, const GenericVector< TBLOB *> &blobs, int insert_index, bool modify)
void IncreaseBandSize(int bandwidth)
WERD_RES * restart_page()
void FilterWordChoices(int debug_level)
bool flag(WERD_FLAGS mask) const
void DebugWordChoices(bool debug, const char *word_to_debug)
void insert(const T &t, int index)
CRUNCH_MODE unlv_crunch_mode
WERD_RES & operator=(const WERD_RES &source)
void PrintBestChoices() const
bool contains_unichar(const char *const unichar_repr) const
void set_unichar_id(UNICHAR_ID newunichar_id)
void init_to_size(int size, const T &t)
WERD_CHOICE ** prev_word_best_choice
void FakeClassifyWord(int blob_count, BLOB_CHOICE **choices)
void operator=(const ELIST_LINK &)
bool LogNewRawChoice(WERD_CHOICE *word_choice)
void copy_on(WERD_RES *word_res)
GenericVector< int > best_state
bool ConditionalBlobMerge(TessResultCallback2< UNICHAR_ID, UNICHAR_ID, UNICHAR_ID > *class_cb, TessResultCallback2< bool, const TBOX &, const TBOX &> *box_cb)
bool SetupForRecognition(const UNICHARSET &unicharset_in, tesseract::Tesseract *tesseract, Pix *pix, int norm_mode, const TBOX *norm_box, bool numeric_mode, bool use_body_size, bool allow_detailed_fx, ROW *row, const BLOCK *block)
POLY_BLOCK * poly_block() const
#define ELISTIZE(CLASSNAME)
void BestChoiceToCorrectText()
void CloneChoppedToRebuild()
static BoxWord * CopyFromNormalized(TWERD *tessword)
bool get_enabled(UNICHAR_ID unichar_id) const
UNICHAR_ID unichar_id(int index) const
DLLSYM void tprintf(const char *format,...)
TBOX bounding_box() const
float adjust_factor() const
void put(ICOORD pos, const T &thing)
C_BLOB_LIST * cblob_list()
GenericVector< SEAM * > seam_array
void set_script_id(int id)
int cmp(const PAGE_RES_IT &other) const
GenericVector< int > blob_gaps
GenericVector< TBLOB * > blobs
void string_and_lengths(STRING *word_str, STRING *word_lengths_str) const
void add_str_int(const char *str, int number)
void SetupFake(const UNICHARSET &uch)
void MakeCurrentWordFuzzy()
void SetupWordScript(const UNICHARSET &unicharset_in)
tesseract::Tesseract * tesseract
const double kMaxWordSizeRatio
void SetupBasicsFromChoppedWord(const UNICHARSET &unicharset_in)
static int SortByXMiddle(const void *v1, const void *v2)
WERD_RES * InsertSimpleCloneWord(const WERD_RES &clone_res, WERD *new_word)
void MergeBlobs(int start, int end)
const UNICHARSET * uch_set
const char * id_to_unichar(UNICHAR_ID id) const
void delete_data_pointers()
BlamerBundle * blamer_bundle
void InitForRetryRecognition(const WERD_RES &source)
const STRING & unichar_string() const
BLOB_CHOICE * FindMatchingChoice(UNICHAR_ID char_id, BLOB_CHOICE_LIST *bc_list)
void SetScriptPositions(bool small_caps, TWERD *word, int debug=0)
CLISTIZE(BLOCK_RES) ELISTIZE(ROW_RES) ELISTIZE(WERD_RES) static const double kStopperAmbiguityThresholdGain
static TWERD * PolygonalCopy(bool allow_detailed_fx, WERD *src)
void SetAllScriptPositions(tesseract::ScriptPos position)
void ComputeBoundingBoxes()
void ReplaceBestChoice(WERD_CHOICE *choice)
bool HasAnySplits() const
UNICHAR_ID BothQuotes(UNICHAR_ID id1, UNICHAR_ID id2)
UNICHAR_ID unichar_id() const
WERD_CHOICE * best_choice
void SetupNormTruthWord(const DENORM &denorm)
bool LogNewCookedChoice(int max_num_choices, bool debug, WERD_CHOICE *word_choice)
tesseract::BoxWord * box_word
void InsertBox(int index, const TBOX &box)
BLOB_CHOICE_LIST * blob_choices(int index, MATRIX *ratings) const
BLOB_CHOICE * GetBlobChoice(int index) const
void initialise(int16_t length)
int TotalOfStates() const
void remove_pos(int16_t pos)
const FontInfo * fontinfo2
void set_permuter(uint8_t perm)