feat(parser): merge wrapped item names across lines #98

Closed
opened 2026-07-07 09:26:33 +01:00 by TimCane · 0 comments
TimCane commented 2026-07-07 09:26:33 +01:00 (Migrated from github.com)

Parent: #77 (Phase B, capability - risky pre-pass). Invariants live in the epic.

Join an item name split across OCR lines until its price appears.

Anchors

  • Candidate loop / money gate: ReceiptParser.cs:85-113 (lines with no
    MoneyAtEnd match are currently skipped at 91-96 - those are the fragments to
    merge).

Steps

  1. Add a pre-pass that buffers amount-less lines and joins them onto the next
    priced line (Classic / BAO / £6.50 -> one item).
  2. Gate merging so receipts that already parse correctly are untouched (only
    merge a bounded run immediately above a priced line).

Done

  • New wrapped-name fixture(s).
  • Existing corpus green - no drift on already-ordered receipts.
Parent: #77 (Phase B, capability - risky pre-pass). Invariants live in the epic. Join an item name split across OCR lines until its price appears. ## Anchors - Candidate loop / money gate: `ReceiptParser.cs:85-113` (lines with no `MoneyAtEnd` match are currently skipped at 91-96 - those are the fragments to merge). ## Steps 1. Add a pre-pass that buffers amount-less lines and joins them onto the next priced line (`Classic` / `BAO` / `£6.50` -> one item). 2. Gate merging so receipts that already parse correctly are untouched (only merge a bounded run immediately above a priced line). ## Done - [ ] New wrapped-name fixture(s). - [ ] Existing corpus green - no drift on already-ordered receipts.
Sign in to join this conversation.
No description provided.