Tesseract 3.02

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Public Attributes
tesseract::ViterbiStateEntry Struct Reference

`#include <language_model.h>`

Inheritance diagram for tesseract::ViterbiStateEntry:

List of all members.

## 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
Public Member Functions inherited from ELIST_LINK
| ELIST_LINK ()
| ELIST_LINK (const ELIST_LINK &)
void | operator= (const ELIST_LINK &)

## 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

## Detailed Description

Definition at line 138 of file language_model.h.

## Constructor & Destructor Documentation

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;
}

## Member Function Documentation

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();
}

## Member Data Documentation

int tesseract::ViterbiStateEntry::adapted

Definition at line 191 of file language_model.h.

AssociateStats tesseract::ViterbiStateEntry::associate_stats

Definition at line 195 of file language_model.h.

LanguageModelConsistencyInfo tesseract::ViterbiStateEntry::consistency_info

Definition at line 194 of file language_model.h.

float tesseract::ViterbiStateEntry::cost

Definition at line 181 of file language_model.h.

LanguageModelDawgInfo* tesseract::ViterbiStateEntry::dawg_info

Definition at line 203 of file language_model.h.

int tesseract::ViterbiStateEntry::length

Definition at line 192 of file language_model.h.

float tesseract::ViterbiStateEntry::min_certainty

Definition at line 190 of file language_model.h.

LanguageModelNgramInfo* tesseract::ViterbiStateEntry::ngram_info

Definition at line 207 of file language_model.h.

float tesseract::ViterbiStateEntry::outline_length

Definition at line 193 of file language_model.h.

BLOB_CHOICE* tesseract::ViterbiStateEntry::parent_b

Definition at line 184 of file language_model.h.

ViterbiStateEntry* tesseract::ViterbiStateEntry::parent_vse

Definition at line 185 of file language_model.h.

float tesseract::ViterbiStateEntry::ratings_sum

Definition at line 189 of file language_model.h.

LanguageModelFlagsType tesseract::ViterbiStateEntry::top_choice_flags

Definition at line 199 of file language_model.h.

bool tesseract::ViterbiStateEntry::updated

Definition at line 209 of file language_model.h.

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

- /mnt/data/src/tesseract-ocr/wordrec/language_model.h