#include <paragraphs_internal.h>
Definition at line 234 of file paragraphs_internal.h.
Definition at line 1258 of file paragraphs.cpp.
1261 : theory_(theory), rows_(rows), row_start_(row_start),
1263 if (!AcceptableRowArgs(0, 0, __func__, rows, row_start, row_end)) {
1269 for (
int row = row_start - 1; row <= row_end; row++) {
1270 open_models_.push_back(no_models);
GenericVectorEqEq< const ParagraphModel * > SetOfModels
| void tesseract::ParagraphModelSmearer::Smear |
( |
| ) |
|
Definition at line 1305 of file paragraphs.cpp.
1306 CalculateOpenModels(row_start_, row_end_);
1311 for (
int i = row_start_;
i < row_end_;
i++) {
1312 RowScratchRegisters &row = (*rows_)[
i];
1313 if (row.ri_->num_words == 0)
1320 bool left_align_open =
false;
1321 bool right_align_open =
false;
1322 for (
int m = 0; m < OpenModels(
i).
size(); m++) {
1323 switch (OpenModels(
i)[m]->justification()) {
1326 default: left_align_open = right_align_open =
true;
1334 likely_start =
true;
1336 if ((left_align_open && right_align_open) ||
1337 (!left_align_open && !right_align_open)) {
1342 }
else if (left_align_open) {
1357 for (
int m = 0; m < OpenModels(
i).
size(); m++) {
1359 row.AddStartLine(OpenModels(
i)[m]);
1366 (*rows_)[
i - 1].StrongHypotheses(&last_line_models);
1370 for (
int m = 0; m < last_line_models.size(); m++) {
1373 row.AddBodyLine(model);
1382 (row.GetLineType() ==
LT_START && !row.UniqueStartHypothesis())) {
1385 for (
int m = 0; m < all_models.size(); m++) {
1387 row.AddStartLine(all_models[m]);
1395 CalculateOpenModels(
i + 1, row_end_);
void NonCenteredModels(SetOfModels *models)
bool ValidBodyLine(const GenericVector< RowScratchRegisters > *rows, int row, const ParagraphModel *model)
bool ValidFirstLine(const GenericVector< RowScratchRegisters > *rows, int row, const ParagraphModel *model)
bool LikelyParagraphStart(const RowScratchRegisters &before, const RowScratchRegisters &after)
GenericVectorEqEq< const ParagraphModel * > SetOfModels
The documentation for this class was generated from the following files: