#include "commontraining.h"
#include "dawg.h"
#include "host.h"
#include "serialis.h"
#include "tesscallback.h"
#include "trie.h"
#include "unicharset.h"
Go to the source code of this file.
|
int | main (int argc, char *argv[]) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 73 of file dawg2wordlist.cpp.
74 tesseract::CheckSharedLibraryVersion();
76 if (argc > 1 && (!strcmp(argv[1],
"-v") || !strcmp(argv[1],
"--version"))) {
79 }
else if (argc != 4) {
80 tprintf(
"Print all the words in a given dawg.\n");
81 tprintf(
"Usage: %s -v | --version | %s <unicharset> <dawgfile> <wordlistfile>\n",
85 const char *unicharset_file = argv[1];
86 const char *dawg_file = argv[2];
87 const char *wordlist_file = argv[3];
90 tprintf(
"Error loading unicharset from %s.\n", unicharset_file);
94 if (dict ==
nullptr) {
95 tprintf(
"Error loading dictionary from %s.\n", dawg_file);
98 int retval = WriteDawgAsWordlist(unicharset, dict, wordlist_file);
DLLSYM void tprintf(const char *format,...)
static const char * Version()
bool load_from_file(const char *const filename, bool skip_fragments)