(rows: Set[int], GRID)
| 598 | |
| 599 | # -------------------------------------------------------------------- |
| 600 | def curate_rows(rows: Set[int], GRID) -> List: |
| 601 | rows = list(rows) |
| 602 | rows.sort() # sort ascending |
| 603 | nrows = [rows[0]] |
| 604 | for h in rows[1:]: |
| 605 | if h >= nrows[-1] + GRID: # only keep significant differences |
| 606 | nrows.append(h) |
| 607 | return nrows # curated list of line bottom coordinates |
| 608 | |
| 609 | def process_blocks(blocks: List[Dict], page: pymupdf.Page): |
| 610 | rows = set() |
no test coverage detected
searching dependent graphs…