32 tesseract::CheckSharedLibraryVersion();
35 if (argc > 1 && (!strcmp(argv[1],
"-v") || !strcmp(argv[1],
"--version"))) {
38 }
else if (argc != 4 && (argc != 6 || strcmp(argv[1],
"-l") != 0)) {
39 printf(
"Usage: %s -v | --version | %s [-l lang] tessdata_dir wordlist_file" 40 " output_ambiguous_wordlist_file\n", argv[0], argv[0]);
51 const char *tessdata_dir = argv[++argv_offset];
52 const char *input_file_str = argv[++argv_offset];
53 const char *output_file_str = argv[++argv_offset];
59 vars_vec.
push_back(
"output_ambig_words_file");
62 0, &vars_vec, &vars_values,
false);
64 FILE *input_file = fopen(input_file_str,
"rb");
65 if (input_file ==
nullptr) {
66 tprintf(
"Failed to open input wordlist file %s\n", input_file_str);
Tesseract * tesseract() const
Dict & getDict() override
const char * string() const
void chomp_string(char *str)
DLLSYM void tprintf(const char *format,...)
const UNICHARSET & getUnicharset() const
static const char * Version()
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)
bool NoDangerousAmbig(WERD_CHOICE *BestChoice, DANGERR *fixpt, bool fix_replaceable, MATRIX *ratings)