19 #ifndef TESSERACT_CCUTIL_TESSDATAMANAGER_H_
20 #define TESSERACT_CCUTIL_TESSDATAMANAGER_H_
25 static const char kTrainedDataSuffix[] =
"traineddata";
29 static const char kLangConfigFileSuffix[] =
"config";
30 static const char kUnicharsetFileSuffix[] =
"unicharset";
31 static const char kAmbigsFileSuffix[] =
"unicharambigs";
32 static const char kBuiltInTemplatesFileSuffix[] =
"inttemp";
33 static const char kBuiltInCutoffsFileSuffix[] =
"pffmtable";
34 static const char kNormProtoFileSuffix[] =
"normproto";
35 static const char kPuncDawgFileSuffix[] =
"punc-dawg";
36 static const char kSystemDawgFileSuffix[] =
"word-dawg";
37 static const char kNumberDawgFileSuffix[] =
"number-dawg";
38 static const char kFreqDawgFileSuffix[] =
"freq-dawg";
39 static const char kFixedLengthDawgsFileSuffix[] =
"fixed-length-dawgs";
40 static const char kCubeUnicharsetFileSuffix[] =
"cube-unicharset";
41 static const char kCubeSystemDawgFileSuffix[] =
"cube-word-dawg";
42 static const char kShapeTableFileSuffix[] =
"shapetable";
43 static const char kBigramDawgFileSuffix[] =
"bigram-dawg";
44 static const char kUnambigDawgFileSuffix[] =
"unambig-dawg";
45 static const char kParamsModelFileSuffix[] =
"params-model";
46 static const char kLSTMModelFileSuffix[] =
"lstm";
47 static const char kLSTMPuncDawgFileSuffix[] =
"lstm-punc-dawg";
48 static const char kLSTMSystemDawgFileSuffix[] =
"lstm-word-dawg";
49 static const char kLSTMNumberDawgFileSuffix[] =
"lstm-number-dawg";
50 static const char kLSTMUnicharsetFileSuffix[] =
"lstm-unicharset";
51 static const char kLSTMRecoderFileSuffix[] =
"lstm-recoder";
52 static const char kVersionFileSuffix[] =
"version";
89 static const char *
const kTessdataFileSuffixes[] = {
90 kLangConfigFileSuffix,
91 kUnicharsetFileSuffix,
93 kBuiltInTemplatesFileSuffix,
94 kBuiltInCutoffsFileSuffix,
97 kSystemDawgFileSuffix,
98 kNumberDawgFileSuffix,
100 kFixedLengthDawgsFileSuffix,
101 kCubeUnicharsetFileSuffix,
102 kCubeSystemDawgFileSuffix,
103 kShapeTableFileSuffix,
104 kBigramDawgFileSuffix,
105 kUnambigDawgFileSuffix,
106 kParamsModelFileSuffix,
107 kLSTMModelFileSuffix,
108 kLSTMPuncDawgFileSuffix,
109 kLSTMSystemDawgFileSuffix,
110 kLSTMNumberDawgFileSuffix,
111 kLSTMUnicharsetFileSuffix,
112 kLSTMRecoderFileSuffix,
123 static const int kMaxNumTessdataEntries = 1000;
133 bool swap()
const {
return swap_; }
143 bool Init(
const char *data_file_name);
146 bool LoadMemBuffer(
const char *name,
const char *data,
int size);
194 const char *output_filename);
202 char **component_filenames,
203 int num_new_components);
220 bool LoadArchiveFile(
const char *filename);
228 static bool TessdataTypeFromFileSuffix(
const char *suffix,
235 static bool TessdataTypeFromFileName(
const char *filename,
252 #endif // TESSERACT_CCUTIL_TESSDATAMANAGER_H_