26 #include <sys/types.h> 98 prev_word_best_choice =
nullptr;
105 BLOCK_LIST *block_list,
151 ROW_RES(
bool merge_similar_words,
ROW *the_row);
224 std::vector<std::vector<std::pair<const char*, float>>>
timesteps;
361 const char*
BestUTF8(
int blob_index,
bool in_rtl_context)
const {
369 if (in_rtl_context && mirrored > 0)
396 if (unichar_id < 0 || unichar_id >=
uch_set->
size())
413 if (unichar_id < 0 || unichar_id >=
uch_set->
size())
466 const TBOX* norm_box,
bool numeric_mode,
467 bool use_body_size,
bool allow_detailed_fx,
732 return internal_forward(
false,
false);
736 return internal_forward(
false,
true);
743 return prev_word_res;
749 return prev_block_res;
761 return next_word_res;
767 return next_block_res;
773 WERD_RES *internal_forward(
bool new_block,
bool empty_ok);
787 BLOCK_RES_IT block_res_it;
788 ROW_RES_IT row_res_it;
789 WERD_RES_IT word_res_it;
void DebugTopChoice(const char *msg) const
BLOCK_RES * block() const
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)
void MergeAdjacentBlobs(int index)
UNICHARSET::Direction SymbolDirection(int blob_index) const
WERD_RES * start_page(bool empty_ok)
void FakeWordFromRatings(PermuterType permuter)
GenericVector< STRING > misadaption_log
void SetupBlobWidthsAndGaps()
tesseract::BoxWord * bln_boxes
WERD_RES * forward_paragraph()
int32_t whole_word_rej_count
GenericVector< int > blob_widths
void ComputeAdaptionThresholds(float certainty_scale, float min_rating, float max_rating, float rating_margin, float *thresholds)
int GetBlobsGap(int blob_index)
static WERD_RES * deep_copy(const WERD_RES *src)
void CopySimpleFields(const WERD_RES &source)
PAGE_RES_IT(PAGE_RES *the_page_res)
BLOB_CHOICE_LIST * GetBlobChoices(int index) const
void InsertSeam(int blob_number, SEAM *seam)
bool HyphenBoxesOverlap(const TBOX &box1, const TBOX &box2)
ROW_RES_LIST row_res_list
bool AnyRtlCharsInWord() const
BLOCK_RES * next_block() const
bool AlternativeChoiceAdjustmentsWorseThan(float threshold) const
const FontInfo * fontinfo
bool operator==(const PAGE_RES_IT &other) const
UNICHAR_ID BothSpaces(UNICHAR_ID id1, UNICHAR_ID id2)
void set_flag(WERD_FLAGS mask, bool value)
BLOCK_RES_LIST block_res_list
int GetBlobsWidth(int start_blob, int last_blob)
WERD_RES * forward_block()
void SetScriptPositions()
int8_t fontinfo_id2_count
ROW_RES * next_row() const
GenericVector< STRING > correct_text
WERD_RES * restart_page()
void FilterWordChoices(int debug_level)
Direction get_direction(UNICHAR_ID unichar_id) const
bool flag(WERD_FLAGS mask) const
void DebugWordChoices(bool debug, const char *word_to_debug)
ROW_RES * prev_row() const
WERD_RES(const WERD_RES &source)
CRUNCH_MODE unlv_crunch_mode
CLISTIZEH(STRING) CLISTIZE(STRING) namespace tesseract
WERD_RES & operator=(const WERD_RES &source)
WERD_RES * next_word() const
void PrintBestChoices() const
void init_to_size(int size, const T &t)
WERD_CHOICE ** prev_word_best_choice
void FakeClassifyWord(int blob_count, BLOB_CHOICE **choices)
bool LogNewRawChoice(WERD_CHOICE *word_choice)
WERD_RES * forward_with_empties()
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)
void BestChoiceToCorrectText()
void CloneChoppedToRebuild()
bool operator!=(const PAGE_RES_IT &other) const
UNICHAR_ID unichar_id(int index) const
const char * RawUTF8(int blob_index) const
const char * id_to_unichar_ext(UNICHAR_ID id) const
GenericVector< SEAM * > seam_array
BLOCK_RES * prev_block() const
bool AnyLtrCharsInWord() const
int cmp(const PAGE_RES_IT &other) const
GenericVector< int > blob_gaps
const char * BestUTF8(int blob_index, bool in_rtl_context) const
void SetupFake(const UNICHARSET &uch)
WERD_RES * prev_word() const
void MakeCurrentWordFuzzy()
void SetupWordScript(const UNICHARSET &unicharset_in)
tesseract::Tesseract * tesseract
ELISTIZEH(BLOCK_RES) CLISTIZEH(BLOCK_RES) class ROW_RES
UNICHAR_ID get_mirror(UNICHAR_ID unichar_id) const
MATRIX * DeepCopy() const
void SetupBasicsFromChoppedWord(const UNICHARSET &unicharset_in)
GenericVector< int > blame_reasons
WERD_RES * InsertSimpleCloneWord(const WERD_RES &clone_res, WERD *new_word)
bool unichars_in_script_order() const
const UNICHARSET * uch_set
const char * id_to_unichar(UNICHAR_ID id) const
bool UnicharsInReadingOrder() const
BlamerBundle * blamer_bundle
void InitForRetryRecognition(const WERD_RES &source)
std::vector< std::vector< std::pair< const char *, float > > > timesteps
void copy_on(WERD *other)
void SetAllScriptPositions(tesseract::ScriptPos position)
void ReplaceBestChoice(WERD_CHOICE *choice)
UNICHAR_ID BothQuotes(UNICHAR_ID id1, UNICHAR_ID id2)
WERD_RES * restart_page_with_empties()
WERD_CHOICE * best_choice
bool LogNewCookedChoice(int max_num_choices, bool debug, WERD_CHOICE *word_choice)
tesseract::BoxWord * box_word
BLOB_CHOICE * GetBlobChoice(int index) const
const FontInfo * fontinfo2