Tesseract  3.02
tesseract::CCUtil Class Reference

#include <ccutil.h>

Inheritance diagram for tesseract::CCUtil:
tesseract::CUtil tesseract::CCStruct tesseract::Classify tesseract::Wordrec tesseract::Tesseract

List of all members.

Public Member Functions

 CCUtil ()
virtual ~CCUtil ()
void main_setup (const char *argv0, const char *basename)
ParamsVectorsparams ()

Public Attributes

STRING datadir
STRING imagebasename
STRING lang
STRING language_data_path_prefix
TessdataManager tessdata_manager
UNICHARSET unicharset
UnicharAmbigs unichar_ambigs
STRING imagefile
STRING directory
char * m_data_sub_dir = "tessdata/"
int ambigs_debug_level = 0
bool use_definite_ambigs_for_classifier = 0
bool use_ambigs_for_adaption = 0

Detailed Description

Definition at line 54 of file ccutil.h.


Constructor & Destructor Documentation

tesseract::CCUtil::CCUtil ( )

Definition at line 7 of file ccutil.cpp.

               :
  params_(),
  STRING_INIT_MEMBER(m_data_sub_dir,
                     "tessdata/", "Directory for data files", &params_),
#ifdef _WIN32
  STRING_INIT_MEMBER(tessedit_module_name, WINDLLNAME,
                     "Module colocated with tessdata dir", &params_),
#endif
  INT_INIT_MEMBER(ambigs_debug_level, 0, "Debug level for unichar ambiguities",
                  &params_),
  BOOL_MEMBER(use_definite_ambigs_for_classifier, 0, "Use definite"
              " ambiguities when running character classifier", &params_),
  BOOL_MEMBER(use_ambigs_for_adaption, 0, "Use ambigs for deciding"
              " whether to adapt to a character", &params_) {
}
tesseract::CCUtil::~CCUtil ( ) [virtual]

Definition at line 23 of file ccutil.cpp.

                {
}

Member Function Documentation

void tesseract::CCUtil::main_setup ( const char *  argv0,
const char *  basename 
)

Definition at line 46 of file mainblk.cpp.

                 {
  imagebasename = basename;      /*name of image */
  STRING dll_module_name;
  #ifdef _WIN32
  dll_module_name = tessedit_module_name;
  #endif

  // TESSDATA_PREFIX Environment variable overrules everything.
  // Compiled in -DTESSDATA_PREFIX is next.
  // NULL goes to current directory.
  // An actual value of argv0 is used if getpath is successful.
  if (!getenv("TESSDATA_PREFIX")) {
#ifdef TESSDATA_PREFIX
#define _STR(a) #a
#define _XSTR(a) _STR(a)
    datadir = _XSTR(TESSDATA_PREFIX);
#undef _XSTR
#undef _STR
#else
    if (argv0 != NULL) {
      if (getpath(argv0, dll_module_name, datadir) < 0)
#ifdef __UNIX__
        CANTOPENFILE.error("main", ABORT, "%s to get path", argv0);
#else
        NO_PATH.error("main", DBG, NULL);
#endif
    } else {
      datadir = "./";
    }
#endif
  } else {
    datadir = getenv("TESSDATA_PREFIX");
  }

  datadir += m_data_sub_dir;     /*data directory */
}
ParamsVectors* tesseract::CCUtil::params ( ) [inline]

Definition at line 65 of file ccutil.h.

{ return &params_; }

Member Data Documentation

"Debug level for unichar ambiguities"

Definition at line 89 of file ccutil.h.

Definition at line 67 of file ccutil.h.

Definition at line 75 of file ccutil.h.

Definition at line 68 of file ccutil.h.

Definition at line 74 of file ccutil.h.

Definition at line 69 of file ccutil.h.

char* tesseract::CCUtil::m_data_sub_dir = "tessdata/"

"Directory for data files"

Definition at line 84 of file ccutil.h.

Definition at line 72 of file ccutil.h.

"Use ambigs for deciding whether to adapt to a character"

Definition at line 93 of file ccutil.h.

"Use definite ambiguities when running character classifier"

Definition at line 91 of file ccutil.h.


The documentation for this class was generated from the following files: