bettersight-statement-extra.../backend/services/extraction
JasonFraser db11c1f7c5 Manual layout mapping: correct successful extractions, OCR-sourced statements, money-parsing fixes
- Compute a fingerprint unconditionally on every successful extraction
  (not just the two failure paths), so a "Map" button on an already-
  successful document can open the manual mapping screen to CORRECT it
  via a real fingerprint, not just the auto-triggered failure flow.
- Extend forced-mapping support to OCR-sourced statements (scanned PDFs
  and raw photos): raw_ocr_extract.py gains forced_zones/header_bottom/
  date_format/value_patterns support and a new header_candidate_geometry
  for OCR-derived fingerprinting; a forced OCR mapping bypasses Docling's
  table-structure call entirely.
- Recognize parenthesized negative amounts ("(25.00)") via a shared
  _split_sign() helper used by both _parse_money() and
  _parse_money_with_patterns() - fixes a real blank-extraction bug on a
  single-Amount-column statement using this accounting convention.
- Upscale a low-resolution image before OCR (_MIN_OCR_WIDTH_PX) - a real
  480x800px phone photo was barely readable by tesserocr at native size.
- ManualMappingView.vue: no longer requires a Balance column (some real
  statements don't print one), and imagePointScale converts a drawn
  region's coordinates from an image's natural-pixel space into PDF
  points before sending a forced mapping - every image-sourced mapping
  before this sent zones in the wrong coordinate space entirely.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-11-24 08:15:34 -04:00
..
__init__.py Fix edit-icon color, description autogrow, and add image zoom controls 2026-10-11 23:44:06 -04:00
docling_parser.py Fix edit-icon color, description autogrow, and add image zoom controls 2026-10-11 23:44:06 -04:00
layout_fingerprint.py Wire frontend fingerprint-lookup orchestration for the layout mapper (L.4) 2026-10-14 19:51:42 -04:00
layout_quirks.py Add modular layout-quirks tier; fix a new statement's wrapped header, $-prefixed amounts, and ISO dates 2026-10-14 01:09:43 -04:00
layout_rules.py Add modular layout-quirks tier; fix a new statement's wrapped header, $-prefixed amounts, and ISO dates 2026-10-14 01:09:43 -04:00
raw_ocr_extract.py Manual layout mapping: correct successful extractions, OCR-sourced statements, money-parsing fixes 2026-11-24 08:15:34 -04:00
table_extract.py Manual layout mapping: correct successful extractions, OCR-sourced statements, money-parsing fixes 2026-11-24 08:15:34 -04:00