tesseract  4.0.0-1-g2a2b
tesseract::LanguageModelState Struct Reference

Struct to store information maintained by various language model components. More...

#include <lm_state.h>

Public Member Functions

 LanguageModelState ()
 
 ~LanguageModelState ()
 
void Clear ()
 Clears the viterbi search state back to its initial conditions. More...
 
void Print (const char *msg)
 

Public Attributes

ViterbiStateEntry_LIST viterbi_state_entries
 Storage for the Viterbi state. More...
 
int viterbi_state_entries_prunable_length
 Number and max cost of prunable paths in viterbi_state_entries. More...
 
float viterbi_state_entries_prunable_max_cost
 
int viterbi_state_entries_length
 Total number of entries in viterbi_state_entries. More...
 

Detailed Description

Struct to store information maintained by various language model components.

Definition at line 195 of file lm_state.h.

Constructor & Destructor Documentation

◆ LanguageModelState()

tesseract::LanguageModelState::LanguageModelState ( )
inline

Definition at line 196 of file lm_state.h.

196  :
int viterbi_state_entries_prunable_length
Number and max cost of prunable paths in viterbi_state_entries.
Definition: lm_state.h:210
int viterbi_state_entries_length
Total number of entries in viterbi_state_entries.
Definition: lm_state.h:213
float viterbi_state_entries_prunable_max_cost
Definition: lm_state.h:211

◆ ~LanguageModelState()

tesseract::LanguageModelState::~LanguageModelState ( )
inline

Definition at line 200 of file lm_state.h.

200 {}

Member Function Documentation

◆ Clear()

void tesseract::LanguageModelState::Clear ( )

Clears the viterbi search state back to its initial conditions.

Definition at line 63 of file lm_state.cpp.

63  {
64  viterbi_state_entries.clear();
68 }
int viterbi_state_entries_prunable_length
Number and max cost of prunable paths in viterbi_state_entries.
Definition: lm_state.h:210
int viterbi_state_entries_length
Total number of entries in viterbi_state_entries.
Definition: lm_state.h:213
ViterbiStateEntry_LIST viterbi_state_entries
Storage for the Viterbi state.
Definition: lm_state.h:208
float viterbi_state_entries_prunable_max_cost
Definition: lm_state.h:211

◆ Print()

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

Definition at line 70 of file lm_state.cpp.

70  {
71  tprintf("%s VSEs (max_cost=%g prn_len=%d tot_len=%d):\n",
74  ViterbiStateEntry_IT vit(&viterbi_state_entries);
75  for (vit.mark_cycle_pt(); !vit.cycled_list(); vit.forward()) {
76  vit.data()->Print("");
77  }
78 }
int viterbi_state_entries_prunable_length
Number and max cost of prunable paths in viterbi_state_entries.
Definition: lm_state.h:210
int viterbi_state_entries_length
Total number of entries in viterbi_state_entries.
Definition: lm_state.h:213
ViterbiStateEntry_LIST viterbi_state_entries
Storage for the Viterbi state.
Definition: lm_state.h:208
DLLSYM void tprintf(const char *format,...)
Definition: tprintf.cpp:37
float viterbi_state_entries_prunable_max_cost
Definition: lm_state.h:211

Member Data Documentation

◆ viterbi_state_entries

ViterbiStateEntry_LIST tesseract::LanguageModelState::viterbi_state_entries

Storage for the Viterbi state.

Definition at line 208 of file lm_state.h.

◆ viterbi_state_entries_length

int tesseract::LanguageModelState::viterbi_state_entries_length

Total number of entries in viterbi_state_entries.

Definition at line 213 of file lm_state.h.

◆ viterbi_state_entries_prunable_length

int tesseract::LanguageModelState::viterbi_state_entries_prunable_length

Number and max cost of prunable paths in viterbi_state_entries.

Definition at line 210 of file lm_state.h.

◆ viterbi_state_entries_prunable_max_cost

float tesseract::LanguageModelState::viterbi_state_entries_prunable_max_cost

Definition at line 211 of file lm_state.h.


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