#include "dawg.h"
#include "host.h"
#include "tesscallback.h"
#include "trie.h"
#include "unicharset.h"
Go to the source code of this file.
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 70 of file dawg2wordlist.cpp.
72 tprintf(
"Print all the words in a given dawg.\n");
73 tprintf(
"Usage: %s <unicharset> <dawgfile> <wordlistfile>\n",
77 const char *unicharset_file = argv[1];
78 const char *dawg_file = argv[2];
79 const char *wordlist_file = argv[3];
82 tprintf(
"Error loading unicharset from %s.\n", unicharset_file);
87 tprintf(
"Error loading dictionary from %s.\n", dawg_file);
int WriteDawgAsWordlist(const UNICHARSET &unicharset, const tesseract::Dawg *dawg, const char *outfile_name)
tesseract::Dawg * LoadSquishedDawg(const UNICHARSET &unicharset, const char *filename)
bool load_from_file(const char *const filename, bool skip_fragments)
Definition at line 54 of file dawg2wordlist.cpp.
57 FILE *out = fopen(outfile_name,
"wb");
59 tprintf(
"Could not open %s for writing.\n", outfile_name);
void output_word(const char *word)
void iterate_words(const UNICHARSET &unicharset, TessCallback1< const WERD_CHOICE * > *cb) const
_ConstTessMemberResultCallback_0_0< false, R, T1 >::base * NewPermanentTessCallback(const T1 *obj, R(T2::*member)() const)
const int kDictDebugLevel = 1 |