#include <paragraphs_internal.h>
Definition at line 234 of file paragraphs_internal.h.
Definition at line 1309 of file paragraphs.cpp.
1312 : theory_(theory), rows_(rows), row_start_(row_start),
1314 if (!AcceptableRowArgs(0, 0, __func__, rows, row_start, row_end)) {
1320 for (
int row = row_start - 1; row <= row_end; row++) {
1321 open_models_.push_back(no_models);
GenericVectorEqEq< const ParagraphModel * > SetOfModels
| void tesseract::ParagraphModelSmearer::Smear |
( |
| ) |
|
Definition at line 1356 of file paragraphs.cpp.
1357 CalculateOpenModels(row_start_, row_end_);
1362 for (
int i = row_start_;
i < row_end_;
i++) {
1363 RowScratchRegisters &row = (*rows_)[
i];
1364 if (row.ri_->num_words == 0)
1371 bool left_align_open =
false;
1372 bool right_align_open =
false;
1373 for (
int m = 0; m < OpenModels(
i).
size(); m++) {
1374 switch (OpenModels(
i)[m]->justification()) {
1377 default: left_align_open = right_align_open =
true;
1385 likely_start =
true;
1387 if ((left_align_open && right_align_open) ||
1388 (!left_align_open && !right_align_open)) {
1393 }
else if (left_align_open) {
1408 for (
int m = 0; m < OpenModels(
i).
size(); m++) {
1410 row.AddStartLine(OpenModels(
i)[m]);
1417 (*rows_)[
i - 1].StrongHypotheses(&last_line_models);
1421 for (
int m = 0; m < last_line_models.size(); m++) {
1424 row.AddBodyLine(model);
1433 (row.GetLineType() ==
LT_START && !row.UniqueStartHypothesis())) {
1436 for (
int m = 0; m < all_models.size(); m++) {
1438 row.AddStartLine(all_models[m]);
1446 CalculateOpenModels(
i + 1, row_end_);
bool LikelyParagraphStart(const RowScratchRegisters &before, const RowScratchRegisters &after)
bool ValidBodyLine(const GenericVector< RowScratchRegisters > *rows, int row, const ParagraphModel *model)
void NonCenteredModels(SetOfModels *models)
GenericVectorEqEq< const ParagraphModel * > SetOfModels
bool ValidFirstLine(const GenericVector< RowScratchRegisters > *rows, int row, const ParagraphModel *model)
The documentation for this class was generated from the following files: