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)
void SetScriptProperties(const std::string &script_dir, UNICHARSET *unicharset)
bool load_from_file(const char *const filename, bool skip_fragments)