#include <ccutil.h>
Definition at line 43 of file ccutil.h.
◆ CCUtil()
tesseract::CCUtil::CCUtil |
( |
| ) |
|
Definition at line 16 of file ccutil.cpp.
18 ,
INT_INIT_MEMBER(ambigs_debug_level, 0,
"Debug level for unichar ambiguities", ¶ms_)
20 "Use ambigs for deciding"
21 " whether to adapt to a character",
#define INT_INIT_MEMBER(name, val, comment, vec)
#define BOOL_MEMBER(name, val, comment, vec)
◆ ~CCUtil()
tesseract::CCUtil::~CCUtil |
( |
| ) |
|
|
virtualdefault |
◆ BOOL_VAR_H()
tesseract::CCUtil::BOOL_VAR_H |
( |
use_ambigs_for_adaption |
| ) |
|
◆ INT_VAR_H()
tesseract::CCUtil::INT_VAR_H |
( |
ambigs_debug_level |
| ) |
|
◆ main_setup()
void tesseract::CCUtil::main_setup |
( |
const std::string & |
argv0, |
|
|
const std::string & |
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 40 of file mainblk.cpp.
43 char *tessdata_prefix = getenv(
"TESSDATA_PREFIX");
48 }
else if (tessdata_prefix) {
55 DWORD length = GetModuleFileName(
nullptr, path,
sizeof(path));
56 if (length > 0 && length <
sizeof(path)) {
57 char *separator = std::strrchr(path,
'\\');
58 if (separator !=
nullptr) {
64 #elif defined(__riscos__)
65 }
else if (
datadir.empty() != 0) {
66 char path[PATH_MAX] =
"<Tesseract$Dir>.tessdata";
68 datadir = __unixify(path, 0, NULL, 0, 0);
70 #if defined(TESSDATA_PREFIX) && !defined(__riscos__)
73 datadir = TESSDATA_PREFIX
"/tessdata";
83 const char *lastchar =
datadir.c_str();
84 lastchar +=
datadir.length() - 1;
85 if ((strcmp(lastchar,
"/") != 0) && (strcmp(lastchar,
"\\") != 0)) {
std::string imagebasename
◆ params()
◆ datadir
std::string tesseract::CCUtil::datadir |
◆ directory
std::string tesseract::CCUtil::directory |
◆ imagebasename
std::string tesseract::CCUtil::imagebasename |
◆ imagefile
std::string tesseract::CCUtil::imagefile |
◆ lang
std::string tesseract::CCUtil::lang |
◆ language_data_path_prefix
std::string tesseract::CCUtil::language_data_path_prefix |
◆ unichar_ambigs
◆ unicharset
The documentation for this class was generated from the following files: