50 tesseract::CheckSharedLibraryVersion();
59 if (!unicharset.
load_from_file(FLAGS_input_unicharset.c_str(),
false)) {
60 tprintf(
"Failed to load unicharset from %s\n", FLAGS_input_unicharset.c_str());
63 tprintf(
"Loaded unicharset of size %zu from file %s\n", unicharset.
size(),
64 FLAGS_input_unicharset.c_str());
67 tprintf(
"Setting unichar properties\n");
70 tprintf(
"Setting script properties\n");
74 FLAGS_version_str.c_str(), FLAGS_output_dir.c_str(),
75 FLAGS_lang.c_str(), FLAGS_pass_through_recoder, words, puncs,
76 numbers, FLAGS_lang_is_rtl,
nullptr,
const std::vector< std::string > split(const std::string &s, char c)
void ParseCommandLineFlags(const char *usage, int *argc, char ***argv, const bool remove_flags)
void tprintf(const char *format,...)
void SetupBasicProperties(bool report_errors, bool decompose, UNICHARSET *unicharset)
void SetScriptProperties(const std::string &script_dir, UNICHARSET *unicharset)
std::string ReadFile(const std::string &filename, FileReader reader)
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 std::vector< std::string > &words, const std::vector< std::string > &puncs, const std::vector< std::string > &numbers, bool lang_is_rtl, FileReader reader, FileWriter writer)
bool load_from_file(const char *const filename, bool skip_fragments)