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);
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_
bool ValidFirstLine(const GenericVector< RowScratchRegisters > *rows, int row, const ParagraphModel *model)
const ParagraphModel * UniqueStartHypothesis() const
int AlignsideIndent(tesseract::ParagraphJustification just) const
bool RowsFitModel(const GenericVector< RowScratchRegisters > *rows, int start, int end, const ParagraphModel *model)
GenericVector< ParagraphModel * > & models()
void LeftWordAttributes(const UNICHARSET *unicharset, const WERD_CHOICE *werd, const STRING &utf8, bool *is_list, bool *starts_idea, bool *ends_idea)
void NonNullHypotheses(SetOfModels *models) const
int UnicodeFor(const UNICHARSET *u, const WERD_CHOICE *werd, int pos)
const ParagraphModel * kCrownRight
void NonCenteredModels(SetOfModels *models)
bool StrongModel(const ParagraphModel *model)
void RightWordAttributes(const UNICHARSET *unicharset, const WERD_CHOICE *werd, const STRING &utf8, bool *is_list, bool *starts_idea, bool *ends_idea)
ParagraphModelSmearer(GenericVector< RowScratchRegisters > *rows, int row_start, int row_end, ParagraphTheory *theory)
GenericVectorEqEq< const ParagraphModel * > SetOfModels
bool ValidBodyLine(const GenericVector< RowScratchRegisters > *rows, int row, const ParagraphModel *model)
static void AppendDebugHeaderFields(GenericVector< STRING > *header)
void StrongHypotheses(SetOfModels *models) const
void AddStartLine(const ParagraphModel *model)
const ParagraphModel * model
void Init(const RowInfo &row)
bool operator==(const LineHypothesis &other) const
void RecomputeMarginsAndClearHypotheses(GenericVector< RowScratchRegisters > *rows, int start, int end, int percentile)
const ParagraphModel * AddModel(const ParagraphModel &model)
bool FirstWordWouldHaveFit(const RowScratchRegisters &before, const RowScratchRegisters &after, tesseract::ParagraphJustification justification)
void StartHypotheses(SetOfModels *models) const
void AddBodyLine(const ParagraphModel *model)
void CanonicalizeDetectionResults(GenericVector< PARA * > *row_owners, PARA_LIST *paragraphs)
LineHypothesis(LineType line_type, const ParagraphModel *m)
ParagraphTheory(GenericVector< ParagraphModel * > *models)
const ParagraphModel * UniqueBodyHypothesis() const
void DiscardNonMatchingHypotheses(const SetOfModels &models)
const ParagraphModel * kCrownLeft
void AppendDebugInfo(const ParagraphTheory &theory, GenericVector< STRING > *dbg) const
bool LikelyParagraphStart(const RowScratchRegisters &before, const RowScratchRegisters &after)
const GenericVector< ParagraphModel * > & models() const
LineHypothesis(const LineHypothesis &other)
void DiscardUnusedModels(const SetOfModels &used_models)
LineType GetLineType() const
bool CrownCompatible(const GenericVector< RowScratchRegisters > *rows, int a, int b, const ParagraphModel *model)
bool AsciiLikelyListItem(const STRING &word)
const ParagraphModel * Fits(const GenericVector< RowScratchRegisters > *rows, int start, int end) const
int OffsideIndent(tesseract::ParagraphJustification just) const
int InterwordSpace(const GenericVector< RowScratchRegisters > &rows, int row_start, int row_end)
int IndexOf(const ParagraphModel *model) const