OCR-парсер: индексы столбцов по заголовку таблицы (#6) #7

Closed
aep wants to merge 2 commits from feat/6-ocr-header-columns into main

2 Commits

Author SHA1 Message Date
Andrey Epifancev
47b65469e1 feat(pdf-worker): infer OCR columns from data rows when header is missing
Rows before the first header are parsed by a layout inferred from those rows
(the header's indices may not match them); the header is written first.
Without any header the layout is inferred from all rows and a header with
code and name and empty period texts is created. Value columns: amounts
outnumber junk or the column is fully empty.

Refs #6

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 18:49:47 +04:00
Andrey Epifancev
8e4405f0b1 feat(pdf-worker): determine OCR table columns from header row
Column indices for label, code and values are taken from the header row
(cell «Код») instead of fixed positions 0/1/2+. Every repeated header
overwrites the layout. Value column_index is normalized to 2..n, missing
cells become empty unrecognized values, tables without a header are skipped
with a warning.

Refs #6

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 18:39:14 +04:00