20 #ifndef TESS_LANG_MODEL_H 21 #define TESS_LANG_MODEL_H 41 const string &data_file_path,
42 bool load_system_dawg,
46 if (word_dawgs_ != NULL) {
76 static const Dawg *ood_dawg_;
77 static const Dawg *number_dawg_;
79 static const int num_max_repeat_[
kStateCnt];
87 static int max_ood_shape_cost_;
93 string num_lead_punc_;
94 string num_trail_punc_;
113 int Edges(
const char *strng,
const Dawg *dawg,
122 void FreeEdges(
int edge_cnt,
LangModEdge **edge_array);
131 bool LoadLangModelElements(
const string &lm_params);
134 int NumDawgs()
const;
138 const Dawg *GetDawg(
int index)
const;
142 #endif // TESS_LANG_MODEL_H
bool IsTrailingPunc(char_32 ch)
void RemoveInvalidCharacters(string *lm_str)
LangModEdge ** GetEdges(CharAltList *alt_list, LangModEdge *edge, int *edge_cnt)
bool IsValidSequence(const char_32 *sequence, bool eow_flag, LangModEdge **final_edge=NULL)
bool IsLeadingPunc(char_32 ch)
TessLangModel(const string &lm_params, const string &data_file_path, bool load_system_dawg, TessdataManager *tessdata_manager, CubeRecoContext *cntxt)
void delete_data_pointers()