#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.
◆ LoadSquishedDawg()
Definition at line 29 of file dawg2wordlist.cpp.
40 if (!retval->
Load(&dawg_file)) {
const int kDictDebugLevel
bool Open(const STRING &filename, FileReader reader)
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 74 of file dawg2wordlist.cpp.
76 tprintf(
"Print all the words in a given dawg.\n");
77 tprintf(
"Usage: %s <unicharset> <dawgfile> <wordlistfile>\n",
81 const char *unicharset_file = argv[1];
82 const char *dawg_file = argv[2];
83 const char *wordlist_file = argv[3];
86 tprintf(
"Error loading unicharset from %s.\n", unicharset_file);
90 if (dict ==
nullptr) {
91 tprintf(
"Error loading dictionary from %s.\n", dawg_file);
tesseract::Dawg * LoadSquishedDawg(const UNICHARSET &unicharset, const char *filename)
int WriteDawgAsWordlist(const UNICHARSET &unicharset, const tesseract::Dawg *dawg, const char *outfile_name)
bool load_from_file(const char *const filename, bool skip_fragments)
◆ WriteDawgAsWordlist()
Definition at line 58 of file dawg2wordlist.cpp.
61 FILE *out = fopen(outfile_name,
"wb");
63 tprintf(
"Could not open %s for writing.\n", outfile_name);
_ConstTessMemberResultCallback_0_0< false, R, T1 >::base * NewPermanentTessCallback(const T1 *obj, R(T2::*member)() const)
void output_word(const char *word)
void iterate_words(const UNICHARSET &unicharset, TessCallback1< const WERD_CHOICE *> *cb) const
◆ kDictDebugLevel
const int kDictDebugLevel = 1 |