#include <paragraphs_internal.h>
Definition at line 102 of file paragraphs_internal.h.
◆ AddBodyLine()
void tesseract::RowScratchRegisters::AddBodyLine |
( |
const ParagraphModel * |
model | ) |
|
Definition at line 618 of file paragraphs.cpp.
620 models->push_back_new(hypotheses_[h].model);
◆ AddStartLine()
void tesseract::RowScratchRegisters::AddStartLine |
( |
const ParagraphModel * |
model | ) |
|
Definition at line 611 of file paragraphs.cpp.
613 models->push_back_new(hypotheses_[h].model);
◆ AlignsideIndent()
◆ AppendDebugHeaderFields()
void tesseract::RowScratchRegisters::AppendDebugHeaderFields |
( |
GenericVector< STRING > * |
header | ) |
|
|
static |
Definition at line 504 of file paragraphs.cpp.
507 if (hypotheses_[h].model ==
nullptr)
◆ AppendDebugInfo()
Definition at line 510 of file paragraphs.cpp.
512 model_string += StrOf(1 + theory.IndexOf(hypotheses_[h].model));
513 }
else if (hypotheses_[h].model ==
kCrownLeft) {
514 model_string +=
"CrL";
516 model_string +=
"CrR";
520 if (model_numbers == 0)
535 if (hypotheses_.empty())
537 bool has_start =
false;
538 bool has_body =
false;
539 for (
int i = 0; i < hypotheses_.size(); i++) {
◆ DiscardNonMatchingHypotheses()
void tesseract::RowScratchRegisters::DiscardNonMatchingHypotheses |
( |
const SetOfModels & |
models | ) |
|
Definition at line 659 of file paragraphs.cpp.
659 : center(cen),
count(num) {}
665 class SimpleClusterer {
667 explicit SimpleClusterer(
int max_cluster_width)
668 : max_cluster_width_(max_cluster_width) {}
◆ GetLineType() [1/2]
LineType tesseract::RowScratchRegisters::GetLineType |
( |
| ) |
const |
Definition at line 549 of file paragraphs.cpp.
555 if (hypotheses_.empty())
557 bool has_start =
false;
558 bool has_body =
false;
559 for (
int i = 0; i < hypotheses_.size(); i++) {
560 if (hypotheses_[i].model != model)
562 switch (hypotheses_[i].ty) {
563 case LT_START: has_start =
true;
break;
564 case LT_BODY: has_body =
true;
break;
566 tprintf(
"Encountered bad value in hypothesis list: %c\n",
◆ GetLineType() [2/2]
Definition at line 569 of file paragraphs.cpp.
579 tprintf(
"Trying to set a line to be START when it's already BODY.\n");
582 hypotheses_.push_back_new(LineHypothesis(
LT_START,
nullptr));
589 tprintf(
"Trying to set a line to be BODY when it's already START.\n");
◆ Init()
void tesseract::RowScratchRegisters::Init |
( |
const RowInfo & |
row | ) |
|
Definition at line 541 of file paragraphs.cpp.
541 : has_start =
true;
break;
542 case LT_BODY: has_body =
true;
break;
544 tprintf(
"Encountered bad value in hypothesis list: %c\n",
◆ NonNullHypotheses()
void tesseract::RowScratchRegisters::NonNullHypotheses |
( |
SetOfModels * |
models | ) |
const |
◆ OffsideIndent()
◆ SetBodyLine()
void tesseract::RowScratchRegisters::SetBodyLine |
( |
| ) |
|
Definition at line 601 of file paragraphs.cpp.
604 hypotheses_.push_back_new(LineHypothesis(
LT_BODY, model));
605 int old_idx = hypotheses_.get_index(LineHypothesis(
LT_BODY,
nullptr));
607 hypotheses_.remove(old_idx);
◆ SetStartLine()
void tesseract::RowScratchRegisters::SetStartLine |
( |
| ) |
|
Definition at line 591 of file paragraphs.cpp.
592 hypotheses_.push_back_new(LineHypothesis(
LT_BODY,
nullptr));
597 hypotheses_.push_back_new(LineHypothesis(
LT_START, model));
598 int old_idx = hypotheses_.get_index(LineHypothesis(
LT_START,
nullptr));
◆ SetUnknown()
void tesseract::RowScratchRegisters::SetUnknown |
( |
| ) |
|
|
inline |
◆ StartHypotheses()
void tesseract::RowScratchRegisters::StartHypotheses |
( |
SetOfModels * |
models | ) |
const |
Definition at line 625 of file paragraphs.cpp.
626 if (hypotheses_[h].model !=
nullptr)
627 models->push_back_new(hypotheses_[h].model);
◆ StrongHypotheses()
void tesseract::RowScratchRegisters::StrongHypotheses |
( |
SetOfModels * |
models | ) |
const |
◆ UniqueBodyHypothesis()
const ParagraphModel * tesseract::RowScratchRegisters::UniqueBodyHypothesis |
( |
| ) |
const |
◆ UniqueStartHypothesis()
const ParagraphModel * tesseract::RowScratchRegisters::UniqueStartHypothesis |
( |
| ) |
const |
Definition at line 646 of file paragraphs.cpp.
649 if (!models.contains(hypotheses_[h].model)) {
650 hypotheses_.remove(h);
◆ lindent_
int tesseract::RowScratchRegisters::lindent_ |
◆ lmargin_
int tesseract::RowScratchRegisters::lmargin_ |
◆ ri_
const RowInfo* tesseract::RowScratchRegisters::ri_ |
◆ rindent_
int tesseract::RowScratchRegisters::rindent_ |
◆ rmargin_
int tesseract::RowScratchRegisters::rmargin_ |
The documentation for this class was generated from the following files: