21 #ifndef TESSERACT_WORDREC_LM_CONSISTENCY_H_ 22 #define TESSERACT_WORDREC_LM_CONSISTENCY_H_ 55 if (parent_info ==
nullptr) {
71 for (
int i = 0; i <
kNumPos; i++) {
114 return static_cast<float>(INT16_MAX);
143 #endif // TESSERACT_WORDREC_LM_CONSISTENCY_H_ void ComputeXheightConsistency(const BLOB_CHOICE *b, bool is_punc)
Definition: lm_consistency.cpp:29
float BodyMaxXHeight() const
Definition: lm_consistency.h:112
float xht_lo[kNumPos]
Definition: lm_consistency.h:132
Definition: lm_consistency.h:40
int16_t xht_sp
Definition: lm_consistency.h:136
static const int kMaxEntropy
Definition: lm_consistency.h:48
bool Consistent() const
Definition: lm_consistency.h:95
float BodyMinXHeight() const
Definition: lm_consistency.h:107
Definition: lm_consistency.h:40
int NumInconsistentChartype() const
Definition: lm_consistency.h:91
int num_inconsistent_spaces
Definition: lm_consistency.h:129
ChartypeEnum
Definition: lm_consistency.h:40
bool inconsistent_font
Definition: lm_consistency.h:130
static const int kSUP
Definition: lm_consistency.h:51
Definition: lm_consistency.h:40
static const int kNumPos
Definition: lm_consistency.h:52
int num_punc
Definition: lm_consistency.h:120
XHeightConsistencyEnum xht_decision
Definition: lm_consistency.h:138
Definition: lm_consistency.h:39
Definition: baseapi.cpp:94
static const int kNORM
Definition: lm_consistency.h:51
int num_other
Definition: lm_consistency.h:121
bool inconsistent_script
Definition: lm_consistency.h:128
bool invalid_punc
Definition: lm_consistency.h:124
int16_t xpos_entropy
Definition: lm_consistency.h:137
int num_non_first_upper
Definition: lm_consistency.h:125
static const int kSUB
Definition: lm_consistency.h:51
int NumInconsistentPunc() const
Definition: lm_consistency.h:85
int16_t xht_count_punc[kNumPos]
Definition: lm_consistency.h:135
EDGE_REF punc_ref
Definition: lm_consistency.h:123
int NumInconsistentCase() const
Definition: lm_consistency.h:88
int num_digits
Definition: lm_consistency.h:119
static const int kShiftThresh
Definition: lm_consistency.h:44
int num_alphas
Definition: lm_consistency.h:118
float xht_hi[kNumPos]
Definition: lm_consistency.h:133
int num_lower
Definition: lm_consistency.h:126
int16_t xht_count[kNumPos]
Definition: lm_consistency.h:134
static const char *const XHeightConsistencyEnumName[]
Definition: lm_consistency.h:32
LMConsistencyInfo(const LMConsistencyInfo *parent_info)
Definition: lm_consistency.h:54
int script_id
Definition: lm_consistency.h:127
XHeightConsistencyEnum
Definition: dict.h:75
Definition: lm_consistency.h:40
ChartypeEnum chartype
Definition: lm_consistency.h:122
int NumInconsistentSpaces() const
Definition: lm_consistency.h:100
int InconsistentXHeight() const
Definition: lm_consistency.h:103