All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
tesseract::LanguageModelDawgInfo Struct Reference

#include <lm_state.h>

Public Member Functions

 LanguageModelDawgInfo (DawgPositionVector *a, PermuterType pt)
 
 ~LanguageModelDawgInfo ()
 

Public Attributes

DawgPositionVectoractive_dawgs
 
PermuterType permuter
 

Detailed Description

The following structs are used for storing the state of the language model in the segmentation search graph. In this graph the nodes are BLOB_CHOICEs and the links are the relationships between the underlying blobs (see segsearch.h for a more detailed description).

Each of the BLOB_CHOICEs contains LanguageModelState struct, which has a list of N best paths (list of ViterbiStateEntry) explored by the Viterbi search leading up to and including this BLOB_CHOICE.

Each ViterbiStateEntry contains information from various components of the language model: dawgs in which the path is found, character ngram model probability of the path, script/chartype/font consistency info, state for language-specific heuristics (e.g. hyphenated and compound words, lower/upper case preferences, etc).

Each ViterbiStateEntry also contains the parent pointer, so that the path that it represents (WERD_CHOICE) can be constructed by following these parent pointers. Struct for storing additional information used by Dawg language model component. It stores the set of active dawgs in which the sequence of letters on a path can be found.

Definition at line 61 of file lm_state.h.

Constructor & Destructor Documentation

tesseract::LanguageModelDawgInfo::LanguageModelDawgInfo ( DawgPositionVector a,
PermuterType  pt 
)
inline

Definition at line 62 of file lm_state.h.

62  : permuter(pt) {
63  active_dawgs = new DawgPositionVector(*a);
64  }
DawgPositionVector * active_dawgs
Definition: lm_state.h:68
tesseract::LanguageModelDawgInfo::~LanguageModelDawgInfo ( )
inline

Definition at line 65 of file lm_state.h.

65  {
66  delete active_dawgs;
67  }
DawgPositionVector * active_dawgs
Definition: lm_state.h:68

Member Data Documentation

DawgPositionVector* tesseract::LanguageModelDawgInfo::active_dawgs

Definition at line 68 of file lm_state.h.

PermuterType tesseract::LanguageModelDawgInfo::permuter

Definition at line 69 of file lm_state.h.


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