Tesseract
3.02
|
#include <language_model.h>
Public Member Functions | |
ViterbiStateEntry (BLOB_CHOICE *pb, ViterbiStateEntry *pe, BLOB_CHOICE *b, float c, float ol, const LanguageModelConsistencyInfo &ci, const AssociateStats &as, LanguageModelFlagsType tcf, LanguageModelDawgInfo *d, LanguageModelNgramInfo *n) | |
~ViterbiStateEntry () | |
bool | Consistent () const |
Static Public Member Functions | |
static int | Compare (const void *e1, const void *e2) |
Public Attributes | |
float | cost |
BLOB_CHOICE * | parent_b |
ViterbiStateEntry * | parent_vse |
float | ratings_sum |
float | min_certainty |
int | adapted |
int | length |
float | outline_length |
LanguageModelConsistencyInfo | consistency_info |
AssociateStats | associate_stats |
LanguageModelFlagsType | top_choice_flags |
LanguageModelDawgInfo * | dawg_info |
LanguageModelNgramInfo * | ngram_info |
bool | updated |
Definition at line 138 of file language_model.h.
tesseract::ViterbiStateEntry::ViterbiStateEntry | ( | BLOB_CHOICE * | pb, |
ViterbiStateEntry * | pe, | ||
BLOB_CHOICE * | b, | ||
float | c, | ||
float | ol, | ||
const LanguageModelConsistencyInfo & | ci, | ||
const AssociateStats & | as, | ||
LanguageModelFlagsType | tcf, | ||
LanguageModelDawgInfo * | d, | ||
LanguageModelNgramInfo * | n | ||
) | [inline] |
Definition at line 139 of file language_model.h.
: cost(c), parent_b(pb), parent_vse(pe), ratings_sum(b->rating()), min_certainty(b->certainty()), adapted(b->adapted()), length(1), outline_length(ol), consistency_info(ci), associate_stats(as), top_choice_flags(tcf), dawg_info(d), ngram_info(n), updated(true) { if (pe != NULL) { ratings_sum += pe->ratings_sum; if (pe->min_certainty < min_certainty) { min_certainty = pe->min_certainty; } adapted += pe->adapted; length += pe->length; outline_length += pe->outline_length; } }
tesseract::ViterbiStateEntry::~ViterbiStateEntry | ( | ) | [inline] |
Definition at line 159 of file language_model.h.
{ delete dawg_info; delete ngram_info; }
static int tesseract::ViterbiStateEntry::Compare | ( | const void * | e1, |
const void * | e2 | ||
) | [inline, static] |
Definition at line 165 of file language_model.h.
{ const ViterbiStateEntry *ve1 = *reinterpret_cast<const ViterbiStateEntry * const *>(e1); const ViterbiStateEntry *ve2 = *reinterpret_cast<const ViterbiStateEntry * const *>(e2); return (ve1->cost < ve2->cost) ? -1 : 1; }
bool tesseract::ViterbiStateEntry::Consistent | ( | ) | const [inline] |
Definition at line 172 of file language_model.h.
{ if (dawg_info != NULL && consistency_info.NumInconsistentCase() == 0) { return true; } return consistency_info.Consistent(); }
Definition at line 191 of file language_model.h.
Definition at line 195 of file language_model.h.
Definition at line 194 of file language_model.h.
Definition at line 181 of file language_model.h.
Definition at line 203 of file language_model.h.
Definition at line 192 of file language_model.h.
Definition at line 190 of file language_model.h.
Definition at line 207 of file language_model.h.
Definition at line 193 of file language_model.h.
Definition at line 184 of file language_model.h.
Definition at line 185 of file language_model.h.
Definition at line 189 of file language_model.h.
Definition at line 199 of file language_model.h.
Definition at line 209 of file language_model.h.