30 int main(
int argc,
char** argv) {
31 tesseract::CheckSharedLibraryVersion();
34 if (argc > 1 && (!strcmp(argv[1],
"-v") || !strcmp(argv[1],
"--version"))) {
37 }
else if (argc != 4 && (argc != 6 || strcmp(argv[1],
"-l") != 0)) {
38 printf(
"Usage: %s -v | --version | %s [-l lang] tessdata_dir wordlist_file"
39 " output_ambiguous_wordlist_file\n", argv[0], argv[0]);
50 const char *tessdata_dir = argv[++argv_offset];
51 const char *input_file_str = argv[++argv_offset];
52 const char *output_file_str = argv[++argv_offset];
58 vars_vec.
push_back(
"output_ambig_words_file");
61 0, &vars_vec, &vars_values,
false);
63 FILE *input_file = fopen(input_file_str,
"rb");
64 if (input_file ==
nullptr) {
65 tprintf(
"Failed to open input wordlist file %s\n", input_file_str);