19 #ifndef TESSERACT_CCMAIN_PARAGRAPHS_INTERNAL_H_ 20 #define TESSERACT_CCMAIN_PARAGRAPHS_INTERNAL_H_ 43 bool *is_list,
bool *starts_idea,
bool *ends_idea);
48 bool *is_list,
bool *starts_idea,
bool *ends_idea);
72 return model !=
nullptr && model != kCrownLeft && model !=
kCrownRight;
138 void DiscardNonMatchingHypotheses(
const SetOfModels &models);
153 default:
return lindent_ > rindent_ ? lindent_ : rindent_;
162 default:
return lindent_ > rindent_ ? lindent_ : rindent_;
206 void DiscardUnusedModels(
const SetOfModels &used_models);
214 int start,
int end)
const;
240 int row_start,
int row_end,
254 void CalculateOpenModels(
int row_start,
int row_end);
257 return open_models_[row - row_start_ + 1];
285 int row_start,
int row_end);
307 PARA_LIST *paragraphs);
311 #endif // TESSERACT_CCMAIN_PARAGRAPHS_INTERNAL_H_
bool AsciiLikelyListItem(const STRING &word)
bool FirstWordWouldHaveFit(const RowScratchRegisters &before, const RowScratchRegisters &after, tesseract::ParagraphJustification justification)
bool RowsFitModel(const GenericVector< RowScratchRegisters > *rows, int start, int end, const ParagraphModel *model)
const ParagraphModel * model
const ParagraphModel * kCrownLeft
LineHypothesis & operator=(const LineHypothesis &other)
LineHypothesis(const LineHypothesis &other)
int OffsideIndent(tesseract::ParagraphJustification just) const
const ParagraphModel * kCrownRight
int AlignsideIndent(tesseract::ParagraphJustification just) const
void RightWordAttributes(const UNICHARSET *unicharset, const WERD_CHOICE *werd, const STRING &utf8, bool *is_list, bool *starts_idea, bool *ends_idea)
void LeftWordAttributes(const UNICHARSET *unicharset, const WERD_CHOICE *werd, const STRING &utf8, bool *is_list, bool *starts_idea, bool *ends_idea)
bool CrownCompatible(const GenericVector< RowScratchRegisters > *rows, int a, int b, const ParagraphModel *model)
bool StrongModel(const ParagraphModel *model)
int UnicodeFor(const UNICHARSET *u, const WERD_CHOICE *werd, int pos)
const GenericVector< ParagraphModel * > & models() const
GenericVector< ParagraphModel * > & models()
ParagraphTheory(GenericVector< ParagraphModel * > *models)
int InterwordSpace(const GenericVector< RowScratchRegisters > &rows, int row_start, int row_end)
bool ValidBodyLine(const GenericVector< RowScratchRegisters > *rows, int row, const ParagraphModel *model)
void CanonicalizeDetectionResults(GenericVector< PARA * > *row_owners, PARA_LIST *paragraphs)
bool operator==(const LineHypothesis &other) const
LineHypothesis(LineType line_type, const ParagraphModel *m)
void RecomputeMarginsAndClearHypotheses(GenericVector< RowScratchRegisters > *rows, int start, int end, int percentile)
bool ValidFirstLine(const GenericVector< RowScratchRegisters > *rows, int row, const ParagraphModel *model)