leaf_focus/report/processing/parse.py
def document_lines(self, document: Document) -> Iterable[Line]:
        """Select the page lines to use."""

        for page in document.pages:
            # if the ocr items are available, use them
            if page.items:
                for index, text in enumerate(page.items_text_iter()):
                    yield Line(index=index, text=text, page=page)
            else:
                # otherwise use the embedded text lines
                for line in page.lines:
                    yield line
Select the page lines to use.
Select the page lines to use.
Select the page lines to use .
def document_lines(self, document: Document) -> Iterable[Line]:
        for page in document.pages:
            if page.items:
                for index, text in enumerate(page.items_text_iter()):
                    yield Line(index=index, text=text, page=page)
            else:
                for line in page.lines:
                    yield line
def document_lines ( self , document : Document ) -> Iterable [ Line ] : for page in document . pages : if page . items : for index , text in enumerate ( page . items_text_iter ( ) ) : yield Line ( index = index , text = text , page = page ) else : for line in page . lines : yield line
Select the page lines to use.
Select the page lines to use .
"""Select the page lines to use.""" # if the ocr items are available, use them # otherwise use the embedded text lines
self
document
Document