Tesseract 3.02

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes
tesseract::LanguageModelConsistencyInfo Struct Reference

`#include <language_model.h>`

List of all members.

## Public Member Functions

| LanguageModelConsistencyInfo ()
int | NumInconsistentPunc () const
int | NumInconsistentCase () const
int | NumInconsistentChartype () const
bool | Consistent () const
int | NumInconsistentSpaces () const

## Public Attributes

EDGE_REF | punc_ref
int | num_punc
bool | invalid_punc
int | num_non_first_upper
int | num_lower
int | script_id
bool | inconsistent_script
int | num_alphas
int | num_digits
int | num_other
int | num_inconsistent_spaces
bool | inconsistent_font

## Detailed Description

Definition at line 40 of file language_model.h.

## Constructor & Destructor Documentation

tesseract::LanguageModelConsistencyInfo::LanguageModelConsistencyInfo | ( |  | ) |

inline

Definition at line 41 of file language_model.h.

: punc_ref(NO_EDGE), num_punc(0), invalid_punc(false),
num_non_first_upper(0), num_lower(0),
script_id(0), inconsistent_script(false),
num_alphas(0), num_digits(0), num_other(0),
num_inconsistent_spaces(0), inconsistent_font(false) {}

## Member Function Documentation

bool tesseract::LanguageModelConsistencyInfo::Consistent | ( |  | ) | const

inline

Definition at line 57 of file language_model.h.

{
return (NumInconsistentPunc() == 0 && NumInconsistentCase() == 0 &&
NumInconsistentChartype() == 0 && !inconsistent_script);
}

int tesseract::LanguageModelConsistencyInfo::NumInconsistentCase | ( |  | ) | const

inline

Definition at line 50 of file language_model.h.

{
return (num_non_first_upper > num_lower) ? num_lower : num_non_first_upper;
}

int tesseract::LanguageModelConsistencyInfo::NumInconsistentChartype | ( |  | ) | const

inline

Definition at line 53 of file language_model.h.

{
return (NumInconsistentPunc() + num_other +
((num_alphas > num_digits) ? num_digits : num_alphas));
}

int tesseract::LanguageModelConsistencyInfo::NumInconsistentPunc | ( |  | ) | const

inline

Definition at line 47 of file language_model.h.

{
return invalid_punc ? num_punc : 0;
}

int tesseract::LanguageModelConsistencyInfo::NumInconsistentSpaces | ( |  | ) | const

inline

Definition at line 61 of file language_model.h.

{
return num_inconsistent_spaces;
}

## Member Data Documentation

bool tesseract::LanguageModelConsistencyInfo::inconsistent_font

Definition at line 76 of file language_model.h.

bool tesseract::LanguageModelConsistencyInfo::inconsistent_script

Definition at line 71 of file language_model.h.

bool tesseract::LanguageModelConsistencyInfo::invalid_punc

Definition at line 67 of file language_model.h.

int tesseract::LanguageModelConsistencyInfo::num_alphas

Definition at line 72 of file language_model.h.

int tesseract::LanguageModelConsistencyInfo::num_digits

Definition at line 73 of file language_model.h.

int tesseract::LanguageModelConsistencyInfo::num_inconsistent_spaces

Definition at line 75 of file language_model.h.

int tesseract::LanguageModelConsistencyInfo::num_lower

Definition at line 69 of file language_model.h.

int tesseract::LanguageModelConsistencyInfo::num_non_first_upper

Definition at line 68 of file language_model.h.

int tesseract::LanguageModelConsistencyInfo::num_other

Definition at line 74 of file language_model.h.

int tesseract::LanguageModelConsistencyInfo::num_punc

Definition at line 66 of file language_model.h.

EDGE_REF tesseract::LanguageModelConsistencyInfo::punc_ref

Definition at line 65 of file language_model.h.

int tesseract::LanguageModelConsistencyInfo::script_id

Definition at line 70 of file language_model.h.

The documentation for this struct was generated from the following file:

- /mnt/data/src/tesseract-ocr/wordrec/language_model.h