79 prev_word_best_choice =
NULL;
85 PAGE_RES(
bool merge_similar_words,
86 BLOCK_LIST *block_list,
136 ROW_RES(
bool merge_similar_words,
ROW *the_row);
342 const char*
const BestUTF8(
int blob_index,
bool in_rtl_context)
const {
343 if (blob_index < 0 || best_choice ==
NULL ||
344 blob_index >= best_choice->
length())
347 if (id < 0 || id >= uch_set->
size() ||
id == INVALID_UNICHAR_ID)
350 if (in_rtl_context && mirrored > 0 && mirrored != INVALID_UNICHAR_ID)
355 const char*
const RawUTF8(
int blob_index)
const {
356 if (blob_index < 0 || blob_index >= raw_choice->
length())
359 if (id < 0 || id >= uch_set->
size() ||
id == INVALID_UNICHAR_ID)
365 if (best_choice ==
NULL ||
366 blob_index >= best_choice->
length() ||
373 if (uch_set ==
NULL || best_choice ==
NULL || best_choice->
length() < 1)
375 for (
int id = 0;
id < best_choice->
length();
id++) {
377 if (unichar_id < 0 || unichar_id >= uch_set->
size())
390 if (uch_set ==
NULL || best_choice ==
NULL || best_choice->
length() < 1)
392 for (
int id = 0;
id < best_choice->
length();
id++) {
394 if (unichar_id < 0 || unichar_id >= uch_set->
size())
447 const TBOX* norm_box,
bool numeric_mode,
448 bool use_body_size,
bool allow_detailed_fx,
664 page_res = the_page_res;
714 return internal_forward(
false,
false);
718 return internal_forward(
false,
true);
725 return prev_word_res;
731 return prev_block_res;
743 return next_word_res;
749 return next_block_res;
755 WERD_RES *internal_forward(
bool new_block,
bool empty_ok);
769 BLOCK_RES_IT block_res_it;
770 ROW_RES_IT row_res_it;
771 WERD_RES_IT word_res_it;
void SetupFake(const UNICHARSET &uch)
void SetScriptPositions()
void ConsumeWordResults(WERD_RES *word)
void DebugWordChoices(bool debug, const char *word_to_debug)
bool LogNewRawChoice(WERD_CHOICE *word_choice)
WERD_RES_LIST word_res_list
WERD_CHOICE_LIST best_choices
tesseract::BoxWord * box_word
BLOCK_RES_LIST block_res_list
#define CLISTIZEH(CLASSNAME)
const char *const RawUTF8(int blob_index) const
bool unichars_in_script_order() const
void ReplaceBestChoice(WERD_CHOICE *choice)
WERD_RES * start_page(bool empty_ok)
void ComputeAdaptionThresholds(float certainty_scale, float min_rating, float max_rating, float rating_margin, float *thresholds)
WERD_CHOICE * best_choice
ROW_RES * next_row() const
void ReplaceCurrentWord(tesseract::PointerVector< WERD_RES > *words)
bool LogNewCookedChoice(int max_num_choices, bool debug, WERD_CHOICE *word_choice)
inT32 whole_word_rej_count
WERD_RES & operator=(const WERD_RES &source)
bool UnicharsInReadingOrder() const
PAGE_RES_IT(PAGE_RES *the_page_res)
void SetupBasicsFromChoppedWord(const UNICHARSET &unicharset_in)
UNICHARSET::Direction SymbolDirection(int blob_index) const
BLOCK_RES * prev_block() const
void SetupWordScript(const UNICHARSET &unicharset_in)
void InitForRetryRecognition(const WERD_RES &source)
GenericVector< STRING > correct_text
const FontInfo * fontinfo
bool operator!=(const PAGE_RES_IT &other) const
bool AnyRtlCharsInWord() const
GenericVector< int > blame_reasons
WERD_RES * restart_page_with_empties()
static WERD_RES * deep_copy(const WERD_RES *src)
UNICHAR_ID BothHyphens(UNICHAR_ID id1, UNICHAR_ID id2)
UNICHAR_ID get_mirror(UNICHAR_ID unichar_id) const
ELISTIZEH(BLOCK_RES) CLISTIZEH(BLOCK_RES) class ROW_RES
bool HyphenBoxesOverlap(const TBOX &box1, const TBOX &box2)
BLOCK_RES * block() const
void DebugTopChoice(const char *msg) const
int GetBlobsGap(int blob_index)
GenericVector< STRING > misadaption_log
void MakeCurrentWordFuzzy()
WERD_RES * restart_page()
void FakeClassifyWord(int blob_count, BLOB_CHOICE **choices)
void CloneChoppedToRebuild()
const UNICHAR_ID unichar_id(int index) const
const char *const id_to_unichar(UNICHAR_ID id) const
const UNICHARSET * uch_set
UNICHAR_ID BothSpaces(UNICHAR_ID id1, UNICHAR_ID id2)
void init_to_size(int size, T t)
void FilterWordChoices(int debug_level)
GenericVector< int > blob_gaps
MATRIX * DeepCopy() const
WERD_RES * forward_block()
void SetupBlobWidthsAndGaps()
tesseract::Tesseract * tesseract
bool PiecesAllNatural(int start, int count) const
void PrintBestChoices() const
GenericVector< SEAM * > seam_array
int cmp(const PAGE_RES_IT &other) const
BLOCK_RES * next_block() const
const FontInfo * fontinfo2
WERD_RES * forward_with_empties()
void InsertSeam(int blob_number, SEAM *seam)
int GetBlobsWidth(int start_blob, int last_blob)
ROW_RES_LIST row_res_list
WERD_RES * InsertSimpleCloneWord(const WERD_RES &clone_res, WERD *new_word)
Direction get_direction(UNICHAR_ID unichar_id) const
bool AlternativeChoiceAdjustmentsWorseThan(float threshold) const
tesseract::BoxWord * bln_boxes
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)
WERD_RES * next_word() const
void SetAllScriptPositions(tesseract::ScriptPos position)
void MergeAdjacentBlobs(int index)
BOOL8 flag(WERD_FLAGS mask) const
bool AnyLtrCharsInWord() const
GenericVector< int > best_state
CRUNCH_MODE unlv_crunch_mode
GenericVector< int > blob_widths
const char *const id_to_unichar_ext(UNICHAR_ID id) const
UNICHAR_ID BothQuotes(UNICHAR_ID id1, UNICHAR_ID id2)
bool operator==(const PAGE_RES_IT &other) const
BLOB_CHOICE * GetBlobChoice(int index) const
WERD_CHOICE ** prev_word_best_choice
WERD_RES * prev_word() const
void copy_on(WERD_RES *word_res)
WERD_RES * forward_paragraph()
ROW_RES * prev_row() const
void set_flag(WERD_FLAGS mask, BOOL8 value)
void copy_on(WERD *other)
void FakeWordFromRatings()
void BestChoiceToCorrectText()
BLOB_CHOICE_LIST * GetBlobChoices(int index) const
const char *const BestUTF8(int blob_index, bool in_rtl_context) const
BlamerBundle * blamer_bundle
WERD_RES(const WERD_RES &source)
void CopySimpleFields(const WERD_RES &source)