#include <stdio.h>
#include "baseapi.h"
#include "helpers.h"
#include "strngs.h"
#include "dict.h"
#include "tesseractclass.h"
Go to the source code of this file.
Functions |
int | main (int argc, char **argv) |
Function Documentation
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Public Function Prototypes —————————————————————————-
Definition at line 32 of file ambiguous_words.cpp.
{
if (argc != 4 && (argc != 6 || strcmp(argv[1], "-l") != 0)) {
printf("Usage: %s [-l lang] tessdata_dir wordlist_file"
" output_ambiguious_wordlist_file\n", argv[0]);
return 1;
}
int argv_offset = 0;
if (argc == 6) {
lang = argv[2];
argv_offset = 2;
} else {
lang = "eng";
}
const char *tessdata_dir = argv[++argv_offset];
const char *input_file_str = argv[++argv_offset];
const char *output_file_str = argv[++argv_offset];
vars_vec.
push_back(
"output_ambig_words_file");
NULL,
NULL, &vars_vec, &vars_values,
false);
FILE *input_file = fopen(input_file_str, "rb");
if (input_file == NULL) {
tprintf(
"Failed to open input wordlist file %s\n", input_file_str);
exit(1);
}
}
fclose(input_file);
}