tesseract v5.3.3.20231005
|
#include <pageres.h>
Public Member Functions | |
WERD_RES ()=default | |
WERD_RES (WERD *the_word) | |
WERD_RES (const WERD_RES &source) | |
~WERD_RES () | |
const char * | BestUTF8 (unsigned blob_index, bool in_rtl_context) const |
const char * | RawUTF8 (unsigned blob_index) const |
UNICHARSET::Direction | SymbolDirection (unsigned blob_index) const |
bool | AnyRtlCharsInWord () const |
bool | AnyLtrCharsInWord () const |
bool | UnicharsInReadingOrder () const |
void | Clear () |
void | ClearResults () |
void | ClearWordChoices () |
void | ClearRatings () |
WERD_RES & | operator= (const WERD_RES &source) |
void | CopySimpleFields (const WERD_RES &source) |
void | InitForRetryRecognition (const WERD_RES &source) |
bool | SetupForRecognition (const UNICHARSET &unicharset_in, tesseract::Tesseract *tesseract, Image 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 | SetupBasicsFromChoppedWord (const UNICHARSET &unicharset_in) |
void | SetupFake (const UNICHARSET &uch) |
void | SetupWordScript (const UNICHARSET &unicharset_in) |
void | SetupBlamerBundle () |
void | SetupBlobWidthsAndGaps () |
void | InsertSeam (int blob_number, SEAM *seam) |
bool | AlternativeChoiceAdjustmentsWorseThan (float threshold) const |
bool | IsAmbiguous () |
bool | StatesAllValid () |
void | DebugWordChoices (bool debug, const char *word_to_debug) |
void | DebugTopChoice (const char *msg) const |
void | FilterWordChoices (int debug_level) |
void | ComputeAdaptionThresholds (float certainty_scale, float min_rating, float max_rating, float rating_margin, float *thresholds) |
bool | LogNewRawChoice (WERD_CHOICE *word_choice) |
bool | LogNewCookedChoice (int max_num_choices, bool debug, WERD_CHOICE *word_choice) |
void | PrintBestChoices () const |
int | GetBlobsWidth (int start_blob, int last_blob) const |
int | GetBlobsGap (unsigned blob_index) const |
BLOB_CHOICE * | GetBlobChoice (unsigned index) const |
BLOB_CHOICE_LIST * | GetBlobChoices (int index) const |
void | ConsumeWordResults (WERD_RES *word) |
void | ReplaceBestChoice (WERD_CHOICE *choice) |
void | RebuildBestState () |
void | CloneChoppedToRebuild () |
void | SetupBoxWord () |
void | SetScriptPositions () |
void | SetAllScriptPositions (tesseract::ScriptPos position) |
void | FakeClassifyWord (unsigned blob_count, BLOB_CHOICE **choices) |
void | FakeWordFromRatings (PermuterType permuter) |
void | BestChoiceToCorrectText () |
bool | ConditionalBlobMerge (const std::function< UNICHAR_ID(UNICHAR_ID, UNICHAR_ID)> &class_cb, const std::function< bool(const TBOX &, const TBOX &)> &box_cb) |
void | MergeAdjacentBlobs (unsigned index) |
UNICHAR_ID | BothQuotes (UNICHAR_ID id1, UNICHAR_ID id2) |
void | fix_quotes () |
UNICHAR_ID | BothHyphens (UNICHAR_ID id1, UNICHAR_ID id2) |
bool | HyphenBoxesOverlap (const TBOX &box1, const TBOX &box2) |
void | fix_hyphens () |
UNICHAR_ID | BothSpaces (UNICHAR_ID id1, UNICHAR_ID id2) |
void | merge_tess_fails () |
void | copy_on (WERD_RES *word_res) |
bool | PiecesAllNatural (int start, int count) const |
![]() | |
ELIST_LINK () | |
ELIST_LINK (const ELIST_LINK &) | |
void | operator= (const ELIST_LINK &) |
Static Public Member Functions | |
static WERD_RES * | deep_copy (const WERD_RES *src) |
Public Attributes | |
WERD * | word = nullptr |
tesseract::BoxWord * | bln_boxes = nullptr |
ROW * | blob_row = nullptr |
DENORM | denorm |
const UNICHARSET * | uch_set = nullptr |
TWERD * | chopped_word = nullptr |
std::vector< SEAM * > | seam_array |
std::vector< int > | blob_widths |
std::vector< int > | blob_gaps |
std::vector< std::vector< std::pair< const char *, float > > > | timesteps |
std::vector< std::vector< std::vector< std::pair< const char *, float > > > > | segmented_timesteps |
std::vector< std::vector< std::pair< const char *, float > > > | CTC_symbol_choices |
bool | leading_space = false |
int | end = 0 |
MATRIX * | ratings = nullptr |
WERD_CHOICE * | best_choice = nullptr |
WERD_CHOICE * | raw_choice = nullptr |
WERD_CHOICE_LIST | best_choices |
BlamerBundle * | blamer_bundle = nullptr |
TWERD * | rebuild_word = nullptr |
tesseract::BoxWord * | box_word = nullptr |
tesseract::Tesseract * | tesseract = nullptr |
std::vector< int > | best_state |
std::vector< std::string > | correct_text |
WERD_CHOICE * | ep_choice = nullptr |
REJMAP | reject_map |
bool | tess_failed = false |
bool | tess_accepted = false |
bool | tess_would_adapt = false |
bool | done = false |
bool | small_caps = false |
bool | odd_size = false |
const FontInfo * | fontinfo = nullptr |
const FontInfo * | fontinfo2 = nullptr |
int8_t | fontinfo_id_count = 0 |
int8_t | fontinfo_id2_count = 0 |
bool | guessed_x_ht = true |
bool | guessed_caps_ht = true |
CRUNCH_MODE | unlv_crunch_mode = CR_NONE |
float | x_height = 0.0f |
float | caps_height = 0.0f |
float | baseline_shift = 0.0f |
float | space_certainty = 0.0f |
bool | combination = false |
bool | part_of_combo = false |
bool | reject_spaces = false |
|
default |
|
inline |
|
inline |
Definition at line 348 of file pageres.h.
tesseract::WERD_RES::~WERD_RES | ( | ) |
Definition at line 1124 of file pageres.cpp.
bool tesseract::WERD_RES::AlternativeChoiceAdjustmentsWorseThan | ( | float | threshold | ) | const |
Definition at line 441 of file pageres.cpp.
|
inline |
Definition at line 413 of file pageres.h.
|
inline |
Definition at line 394 of file pageres.h.
void tesseract::WERD_RES::BestChoiceToCorrectText | ( | ) |
Definition at line 956 of file pageres.cpp.
|
inline |
Definition at line 361 of file pageres.h.
UNICHAR_ID tesseract::WERD_RES::BothHyphens | ( | UNICHAR_ID | id1, |
UNICHAR_ID | id2 | ||
) |
Definition at line 1059 of file pageres.cpp.
UNICHAR_ID tesseract::WERD_RES::BothQuotes | ( | UNICHAR_ID | id1, |
UNICHAR_ID | id2 | ||
) |
Definition at line 1036 of file pageres.cpp.
UNICHAR_ID tesseract::WERD_RES::BothSpaces | ( | UNICHAR_ID | id1, |
UNICHAR_ID | id2 | ||
) |
Definition at line 1090 of file pageres.cpp.
void tesseract::WERD_RES::Clear | ( | ) |
Definition at line 1128 of file pageres.cpp.
void tesseract::WERD_RES::ClearRatings | ( | ) |
Definition at line 1175 of file pageres.cpp.
void tesseract::WERD_RES::ClearResults | ( | ) |
Definition at line 1138 of file pageres.cpp.
void tesseract::WERD_RES::ClearWordChoices | ( | ) |
Definition at line 1167 of file pageres.cpp.
void tesseract::WERD_RES::CloneChoppedToRebuild | ( | ) |
Definition at line 865 of file pageres.cpp.
void tesseract::WERD_RES::ComputeAdaptionThresholds | ( | float | certainty_scale, |
float | min_rating, | ||
float | max_rating, | ||
float | rating_margin, | ||
float * | thresholds | ||
) |
Definition at line 570 of file pageres.cpp.
bool tesseract::WERD_RES::ConditionalBlobMerge | ( | const std::function< UNICHAR_ID(UNICHAR_ID, UNICHAR_ID)> & | class_cb, |
const std::function< bool(const TBOX &, const TBOX &)> & | box_cb | ||
) |
Definition at line 971 of file pageres.cpp.
void tesseract::WERD_RES::ConsumeWordResults | ( | WERD_RES * | word | ) |
Definition at line 785 of file pageres.cpp.
|
inline |
void tesseract::WERD_RES::CopySimpleFields | ( | const WERD_RES & | source | ) |
Definition at line 253 of file pageres.cpp.
void tesseract::WERD_RES::DebugTopChoice | ( | const char * | msg | ) | const |
Definition at line 503 of file pageres.cpp.
void tesseract::WERD_RES::DebugWordChoices | ( | bool | debug, |
const char * | word_to_debug | ||
) |
Definition at line 483 of file pageres.cpp.
void tesseract::WERD_RES::FakeClassifyWord | ( | unsigned | blob_count, |
BLOB_CHOICE ** | choices | ||
) |
Definition at line 908 of file pageres.cpp.
void tesseract::WERD_RES::FakeWordFromRatings | ( | PermuterType | permuter | ) |
Definition at line 930 of file pageres.cpp.
void tesseract::WERD_RES::FilterWordChoices | ( | int | debug_level | ) |
Definition at line 518 of file pageres.cpp.
void tesseract::WERD_RES::fix_hyphens | ( | ) |
Definition at line 1077 of file pageres.cpp.
void tesseract::WERD_RES::fix_quotes | ( | ) |
Definition at line 1047 of file pageres.cpp.
BLOB_CHOICE * tesseract::WERD_RES::GetBlobChoice | ( | unsigned | index | ) | const |
Definition at line 768 of file pageres.cpp.
BLOB_CHOICE_LIST * tesseract::WERD_RES::GetBlobChoices | ( | int | index | ) | const |
Definition at line 779 of file pageres.cpp.
int tesseract::WERD_RES::GetBlobsGap | ( | unsigned | blob_index | ) | const |
Definition at line 757 of file pageres.cpp.
int tesseract::WERD_RES::GetBlobsWidth | ( | int | start_blob, |
int | last_blob | ||
) | const |
Definition at line 746 of file pageres.cpp.
Definition at line 1071 of file pageres.cpp.
void tesseract::WERD_RES::InitForRetryRecognition | ( | const WERD_RES & | source | ) |
Definition at line 279 of file pageres.cpp.
void tesseract::WERD_RES::InsertSeam | ( | int | blob_number, |
SEAM * | seam | ||
) |
Definition at line 419 of file pageres.cpp.
bool tesseract::WERD_RES::IsAmbiguous | ( | ) |
Definition at line 455 of file pageres.cpp.
bool tesseract::WERD_RES::LogNewCookedChoice | ( | int | max_num_choices, |
bool | debug, | ||
WERD_CHOICE * | word_choice | ||
) |
Definition at line 629 of file pageres.cpp.
bool tesseract::WERD_RES::LogNewRawChoice | ( | WERD_CHOICE * | word_choice | ) |
Definition at line 613 of file pageres.cpp.
void tesseract::WERD_RES::merge_tess_fails | ( | ) |
Definition at line 1099 of file pageres.cpp.
void tesseract::WERD_RES::MergeAdjacentBlobs | ( | unsigned | index | ) |
Definition at line 1005 of file pageres.cpp.
Definition at line 186 of file pageres.cpp.
bool tesseract::WERD_RES::PiecesAllNatural | ( | int | start, |
int | count | ||
) | const |
Definition at line 1111 of file pageres.cpp.
void tesseract::WERD_RES::PrintBestChoices | ( | ) | const |
Definition at line 731 of file pageres.cpp.
|
inline |
void tesseract::WERD_RES::RebuildBestState | ( | ) |
Definition at line 837 of file pageres.cpp.
void tesseract::WERD_RES::ReplaceBestChoice | ( | WERD_CHOICE * | choice | ) |
Definition at line 824 of file pageres.cpp.
void tesseract::WERD_RES::SetAllScriptPositions | ( | tesseract::ScriptPos | position | ) |
Definition at line 895 of file pageres.cpp.
void tesseract::WERD_RES::SetScriptPositions | ( | ) |
Definition at line 888 of file pageres.cpp.
void tesseract::WERD_RES::SetupBasicsFromChoppedWord | ( | const UNICHARSET & | unicharset_in | ) |
Definition at line 344 of file pageres.cpp.
void tesseract::WERD_RES::SetupBlamerBundle | ( | ) |
Definition at line 394 of file pageres.cpp.
void tesseract::WERD_RES::SetupBlobWidthsAndGaps | ( | ) |
Definition at line 401 of file pageres.cpp.
void tesseract::WERD_RES::SetupBoxWord | ( | ) |
Definition at line 879 of file pageres.cpp.
void tesseract::WERD_RES::SetupFake | ( | const UNICHARSET & | uch | ) |
Definition at line 353 of file pageres.cpp.
bool tesseract::WERD_RES::SetupForRecognition | ( | const UNICHARSET & | unicharset_in, |
tesseract::Tesseract * | tesseract, | ||
Image | pix, | ||
int | norm_mode, | ||
const TBOX * | norm_box, | ||
bool | numeric_mode, | ||
bool | use_body_size, | ||
bool | allow_detailed_fx, | ||
ROW * | row, | ||
const BLOCK * | block | ||
) |
Definition at line 304 of file pageres.cpp.
void tesseract::WERD_RES::SetupWordScript | ( | const UNICHARSET & | unicharset_in | ) |
Definition at line 385 of file pageres.cpp.
bool tesseract::WERD_RES::StatesAllValid | ( | ) |
Definition at line 461 of file pageres.cpp.
|
inline |
|
inline |
WERD_CHOICE* tesseract::WERD_RES::best_choice = nullptr |
BlamerBundle* tesseract::WERD_RES::blamer_bundle = nullptr |
tesseract::BoxWord* tesseract::WERD_RES::bln_boxes = nullptr |
tesseract::BoxWord* tesseract::WERD_RES::box_word = nullptr |
std::vector<std::string> tesseract::WERD_RES::correct_text |
std::vector<std::vector<std::pair<const char *, float> > > tesseract::WERD_RES::CTC_symbol_choices |
WERD_CHOICE* tesseract::WERD_RES::ep_choice = nullptr |
WERD_CHOICE* tesseract::WERD_RES::raw_choice = nullptr |
std::vector<std::vector<std::vector<std::pair<const char *, float> > > > tesseract::WERD_RES::segmented_timesteps |
tesseract::Tesseract* tesseract::WERD_RES::tesseract = nullptr |
std::vector<std::vector<std::pair<const char *, float> > > tesseract::WERD_RES::timesteps |
const UNICHARSET* tesseract::WERD_RES::uch_set = nullptr |
CRUNCH_MODE tesseract::WERD_RES::unlv_crunch_mode = CR_NONE |