Skip to content

fix: expand money realizer coverage - #39

Merged
aryamantodkar merged 2 commits into
epic/realizer-edge-casesfrom
fix/realizer-edge-cases/money
Aug 29, 2026
Merged

fix: expand money realizer coverage#39
aryamantodkar merged 2 commits into
epic/realizer-edge-casesfrom
fix/realizer-edge-cases/money

Conversation

@aryamantodkar

@aryamantodkar aryamantodkar commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a local MONEY realizer for compositional major and minor currency amounts.
  • Cover signs, currency aliases, ISO and legacy names, grouping, punctuation, hyphenated speech, and thousand/lakh/crore/million/billion/trillion scales.
  • Add evaluation-only MONEY representation equivalence for symbols, placement, grouping, padding, and scale abbreviations.
  • Preserve currency identity: $ and USD are equivalent, but $, CAD, A$, and other currencies are not interchangeable.
  • Require complete MONEY-span consumption; unrelated suffixes such as tomorrow, weight, or only are rejected.
  • Update the README, coverage documentation, and focused Rust/Python tests.

Invariants

A complete MONEY span must produce a deterministic semantic amount and currency when its spoken value is valid. Display aliases remain evaluation-only and do not expand runtime candidates. Evaluation compares both normalized amount and currency identity.

Audit evidence

All seven Google TN shards were rerun: 214,728 MONEY rows total, with 21,239 exact and 191,379 identity-aware representation-equivalent results. The 2,047 mismatches are underdetermined annotations where generic spoken dollar/cent is paired with an explicit non-USD target such as A$ or ; the source does not identify that currency. The 63 None rows are malformed sil/pa annotations. The remaining 212,618 determinate, non-malformed rows have 100% exact-or-equivalent coverage.

Validation

  • uv run ruff format --check .
  • uv run ruff check .
  • uv run pytest (6 passed)
  • cargo fmt --manifest-path rust/Cargo.toml -- --check
  • cargo test --manifest-path rust/Cargo.toml (40 passed)
  • uv build

@aryamantodkar
aryamantodkar merged commit 2bc374b into epic/realizer-edge-cases Aug 29, 2026
@aryamantodkar
aryamantodkar deleted the fix/realizer-edge-cases/money branch August 29, 2026 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant