22#ifndef TESSERACT_WORDREC_PAIN_POINTS_H_
23#define TESSERACT_WORDREC_PAIN_POINTS_H_
32struct ViterbiStateEntry;
48static const char *
const LMPainPointsTypeName[] = {
64 return LMPainPointsTypeName[
type];
69 , max_char_wh_ratio_(rat)
72 , debug_level_(deb) {}
77 return !pain_points_heaps_[pp_type].
empty();
87 for (
auto &pain_points_heap : pain_points_heaps_) {
88 pain_points_heap.clear();
108 bool ok_to_extend,
float max_char_wh_ratio,
WERD_RES *word_res);
122 float max_char_wh_ratio_;
std::vector< DANGERR_INFO > DANGERR
bool GeneratePainPoint(int col, int row, LMPainPointsType pp_type, float special_priority, bool ok_to_extend, float max_char_wh_ratio, WERD_RES *word_res)
void RemapForSplit(int index)
bool HasPainPoints(LMPainPointsType pp_type) const
LMPainPoints(int max, float rat, bool fp, const Dict *d, int deb)
void GenerateInitial(WERD_RES *word_res)
void GenerateFromPath(float rating_cert_scale, ViterbiStateEntry *vse, WERD_RES *word_res)
static const float kLooseMaxCharWhRatio
static const float kDefaultPainPointPriorityAdjustment
static const char * PainPointDescription(LMPainPointsType type)
void GenerateFromAmbigs(const DANGERR &fixpt, ViterbiStateEntry *vse, WERD_RES *word_res)
LMPainPointsType Deque(MATRIX_COORD *pp, float *priority)