feat(parser): fix OCR character misreads in money spans #110

Merged
TimCane merged 6 commits from feat/96-money-misread into main 2026-07-07 14:57:03 +01:00
TimCane commented 2026-07-07 12:48:35 +01:00 (Migrated from github.com)

Summary

  • add MoneyMisreadRepair normalization pass: O/0, S->5, l/I->1, B->8, leading E->£
  • gate strictly to a trailing money-shaped token with a real digit and a repairable glyph, so item names (7UP, Coke Zero, KX BOB) are untouched
  • wire it after Normalizer.Normalize so MoneyAtEnd() sees the repaired price
  • document the pass in docs/06, docs/11 and docs/15

Test plan

  • dotnet test - 96 pass (91 existing byte-for-byte green, 5 new)
  • new fixture per misread class; each fails without the repair and passes with it
  • survivor names in the fixtures prove alphabetic item names survive

Closes #96

## Summary - add `MoneyMisreadRepair` normalization pass: `O`/`0`, `S`->5, `l`/`I`->1, `B`->8, leading `E`->£ - gate strictly to a trailing money-shaped token with a real digit and a repairable glyph, so item names (`7UP`, `Coke Zero`, `KX BOB`) are untouched - wire it after `Normalizer.Normalize` so `MoneyAtEnd()` sees the repaired price - document the pass in docs/06, docs/11 and docs/15 ## Test plan - `dotnet test` - 96 pass (91 existing byte-for-byte green, 5 new) - new fixture per misread class; each fails without the repair and passes with it - survivor names in the fixtures prove alphabetic item names survive Closes #96
Sign in to join this conversation.
No description provided.