Go to the documentation of this file.
25 #include <sys/types.h>
80 BLOCK_RES_LIST block_res_list;
97 prev_word_best_choice =
nullptr;
104 BLOCK_LIST *block_list,
221 std::vector<std::vector<std::pair<const char*, float>>>
timesteps;
223 std::vector<std::vector<std::vector<
363 const char*
BestUTF8(
int blob_index,
bool in_rtl_context)
const {
371 if (in_rtl_context && mirrored > 0)
398 if (unichar_id < 0 || unichar_id >=
uch_set->
size())
414 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,
689 return word_res == other.word_res && row_res == other.row_res &&
690 block_res == other.block_res;
735 return internal_forward(
false,
false);
739 return internal_forward(
false,
true);
746 return prev_word_res;
752 return prev_block_res;
764 return next_word_res;
770 return next_block_res;
776 WERD_RES *internal_forward(
bool new_block,
bool empty_ok);
790 BLOCK_RES_IT block_res_it;
791 ROW_RES_IT row_res_it;
792 WERD_RES_IT word_res_it;
795 WERD_RES_IT wr_it_of_current_word;
796 WERD_RES_IT wr_it_of_next_word;
WERD_RES * restart_page_with_empties()
void init_to_size(int size, const T &t)
int cmp(const PAGE_RES_IT &other) const
WERD_RES * prev_word() const
void CopySimpleFields(const WERD_RES &source)
WERD_CHOICE * best_choice
GenericVector< SEAM * > seam_array
void InsertSeam(int blob_number, SEAM *seam)
bool UnicharsInReadingOrder() const
BlamerBundle * blamer_bundle
bool flag(WERD_FLAGS mask) const
void PrintBestChoices() const
std::vector< std::vector< std::pair< const char *, float > > > CTC_symbol_choices
bool operator!=(const PAGE_RES_IT &other) const
const UNICHARSET * uch_set
int GetBlobsWidth(int start_blob, int last_blob)
std::vector< std::vector< std::pair< const char *, float > > > timesteps
void SetupBasicsFromChoppedWord(const UNICHARSET &unicharset_in)
void FakeWordFromRatings(PermuterType permuter)
void ReplaceCurrentWord(tesseract::PointerVector< WERD_RES > *words)
const char * id_to_unichar(UNICHAR_ID id) const
bool ConditionalBlobMerge(TessResultCallback2< UNICHAR_ID, UNICHAR_ID, UNICHAR_ID > *class_cb, TessResultCallback2< bool, const TBOX &, const TBOX & > *box_cb)
MATRIX * DeepCopy() const
UNICHAR_ID BothSpaces(UNICHAR_ID id1, UNICHAR_ID id2)
void set_flag(WERD_FLAGS mask, bool value)
WERD_RES(const WERD_RES &source)
void SetScriptPositions()
void ConsumeWordResults(WERD_RES *word)
WERD_RES & operator=(const WERD_RES &source)
bool LogNewCookedChoice(int max_num_choices, bool debug, WERD_CHOICE *word_choice)
BLOB_CHOICE * GetBlobChoice(int index) const
WERD_RES * next_word() const
UNICHAR_ID unichar_id(int index) const
std::vector< std::vector< std::vector< std::pair< const char *, float > > > > segmented_timesteps
void DebugWordChoices(bool debug, const char *word_to_debug)
BLOB_CHOICE_LIST * GetBlobChoices(int index) const
bool LogNewRawChoice(WERD_CHOICE *word_choice)
BLOCK_RES * block() const
void BestChoiceToCorrectText()
WERD_CHOICE_LIST best_choices
bool AnyRtlCharsInWord() const
bool unichars_in_script_order() const
static WERD_RES * deep_copy(const WERD_RES *src)
int8_t fontinfo_id2_count
ELISTIZEH(BLOCK_RES) CLISTIZEH(BLOCK_RES) class ROW_RES
void SetupBlobWidthsAndGaps()
WERD_RES * forward_paragraph()
GenericVector< int > blob_gaps
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)
const char * RawUTF8(int blob_index) const
void SetupFake(const UNICHARSET &uch)
void MakeCurrentWordFuzzy()
UNICHAR_ID BothHyphens(UNICHAR_ID id1, UNICHAR_ID id2)
void InitForRetryRecognition(const WERD_RES &source)
GenericVector< STRING > correct_text
WERD_RES * forward_block()
void ReplaceBestChoice(WERD_CHOICE *choice)
WERD_RES_LIST word_res_list
ROW_RES * prev_row() const
WERD_RES * restart_page()
void FakeClassifyWord(int blob_count, BLOB_CHOICE **choices)
void SetupWordScript(const UNICHARSET &unicharset_in)
WERD_RES * forward_with_empties()
tesseract::BoxWord * bln_boxes
WERD_RES * InsertSimpleCloneWord(const WERD_RES &clone_res, WERD *new_word)
void FilterWordChoices(int debug_level)
void SetAllScriptPositions(tesseract::ScriptPos position)
void copy_on(WERD *other)
UNICHAR_ID BothQuotes(UNICHAR_ID id1, UNICHAR_ID id2)
ROW_RES_LIST row_res_list
tesseract::BoxWord * box_word
GenericVector< int > blob_widths
Direction get_direction(UNICHAR_ID unichar_id) const
void ComputeAdaptionThresholds(float certainty_scale, float min_rating, float max_rating, float rating_margin, float *thresholds)
BLOCK_RES * prev_block() const
const char * id_to_unichar_ext(UNICHAR_ID id) const
BLOCK_RES * next_block() const
void CloneChoppedToRebuild()
const char * BestUTF8(int blob_index, bool in_rtl_context) const
CLISTIZEH(STRING) CLISTIZE(STRING) namespace tesseract
bool AlternativeChoiceAdjustmentsWorseThan(float threshold) const
WERD_RES * start_page(bool empty_ok)
const FontInfo * fontinfo2
void DebugTopChoice(const char *msg) const
ROW_RES * next_row() const
const FontInfo * fontinfo
UNICHAR_ID get_mirror(UNICHAR_ID unichar_id) const
bool AnyLtrCharsInWord() const
bool operator==(const PAGE_RES_IT &other) const
bool HyphenBoxesOverlap(const TBOX &box1, const TBOX &box2)
CRUNCH_MODE unlv_crunch_mode
bool PiecesAllNatural(int start, int count) const
void copy_on(WERD_RES *word_res)
GenericVector< int > best_state
void MergeAdjacentBlobs(int index)
int GetBlobsGap(int blob_index)
int32_t whole_word_rej_count
UNICHARSET::Direction SymbolDirection(int blob_index) const