|
Tesseract
3.02
|
#include <language_model.h>
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 |
Definition at line 40 of file language_model.h.
| 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) {}
| 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;
}
Definition at line 76 of file language_model.h.
Definition at line 71 of file language_model.h.
Definition at line 67 of file language_model.h.
Definition at line 72 of file language_model.h.
Definition at line 73 of file language_model.h.
Definition at line 75 of file language_model.h.
Definition at line 69 of file language_model.h.
Definition at line 68 of file language_model.h.
Definition at line 74 of file language_model.h.
Definition at line 66 of file language_model.h.
Definition at line 65 of file language_model.h.
Definition at line 70 of file language_model.h.