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