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);
int main(int argc, char **argv)
const UNICHARSET & getUnicharset() const
bool TESS_API NoDangerousAmbig(WERD_CHOICE *BestChoice, DANGERR *fixpt, bool fix_replaceable, MATRIX *ratings)
void chomp_string(char *str)