32 int main(
int argc,
char** argv) {
35 if (argc != 4 && (argc != 6 || strcmp(argv[1],
"-l") != 0)) {
36 printf(
"Usage: %s [-l lang] tessdata_dir wordlist_file"
37 " output_ambiguious_wordlist_file\n", argv[0]);
48 const char *tessdata_dir = argv[++argv_offset];
49 const char *input_file_str = argv[++argv_offset];
50 const char *output_file_str = argv[++argv_offset];
56 vars_vec.
push_back(
"output_ambig_words_file");
59 NULL, 0, &vars_vec, &vars_values,
false);
61 FILE *input_file = fopen(input_file_str,
"rb");
62 if (input_file == NULL) {
63 tprintf(
"Failed to open input wordlist file %s\n", input_file_str);
Tesseract *const tesseract() const
void chomp_string(char *str)
bool NoDangerousAmbig(WERD_CHOICE *BestChoice, DANGERR *fixpt, bool fix_replaceable, MATRIX *ratings)
int main(int argc, char **argv)
int Init(const char *datapath, const char *language, OcrEngineMode mode, char **configs, int configs_size, const GenericVector< STRING > *vars_vec, const GenericVector< STRING > *vars_values, bool set_only_non_debug_params)
const UNICHARSET & getUnicharset() const
const char * string() const