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