bettersight-statement-extra.../backend/services/extraction
JasonFraser 17a8ef1acf Recognize currency-code-prefixed money amounts (e.g. "CA$386.01")
A CAD-denominated Equals Money statement extracted zero transactions -
every amount prints as "CA$386.01" (a currency-code prefix before the
$), which _MONEY_RE only tolerated as a bare "$". Widened the regex to
accept an optional 1-3 letter prefix, but only when immediately
followed by a literal $ - a broader letters-only version was tried and
rejected first since it would also match a plain reference code like
"REF123.45". _classify_money's own numeric parsing now strips any
remaining non-numeric characters generically rather than only "$".

Verified against the user's actual uploaded file (retrieved from
PocketBase/R2): all 3 transactions and the opening/closing balance now
extract correctly, with statement_balance/running_balance/date_sanity/
structure_sanity all passing. measure.py re-run against the full
fixture corpus, byte-identical to baseline.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-30 14:40:05 -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 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
table_extract.py Recognize currency-code-prefixed money amounts (e.g. "CA$386.01") 2026-10-30 14:40:05 -04:00