tesseract  v4.0.0-17-g361f3264
Open Source OCR Engine
tesseract::ViterbiStateEntry Struct Reference

#include <lm_state.h>

Inheritance diagram for tesseract::ViterbiStateEntry:
Collaboration diagram for tesseract::ViterbiStateEntry:

Public Member Functions

 ViterbiStateEntry (ViterbiStateEntry *pe, BLOB_CHOICE *b, float c, float ol, const LMConsistencyInfo &ci, const AssociateStats &as, LanguageModelFlagsType tcf, LanguageModelDawgInfo *d, LanguageModelNgramInfo *n, const char *debug_uch)
 
 ~ViterbiStateEntry ()
 
bool Consistent () const
 
bool HasAlnumChoice (const UNICHARSET &unicharset)
 
void Print (const char *msg) const
 

Static Public Member Functions

static int Compare (const void *e1, const void *e2)
 

Public Attributes

float cost
 
BLOB_CHOICEcurr_b
 Pointers to BLOB_CHOICE and parent ViterbiStateEntry (not owned by this). More...
 
ViterbiStateEntryparent_vse
 
ViterbiStateEntrycompeting_vse
 
float ratings_sum
 
float min_certainty
 
int adapted
 
int length
 
float outline_length
 
LMConsistencyInfo consistency_info
 
AssociateStats associate_stats
 
LanguageModelFlagsType top_choice_flags
 
LanguageModelDawgInfodawg_info
 
LanguageModelNgramInfongram_info
 
bool updated
 
STRINGdebug_str
 

Detailed Description

Struct for storing the information about a path in the segmentation graph explored by Viterbi search.

Constructor & Destructor Documentation

◆ ViterbiStateEntry()

tesseract::ViterbiStateEntry::ViterbiStateEntry ( ViterbiStateEntry pe,
BLOB_CHOICE b,
float  c,
float  ol,
const LMConsistencyInfo ci,
const AssociateStats as,
LanguageModelFlagsType  tcf,
LanguageModelDawgInfo d,
LanguageModelNgramInfo n,
const char *  debug_uch 
)
inline

◆ ~ViterbiStateEntry()

tesseract::ViterbiStateEntry::~ViterbiStateEntry ( )
inline

Member Function Documentation

◆ Compare()

static int tesseract::ViterbiStateEntry::Compare ( const void *  e1,
const void *  e2 
)
inlinestatic

Comparator function for sorting ViterbiStateEntry_LISTs in non-increasing order of costs.

◆ Consistent()

bool tesseract::ViterbiStateEntry::Consistent ( ) const
inline

◆ HasAlnumChoice()

bool tesseract::ViterbiStateEntry::HasAlnumChoice ( const UNICHARSET unicharset)
inline

Returns true if this VSE has an alphanumeric character as its classifier result.

◆ Print()

void tesseract::ViterbiStateEntry::Print ( const char *  msg) const

Member Data Documentation

◆ adapted

int tesseract::ViterbiStateEntry::adapted

◆ associate_stats

AssociateStats tesseract::ViterbiStateEntry::associate_stats

◆ competing_vse

ViterbiStateEntry* tesseract::ViterbiStateEntry::competing_vse

Pointer to a case-competing ViterbiStateEntry in the same list that represents a path ending in the same letter of the opposite case.

◆ consistency_info

LMConsistencyInfo tesseract::ViterbiStateEntry::consistency_info

◆ cost

float tesseract::ViterbiStateEntry::cost

The cost is an adjusted ratings sum, that is adjusted by all the language model components that use Viterbi search.

◆ curr_b

BLOB_CHOICE* tesseract::ViterbiStateEntry::curr_b

Pointers to BLOB_CHOICE and parent ViterbiStateEntry (not owned by this).

◆ dawg_info

LanguageModelDawgInfo* tesseract::ViterbiStateEntry::dawg_info

Extra information maintained by Dawg language model component (owned by ViterbiStateEntry).

◆ debug_str

STRING* tesseract::ViterbiStateEntry::debug_str

UTF8 string representing the path corresponding to this vse. Populated only in when language_model_debug_level > 0.

◆ length

int tesseract::ViterbiStateEntry::length

◆ min_certainty

float tesseract::ViterbiStateEntry::min_certainty

◆ ngram_info

LanguageModelNgramInfo* tesseract::ViterbiStateEntry::ngram_info

Extra information maintained by Ngram language model component (owned by ViterbiStateEntry).

◆ outline_length

float tesseract::ViterbiStateEntry::outline_length

◆ parent_vse

ViterbiStateEntry* tesseract::ViterbiStateEntry::parent_vse

◆ ratings_sum

float tesseract::ViterbiStateEntry::ratings_sum

Various information about the characters on the path represented by this ViterbiStateEntry.

◆ top_choice_flags

LanguageModelFlagsType tesseract::ViterbiStateEntry::top_choice_flags

Flags for marking the entry as a top choice path with the smallest rating or lower/upper case letters).

◆ updated

bool tesseract::ViterbiStateEntry::updated

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