tesseract  v4.0.0-17-g361f3264
Open Source OCR Engine
WERD_RES Class Reference

#include <pageres.h>

Inheritance diagram for WERD_RES:
Collaboration diagram for WERD_RES:

Public Member Functions

 WERD_RES ()
 
 WERD_RES (WERD *the_word)
 
 WERD_RES (const WERD_RES &source)
 
 ~WERD_RES ()
 
const char * BestUTF8 (int blob_index, bool in_rtl_context) const
 
const char * RawUTF8 (int blob_index) const
 
UNICHARSET::Direction SymbolDirection (int blob_index) const
 
bool AnyRtlCharsInWord () const
 
bool AnyLtrCharsInWord () const
 
bool UnicharsInReadingOrder () const
 
void InitNonPointers ()
 
void InitPointers ()
 
void Clear ()
 
void ClearResults ()
 
void ClearWordChoices ()
 
void ClearRatings ()
 
WERD_RESoperator= (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, 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 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)
 
int GetBlobsGap (int blob_index)
 
BLOB_CHOICEGetBlobChoice (int 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 (int blob_count, BLOB_CHOICE **choices)
 
void FakeWordFromRatings (PermuterType permuter)
 
void BestChoiceToCorrectText ()
 
bool ConditionalBlobMerge (TessResultCallback2< UNICHAR_ID, UNICHAR_ID, UNICHAR_ID > *class_cb, TessResultCallback2< bool, const TBOX &, const TBOX &> *box_cb)
 
void MergeAdjacentBlobs (int 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
 

Static Public Member Functions

static WERD_RESdeep_copy (const WERD_RES *src)
 

Public Attributes

WERDword
 
tesseract::BoxWordbln_boxes
 
ROWblob_row
 
DENORM denorm
 
const UNICHARSETuch_set
 
TWERDchopped_word
 
GenericVector< SEAM * > seam_array
 
GenericVector< int > blob_widths
 
GenericVector< int > blob_gaps
 
std::vector< std::vector< std::pair< const char *, float > > > timesteps
 
MATRIXratings
 
WERD_CHOICEbest_choice
 
WERD_CHOICEraw_choice
 
WERD_CHOICE_LIST best_choices
 
BlamerBundleblamer_bundle
 
TWERDrebuild_word
 
tesseract::BoxWordbox_word
 
GenericVector< int > best_state
 
GenericVector< STRINGcorrect_text
 
tesseract::Tesseracttesseract
 
WERD_CHOICEep_choice
 
REJMAP reject_map
 
bool tess_failed
 
bool tess_accepted
 
bool tess_would_adapt
 
bool done
 
bool small_caps
 
bool odd_size
 
int8_t italic
 
int8_t bold
 
const FontInfofontinfo
 
const FontInfofontinfo2
 
int8_t fontinfo_id_count
 
int8_t fontinfo_id2_count
 
bool guessed_x_ht
 
bool guessed_caps_ht
 
CRUNCH_MODE unlv_crunch_mode
 
float x_height
 
float caps_height
 
float baseline_shift
 
float space_certainty
 
bool combination
 
bool part_of_combo
 
bool reject_spaces
 

Constructor & Destructor Documentation

◆ WERD_RES() [1/3]

WERD_RES::WERD_RES ( )
inline

◆ WERD_RES() [2/3]

WERD_RES::WERD_RES ( WERD the_word)
inline

◆ WERD_RES() [3/3]

WERD_RES::WERD_RES ( const WERD_RES source)
inline

◆ ~WERD_RES()

WERD_RES::~WERD_RES ( )

Member Function Documentation

◆ AlternativeChoiceAdjustmentsWorseThan()

bool WERD_RES::AlternativeChoiceAdjustmentsWorseThan ( float  threshold) const

◆ AnyLtrCharsInWord()

bool WERD_RES::AnyLtrCharsInWord ( ) const
inline

◆ AnyRtlCharsInWord()

bool WERD_RES::AnyRtlCharsInWord ( ) const
inline

◆ BestChoiceToCorrectText()

void WERD_RES::BestChoiceToCorrectText ( )

◆ BestUTF8()

const char* WERD_RES::BestUTF8 ( int  blob_index,
bool  in_rtl_context 
) const
inline

◆ BothHyphens()

UNICHAR_ID WERD_RES::BothHyphens ( UNICHAR_ID  id1,
UNICHAR_ID  id2 
)

◆ BothQuotes()

UNICHAR_ID WERD_RES::BothQuotes ( UNICHAR_ID  id1,
UNICHAR_ID  id2 
)

◆ BothSpaces()

UNICHAR_ID WERD_RES::BothSpaces ( UNICHAR_ID  id1,
UNICHAR_ID  id2 
)

◆ Clear()

void WERD_RES::Clear ( )

◆ ClearRatings()

void WERD_RES::ClearRatings ( )

◆ ClearResults()

void WERD_RES::ClearResults ( )

◆ ClearWordChoices()

void WERD_RES::ClearWordChoices ( )

◆ CloneChoppedToRebuild()

void WERD_RES::CloneChoppedToRebuild ( )

◆ ComputeAdaptionThresholds()

void WERD_RES::ComputeAdaptionThresholds ( float  certainty_scale,
float  min_rating,
float  max_rating,
float  rating_margin,
float *  thresholds 
)

◆ ConditionalBlobMerge()

bool WERD_RES::ConditionalBlobMerge ( TessResultCallback2< UNICHAR_ID, UNICHAR_ID, UNICHAR_ID > *  class_cb,
TessResultCallback2< bool, const TBOX &, const TBOX &> *  box_cb 
)

◆ ConsumeWordResults()

void WERD_RES::ConsumeWordResults ( WERD_RES word)

◆ copy_on()

void WERD_RES::copy_on ( WERD_RES word_res)
inline

◆ CopySimpleFields()

void WERD_RES::CopySimpleFields ( const WERD_RES source)

◆ DebugTopChoice()

void WERD_RES::DebugTopChoice ( const char *  msg) const

◆ DebugWordChoices()

void WERD_RES::DebugWordChoices ( bool  debug,
const char *  word_to_debug 
)

◆ deep_copy()

static WERD_RES* WERD_RES::deep_copy ( const WERD_RES src)
inlinestatic

◆ FakeClassifyWord()

void WERD_RES::FakeClassifyWord ( int  blob_count,
BLOB_CHOICE **  choices 
)

◆ FakeWordFromRatings()

void WERD_RES::FakeWordFromRatings ( PermuterType  permuter)

◆ FilterWordChoices()

void WERD_RES::FilterWordChoices ( int  debug_level)

◆ fix_hyphens()

void WERD_RES::fix_hyphens ( )

◆ fix_quotes()

void WERD_RES::fix_quotes ( )

◆ GetBlobChoice()

BLOB_CHOICE * WERD_RES::GetBlobChoice ( int  index) const

◆ GetBlobChoices()

BLOB_CHOICE_LIST * WERD_RES::GetBlobChoices ( int  index) const

◆ GetBlobsGap()

int WERD_RES::GetBlobsGap ( int  blob_index)

◆ GetBlobsWidth()

int WERD_RES::GetBlobsWidth ( int  start_blob,
int  last_blob 
)

◆ HyphenBoxesOverlap()

bool WERD_RES::HyphenBoxesOverlap ( const TBOX box1,
const TBOX box2 
)

◆ InitForRetryRecognition()

void WERD_RES::InitForRetryRecognition ( const WERD_RES source)

◆ InitNonPointers()

void WERD_RES::InitNonPointers ( )

◆ InitPointers()

void WERD_RES::InitPointers ( )

◆ InsertSeam()

void WERD_RES::InsertSeam ( int  blob_number,
SEAM seam 
)

◆ IsAmbiguous()

bool WERD_RES::IsAmbiguous ( )

◆ LogNewCookedChoice()

bool WERD_RES::LogNewCookedChoice ( int  max_num_choices,
bool  debug,
WERD_CHOICE word_choice 
)

◆ LogNewRawChoice()

bool WERD_RES::LogNewRawChoice ( WERD_CHOICE word_choice)

◆ merge_tess_fails()

void WERD_RES::merge_tess_fails ( )

◆ MergeAdjacentBlobs()

void WERD_RES::MergeAdjacentBlobs ( int  index)

◆ operator=()

WERD_RES & WERD_RES::operator= ( const WERD_RES source)

◆ PiecesAllNatural()

bool WERD_RES::PiecesAllNatural ( int  start,
int  count 
) const

◆ PrintBestChoices()

void WERD_RES::PrintBestChoices ( ) const

◆ RawUTF8()

const char* WERD_RES::RawUTF8 ( int  blob_index) const
inline

◆ RebuildBestState()

void WERD_RES::RebuildBestState ( )

◆ ReplaceBestChoice()

void WERD_RES::ReplaceBestChoice ( WERD_CHOICE choice)

◆ SetAllScriptPositions()

void WERD_RES::SetAllScriptPositions ( tesseract::ScriptPos  position)

◆ SetScriptPositions()

void WERD_RES::SetScriptPositions ( )

◆ SetupBasicsFromChoppedWord()

void WERD_RES::SetupBasicsFromChoppedWord ( const UNICHARSET unicharset_in)

◆ SetupBlamerBundle()

void WERD_RES::SetupBlamerBundle ( )

◆ SetupBlobWidthsAndGaps()

void WERD_RES::SetupBlobWidthsAndGaps ( )

◆ SetupBoxWord()

void WERD_RES::SetupBoxWord ( )

◆ SetupFake()

void WERD_RES::SetupFake ( const UNICHARSET uch)

◆ SetupForRecognition()

bool WERD_RES::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 
)

◆ SetupWordScript()

void WERD_RES::SetupWordScript ( const UNICHARSET unicharset_in)

◆ StatesAllValid()

bool WERD_RES::StatesAllValid ( )

◆ SymbolDirection()

UNICHARSET::Direction WERD_RES::SymbolDirection ( int  blob_index) const
inline

◆ UnicharsInReadingOrder()

bool WERD_RES::UnicharsInReadingOrder ( ) const
inline

Member Data Documentation

◆ baseline_shift

float WERD_RES::baseline_shift

◆ best_choice

WERD_CHOICE* WERD_RES::best_choice

◆ best_choices

WERD_CHOICE_LIST WERD_RES::best_choices

◆ best_state

GenericVector<int> WERD_RES::best_state

◆ blamer_bundle

BlamerBundle* WERD_RES::blamer_bundle

◆ bln_boxes

tesseract::BoxWord* WERD_RES::bln_boxes

◆ blob_gaps

GenericVector<int> WERD_RES::blob_gaps

◆ blob_row

ROW* WERD_RES::blob_row

◆ blob_widths

GenericVector<int> WERD_RES::blob_widths

◆ bold

int8_t WERD_RES::bold

◆ box_word

tesseract::BoxWord* WERD_RES::box_word

◆ caps_height

float WERD_RES::caps_height

◆ chopped_word

TWERD* WERD_RES::chopped_word

◆ combination

bool WERD_RES::combination

◆ correct_text

GenericVector<STRING> WERD_RES::correct_text

◆ denorm

DENORM WERD_RES::denorm

◆ done

bool WERD_RES::done

◆ ep_choice

WERD_CHOICE* WERD_RES::ep_choice

◆ fontinfo

const FontInfo* WERD_RES::fontinfo

◆ fontinfo2

const FontInfo* WERD_RES::fontinfo2

◆ fontinfo_id2_count

int8_t WERD_RES::fontinfo_id2_count

◆ fontinfo_id_count

int8_t WERD_RES::fontinfo_id_count

◆ guessed_caps_ht

bool WERD_RES::guessed_caps_ht

◆ guessed_x_ht

bool WERD_RES::guessed_x_ht

◆ italic

int8_t WERD_RES::italic

◆ odd_size

bool WERD_RES::odd_size

◆ part_of_combo

bool WERD_RES::part_of_combo

◆ ratings

MATRIX* WERD_RES::ratings

◆ raw_choice

WERD_CHOICE* WERD_RES::raw_choice

◆ rebuild_word

TWERD* WERD_RES::rebuild_word

◆ reject_map

REJMAP WERD_RES::reject_map

◆ reject_spaces

bool WERD_RES::reject_spaces

◆ seam_array

GenericVector<SEAM*> WERD_RES::seam_array

◆ small_caps

bool WERD_RES::small_caps

◆ space_certainty

float WERD_RES::space_certainty

◆ tess_accepted

bool WERD_RES::tess_accepted

◆ tess_failed

bool WERD_RES::tess_failed

◆ tess_would_adapt

bool WERD_RES::tess_would_adapt

◆ tesseract

tesseract::Tesseract* WERD_RES::tesseract

◆ timesteps

std::vector<std::vector<std::pair<const char*, float> > > WERD_RES::timesteps

◆ uch_set

const UNICHARSET* WERD_RES::uch_set

◆ unlv_crunch_mode

CRUNCH_MODE WERD_RES::unlv_crunch_mode

◆ word

WERD* WERD_RES::word

◆ x_height

float WERD_RES::x_height

The documentation for this class was generated from the following files: