20 #ifndef TESSERACT_CCMAIN_PARAGRAPHS_INTERNAL_H_ 21 #define TESSERACT_CCMAIN_PARAGRAPHS_INTERNAL_H_ 47 bool *is_list,
bool *starts_idea,
bool *ends_idea);
52 bool *is_list,
bool *starts_idea,
bool *ends_idea);
76 return model != NULL && model != kCrownLeft && model !=
kCrownRight;
126 void StartHypotheses(SetOfModels *models)
const;
129 void StrongHypotheses(SetOfModels *models)
const;
132 void NonNullHypotheses(SetOfModels *models)
const;
135 void DiscardNonMatchingHypotheses(
const SetOfModels &models);
150 default:
return lindent_ > rindent_ ? lindent_ : rindent_;
159 default:
return lindent_ > rindent_ ? lindent_ : rindent_;
206 void NonCenteredModels(SetOfModels *models);
211 int start,
int end)
const;
237 int row_start,
int row_end,
251 void CalculateOpenModels(
int row_start,
int row_end);
253 SetOfModels &OpenModels(
int row) {
254 return open_models_[row - row_start_ + 1];
282 int row_start,
int row_end);
309 PARA_LIST *paragraphs);
312 #endif // TESSERACT_CCMAIN_PARAGRAPHS_INTERNAL_H_
void DiscardUnusedModels(const GenericVector< RowScratchRegisters > &rows, ParagraphTheory *theory)
bool AsciiLikelyListItem(const STRING &word)
bool StrongModel(const ParagraphModel *model)
const ParagraphModel * kCrownRight
bool ValidFirstLine(const GenericVector< RowScratchRegisters > *rows, int row, const ParagraphModel *model)
bool LikelyParagraphStart(const RowScratchRegisters &before, const RowScratchRegisters &after)
bool RowsFitModel(const GenericVector< RowScratchRegisters > *rows, int start, int end, const ParagraphModel *model)
GenericVector< ParagraphModel * > & models()
int UnicodeFor(const UNICHARSET *u, const WERD_CHOICE *werd, int pos)
void RightWordAttributes(const UNICHARSET *unicharset, const WERD_CHOICE *werd, const STRING &utf8, bool *is_list, bool *starts_idea, bool *ends_idea)
void RecomputeMarginsAndClearHypotheses(GenericVector< RowScratchRegisters > *rows, int start, int end, int percentile)
LineHypothesis(const LineHypothesis &other)
GenericVectorEqEq< const ParagraphModel * > SetOfModels
const ParagraphModel * model
const GenericVector< ParagraphModel * > & models() const
ParagraphTheory(GenericVector< ParagraphModel *> *models)
bool FirstWordWouldHaveFit(const RowScratchRegisters &before, const RowScratchRegisters &after, tesseract::ParagraphJustification justification)
bool operator==(const LineHypothesis &other) const
int InterwordSpace(const GenericVector< RowScratchRegisters > &rows, int row_start, int row_end)
int OffsideIndent(tesseract::ParagraphJustification just) const
int AlignsideIndent(tesseract::ParagraphJustification just) const
bool ValidBodyLine(const GenericVector< RowScratchRegisters > *rows, int row, const ParagraphModel *model)
void LeftWordAttributes(const UNICHARSET *unicharset, const WERD_CHOICE *werd, const STRING &utf8, bool *is_list, bool *starts_idea, bool *ends_idea)
LineHypothesis(LineType line_type, const ParagraphModel *m)
const ParagraphModel * kCrownLeft
bool CrownCompatible(const GenericVector< RowScratchRegisters > *rows, int a, int b, const ParagraphModel *model)
void CanonicalizeDetectionResults(GenericVector< PARA *> *row_owners, PARA_LIST *paragraphs)