tesseract  5.0.0-alpha-619-ge9db
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 200 of file lm_state.h.

Constructor & Destructor Documentation

◆ LanguageModelState()

tesseract::LanguageModelState::LanguageModelState ( )
inline

Definition at line 201 of file lm_state.h.

◆ ~LanguageModelState()

tesseract::LanguageModelState::~LanguageModelState ( )
inline

Definition at line 205 of file lm_state.h.

205 {}

Member Function Documentation

◆ Clear()

void tesseract::LanguageModelState::Clear ( )

Clears the viterbi search state back to its initial conditions.

Definition at line 62 of file lm_state.cpp.

◆ Print()

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

Definition at line 69 of file lm_state.cpp.

69  {
70  tprintf("%s VSEs (max_cost=%g prn_len=%d tot_len=%d):\n",
73  ViterbiStateEntry_IT vit(&viterbi_state_entries);
74  for (vit.mark_cycle_pt(); !vit.cycled_list(); vit.forward()) {
75  vit.data()->Print("");
76  }
77 }

Member Data Documentation

◆ viterbi_state_entries

ViterbiStateEntry_LIST tesseract::LanguageModelState::viterbi_state_entries

Storage for the Viterbi state.

Definition at line 213 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 218 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 215 of file lm_state.h.

◆ viterbi_state_entries_prunable_max_cost

float tesseract::LanguageModelState::viterbi_state_entries_prunable_max_cost

Definition at line 216 of file lm_state.h.


The documentation for this struct was generated from the following files:
tesseract::LanguageModelState::viterbi_state_entries_length
int viterbi_state_entries_length
Total number of entries in viterbi_state_entries.
Definition: lm_state.h:218
tesseract::LanguageModelState::viterbi_state_entries_prunable_max_cost
float viterbi_state_entries_prunable_max_cost
Definition: lm_state.h:216
tesseract::LanguageModelState::viterbi_state_entries
ViterbiStateEntry_LIST viterbi_state_entries
Storage for the Viterbi state.
Definition: lm_state.h:213
tprintf
DLLSYM void tprintf(const char *format,...)
Definition: tprintf.cpp:34
tesseract::LanguageModelState::viterbi_state_entries_prunable_length
int viterbi_state_entries_prunable_length
Number and max cost of prunable paths in viterbi_state_entries.
Definition: lm_state.h:215