MCPcopy Create free account
hub / github.com/creatale/node-dv / RowsFitModel

Function RowsFitModel

deps/tesseract/ccmain/paragraphs.cpp:1808–1817  ·  view source on GitHub ↗

Do rows[start, end) form a single instance of the given paragraph model?

Source from the content-addressed store, hash-verified

1806
1807// Do rows[start, end) form a single instance of the given paragraph model?
1808bool RowsFitModel(const GenericVector<RowScratchRegisters> *rows,
1809 int start, int end, const ParagraphModel *model) {
1810 if (!AcceptableRowArgs(0, 1, __func__, rows, start, end))
1811 return false;
1812 if (!ValidFirstLine(rows, start, model)) return false;
1813 for (int i = start + 1 ; i < end; i++) {
1814 if (!ValidBodyLine(rows, i, model)) return false;
1815 }
1816 return true;
1817}
1818
1819// Examine rows[row_start, row_end) as an independent section of text,
1820// and mark rows that are exceptionally clear as start-of-paragraph

Callers 1

FitsMethod · 0.85

Calls 3

AcceptableRowArgsFunction · 0.85
ValidFirstLineFunction · 0.85
ValidBodyLineFunction · 0.85

Tested by

no test coverage detected