26 "Filename with unicharset to complete and use in encoding");
28 "Directory name for input script unicharsets");
30 "File listing words to use for the system dictionary");
37 "True if lang being processed is written right-to-left");
39 "If true, the recoder is a simple pass-through of the" 40 " unicharset. Otherwise, potentially a compression of it");
42 int main(
int argc,
char** argv) {
51 tesseract::CheckSharedLibraryVersion();
61 if (!unicharset.
load_from_file(FLAGS_input_unicharset.c_str(),
false)) {
62 tprintf(
"Failed to load unicharset from %s\n",
63 FLAGS_input_unicharset.c_str());
66 tprintf(
"Loaded unicharset of size %d from file %s\n", unicharset.
size(),
67 FLAGS_input_unicharset.c_str());
70 tprintf(
"Setting unichar properties\n");
73 tprintf(
"Setting script properties\n");
77 unicharset, FLAGS_script_dir.c_str(), FLAGS_version_str.c_str(),
78 FLAGS_output_dir.c_str(), FLAGS_lang.c_str(), FLAGS_pass_through_recoder,
79 words, puncs, numbers, FLAGS_lang_is_rtl,
nullptr,
void SetupBasicProperties(bool report_errors, bool decompose, UNICHARSET *unicharset)
int CombineLangModel(const UNICHARSET &unicharset, const std::string &script_dir, const std::string &version_str, const std::string &output_dir, const std::string &lang, bool pass_through_recoder, const GenericVector< STRING > &words, const GenericVector< STRING > &puncs, const GenericVector< STRING > &numbers, bool lang_is_rtl, FileReader reader, FileWriter writer)
void ParseCommandLineFlags(const char *usage, int *argc, char ***argv, const bool remove_flags)
DLLSYM void tprintf(const char *format,...)
STRING ReadFile(const std::string &filename, FileReader reader)
STRING_PARAM_FLAG(input_unicharset, "", "Filename with unicharset to complete and use in encoding")
int main(int argc, char **argv)
void SetScriptProperties(const std::string &script_dir, UNICHARSET *unicharset)
bool load_from_file(const char *const filename, bool skip_fragments)
BOOL_PARAM_FLAG(lang_is_rtl, false, "True if lang being processed is written right-to-left")