#include <ccutil.h>
Definition at line 51 of file ccutil.h.
◆ CCUtil()
tesseract::CCUtil::CCUtil |
( |
| ) |
|
Definition at line 16 of file ccutil.cpp.
20 "Module colocated with tessdata dir", ¶ms_),
25 " ambiguities when running character classifier", ¶ms_),
27 " whether to adapt to a character", ¶ms_) {
#define STRING_INIT_MEMBER(name, val, comment, vec)
bool use_ambigs_for_adaption
bool use_definite_ambigs_for_classifier
#define INT_INIT_MEMBER(name, val, comment, vec)
#define BOOL_MEMBER(name, val, comment, vec)
◆ ~CCUtil()
tesseract::CCUtil::~CCUtil |
( |
| ) |
|
|
virtualdefault |
◆ main_setup()
void tesseract::CCUtil::main_setup |
( |
const char * |
argv0, |
|
|
const char * |
basename |
|
) |
| |
CCUtil::main_setup - set location of tessdata and name of image.
- Parameters
-
argv0 | - paths to the directory with language files and config files. An actual value of argv0 is used if not nullptr, otherwise TESSDATA_PREFIX is used if not nullptr, next try to use compiled in -DTESSDATA_PREFIX. If previous is not successful - use current directory. |
basename | - name of image |
< name of image
Definition at line 48 of file mainblk.cpp.
51 char *tessdata_prefix = getenv(
"TESSDATA_PREFIX");
53 if (argv0 !=
nullptr && *argv0 !=
'\0') {
56 }
else if (tessdata_prefix) {
62 char drive[_MAX_DRIVE];
65 DWORD length = GetModuleFileName(
nullptr, path,
sizeof(path));
66 if (length > 0 && length <
sizeof(path)) {
67 errno_t result = _splitpath_s(path, drive,
sizeof(drive),
68 dir,
sizeof(dir),
nullptr, 0,
nullptr, 0);
69 if (result == ERANGE) {
70 tprintf(
"Error: Path too long: %s\n", path);
78 #if defined(TESSDATA_PREFIX) 82 #define _XSTR(a) _STR(a) 83 datadir = _XSTR(TESSDATA_PREFIX)
"/tessdata";
97 if ((strcmp(lastchar,
"/") != 0) && (strcmp(lastchar,
"\\") != 0))
const char * string() const
DLLSYM void tprintf(const char *format,...)
◆ params()
◆ ambigs_debug_level
int tesseract::CCUtil::ambigs_debug_level = 0 |
"Debug level for unichar ambiguities"
Definition at line 84 of file ccutil.h.
◆ datadir
STRING tesseract::CCUtil::datadir |
◆ directory
STRING tesseract::CCUtil::directory |
◆ imagebasename
STRING tesseract::CCUtil::imagebasename |
◆ imagefile
STRING tesseract::CCUtil::imagefile |
◆ lang
STRING tesseract::CCUtil::lang |
◆ language_data_path_prefix
STRING tesseract::CCUtil::language_data_path_prefix |
◆ unichar_ambigs
◆ unicharset
◆ use_ambigs_for_adaption
bool tesseract::CCUtil::use_ambigs_for_adaption = 0 |
"Use ambigs for deciding whether to adapt to a character"
Definition at line 88 of file ccutil.h.
◆ use_definite_ambigs_for_classifier
bool tesseract::CCUtil::use_definite_ambigs_for_classifier = 0 |
"Use definite ambiguities when running character classifier"
Definition at line 86 of file ccutil.h.
The documentation for this class was generated from the following files:
- /usr/src/tesseract-ocr.master/src/ccutil/ccutil.h
- /usr/src/tesseract-ocr.master/src/ccutil/ccutil.cpp
- /usr/src/tesseract-ocr.master/src/ccutil/mainblk.cpp