#include <lm_consistency.h>
Definition at line 38 of file lm_consistency.h.
◆ ChartypeEnum
Enumerator |
---|
CT_NONE | |
CT_ALPHA | |
CT_DIGIT | |
CT_OTHER | |
Definition at line 39 of file lm_consistency.h.
◆ LMConsistencyInfo()
tesseract::LMConsistencyInfo::LMConsistencyInfo |
( |
const LMConsistencyInfo * |
parent_info | ) |
|
|
inlineexplicit |
Definition at line 53 of file lm_consistency.h.
53 {
54 if (parent_info == nullptr) {
55
69
75 }
79 } else {
80
81 *this = *parent_info;
82 }
83 }
int num_inconsistent_spaces
int16_t xht_count[kNumPos]
int16_t xht_count_punc[kNumPos]
XHeightConsistencyEnum xht_decision
◆ BodyMaxXHeight()
float tesseract::LMConsistencyInfo::BodyMaxXHeight |
( |
| ) |
const |
|
inline |
Definition at line 112 of file lm_consistency.h.
112 {
114 return static_cast<float>(INT16_MAX);
115 }
117 }
int InconsistentXHeight() const
◆ BodyMinXHeight()
float tesseract::LMConsistencyInfo::BodyMinXHeight |
( |
| ) |
const |
|
inline |
◆ ComputeXheightConsistency()
void tesseract::LMConsistencyInfo::ComputeXheightConsistency |
( |
const BLOB_CHOICE * |
b, |
|
|
bool |
is_punc |
|
) |
| |
Definition at line 29 of file lm_consistency.cpp.
29 {
31 return;
32 }
33
34
35 bool parent_null =
xht_sp < 0;
37
42 } else {
44 }
46 if (is_punc) {
48 }
49 if (!parent_null) {
51 }
52
53
54
55
56
57
58
60
61
62 if (parent_null) {
65 } else {
67 }
68 return;
69 }
70
71
72
73
74
75 const int kMinIntersectedXHeightRange = 0;
79 return;
80 }
81 }
82
83
84
88 return;
89 }
90
91
92
93 auto mainline_xht =
static_cast<double>(
xht_lo[
kNORM]);
94 double kMinSizeRatio = 0.4;
95 if (mainline_xht > 0.0 && (
static_cast<double>(
xht_hi[
kSUB]) / mainline_xht < kMinSizeRatio ||
96 static_cast<double>(
xht_hi[
kSUP]) / mainline_xht < kMinSizeRatio)) {
98 return;
99 }
100
103 return;
104 }
107 return;
108 }
110}
void IntersectRange(const T &lower1, const T &upper1, T *lower2, T *upper2)
static const int kShiftThresh
static const int kMaxEntropy
◆ Consistent()
bool tesseract::LMConsistencyInfo::Consistent |
( |
| ) |
const |
|
inline |
Definition at line 94 of file lm_consistency.h.
94 {
98 }
int NumInconsistentPunc() const
int NumInconsistentCase() const
int NumInconsistentChartype() const
◆ InconsistentXHeight()
int tesseract::LMConsistencyInfo::InconsistentXHeight |
( |
| ) |
const |
|
inline |
◆ NumInconsistentCase()
int tesseract::LMConsistencyInfo::NumInconsistentCase |
( |
| ) |
const |
|
inline |
◆ NumInconsistentChartype()
int tesseract::LMConsistencyInfo::NumInconsistentChartype |
( |
| ) |
const |
|
inline |
◆ NumInconsistentPunc()
int tesseract::LMConsistencyInfo::NumInconsistentPunc |
( |
| ) |
const |
|
inline |
◆ NumInconsistentSpaces()
int tesseract::LMConsistencyInfo::NumInconsistentSpaces |
( |
| ) |
const |
|
inline |
◆ chartype
◆ inconsistent_font
bool tesseract::LMConsistencyInfo::inconsistent_font |
◆ inconsistent_script
bool tesseract::LMConsistencyInfo::inconsistent_script |
◆ invalid_punc
bool tesseract::LMConsistencyInfo::invalid_punc |
◆ kMaxEntropy
const int tesseract::LMConsistencyInfo::kMaxEntropy = 1 |
|
static |
◆ kNORM
const int tesseract::LMConsistencyInfo::kNORM = 1 |
|
static |
◆ kNumPos
const int tesseract::LMConsistencyInfo::kNumPos = 3 |
|
static |
◆ kShiftThresh
const int tesseract::LMConsistencyInfo::kShiftThresh = 1 |
|
static |
◆ kSUB
const int tesseract::LMConsistencyInfo::kSUB = 0 |
|
static |
◆ kSUP
const int tesseract::LMConsistencyInfo::kSUP = 2 |
|
static |
◆ num_alphas
int tesseract::LMConsistencyInfo::num_alphas |
◆ num_digits
int tesseract::LMConsistencyInfo::num_digits |
◆ num_inconsistent_spaces
int tesseract::LMConsistencyInfo::num_inconsistent_spaces |
◆ num_lower
int tesseract::LMConsistencyInfo::num_lower |
◆ num_non_first_upper
int tesseract::LMConsistencyInfo::num_non_first_upper |
◆ num_other
int tesseract::LMConsistencyInfo::num_other |
◆ num_punc
int tesseract::LMConsistencyInfo::num_punc |
◆ punc_ref
EDGE_REF tesseract::LMConsistencyInfo::punc_ref |
◆ script_id
int tesseract::LMConsistencyInfo::script_id |
◆ xht_count
int16_t tesseract::LMConsistencyInfo::xht_count[kNumPos] |
◆ xht_count_punc
int16_t tesseract::LMConsistencyInfo::xht_count_punc[kNumPos] |
◆ xht_decision
◆ xht_hi
float tesseract::LMConsistencyInfo::xht_hi[kNumPos] |
◆ xht_lo
float tesseract::LMConsistencyInfo::xht_lo[kNumPos] |
◆ xht_sp
int16_t tesseract::LMConsistencyInfo::xht_sp |
◆ xpos_entropy
int16_t tesseract::LMConsistencyInfo::xpos_entropy |
The documentation for this struct was generated from the following files: