#include <paragraphs_internal.h>
List of all members.
Detailed Description
Definition at line 100 of file paragraphs_internal.h.
Member Function Documentation
void tesseract::RowScratchRegisters::AddBodyLine |
( |
const ParagraphModel * |
model | ) |
|
void tesseract::RowScratchRegisters::AddStartLine |
( |
const ParagraphModel * |
model | ) |
|
void tesseract::RowScratchRegisters::AppendDebugHeaderFields |
( |
GenericVector< STRING > * |
header | ) |
|
|
static |
Definition at line 493 of file paragraphs.cpp.
{
char s[30];
snprintf(s, sizeof(s), "[%3d,%3d;%3d,%3d]",
model_string += ":";
int model_numbers = 0;
for (
int h = 0; h < hypotheses_.
size(); h++) {
if (hypotheses_[h].model ==
NULL)
continue;
if (model_numbers > 0)
model_string += ",";
model_string += StrOf(1 + theory.IndexOf(hypotheses_[h].model));
model_string += "CrL";
model_string += "CrR";
}
model_numbers++;
}
if (model_numbers == 0)
model_string += "0";
}
void tesseract::RowScratchRegisters::DiscardNonMatchingHypotheses |
( |
const SetOfModels & |
models | ) |
|
Definition at line 642 of file paragraphs.cpp.
{
if (models.empty())
return;
for (
int h = hypotheses_.
size() - 1; h >= 0; h--) {
if (!models.contains(hypotheses_[h].model)) {
}
}
}
LineType tesseract::RowScratchRegisters::GetLineType |
( |
| ) |
const |
Definition at line 532 of file paragraphs.cpp.
{
bool has_start = false;
bool has_body = false;
for (
int i = 0; i < hypotheses_.
size(); i++) {
switch (hypotheses_[i].ty) {
case LT_BODY: has_body =
true;
break;
default:
tprintf(
"Encountered bad value in hypothesis list: %c\n",
hypotheses_[i].ty);
break;
}
}
if (has_start && has_body)
}
Definition at line 552 of file paragraphs.cpp.
{
bool has_start = false;
bool has_body = false;
for (
int i = 0; i < hypotheses_.
size(); i++) {
if (hypotheses_[i].model != model)
continue;
switch (hypotheses_[i].ty) {
case LT_BODY: has_body =
true;
break;
default:
tprintf(
"Encountered bad value in hypothesis list: %c\n",
hypotheses_[i].ty);
break;
}
}
if (has_start && has_body)
}
void tesseract::RowScratchRegisters::Init |
( |
const RowInfo & |
row | ) |
|
void tesseract::RowScratchRegisters::NonNullHypotheses |
( |
SetOfModels * |
models | ) |
const |
Definition at line 622 of file paragraphs.cpp.
{
for (
int h = 0; h < hypotheses_.
size(); h++) {
if (hypotheses_[h].model !=
NULL)
models->push_back_new(hypotheses_[h].model);
}
}
void tesseract::RowScratchRegisters::SetBodyLine |
( |
| ) |
|
Definition at line 584 of file paragraphs.cpp.
{
tprintf(
"Trying to set a line to be BODY when it's already START.\n");
}
}
}
void tesseract::RowScratchRegisters::SetStartLine |
( |
| ) |
|
Definition at line 574 of file paragraphs.cpp.
{
tprintf(
"Trying to set a line to be START when it's already BODY.\n");
}
}
}
void tesseract::RowScratchRegisters::SetUnknown |
( |
| ) |
|
|
inline |
void tesseract::RowScratchRegisters::StartHypotheses |
( |
SetOfModels * |
models | ) |
const |
Definition at line 608 of file paragraphs.cpp.
{
for (
int h = 0; h < hypotheses_.
size(); h++) {
models->push_back_new(hypotheses_[h].model);
}
}
void tesseract::RowScratchRegisters::StrongHypotheses |
( |
SetOfModels * |
models | ) |
const |
Definition at line 615 of file paragraphs.cpp.
{
for (
int h = 0; h < hypotheses_.
size(); h++) {
models->push_back_new(hypotheses_[h].model);
}
}
const ParagraphModel * tesseract::RowScratchRegisters::UniqueBodyHypothesis |
( |
| ) |
const |
Definition at line 635 of file paragraphs.cpp.
{
if (hypotheses_.
size() != 1 || hypotheses_[0].ty !=
LT_BODY)
return hypotheses_[0].model;
}
const ParagraphModel * tesseract::RowScratchRegisters::UniqueStartHypothesis |
( |
| ) |
const |
Member Data Documentation
int tesseract::RowScratchRegisters::lindent_ |
int tesseract::RowScratchRegisters::lmargin_ |
const RowInfo* tesseract::RowScratchRegisters::ri_ |
int tesseract::RowScratchRegisters::rindent_ |
int tesseract::RowScratchRegisters::rmargin_ |
The documentation for this class was generated from the following files: