Skip to content

fix: resolve 16 failing unit tests - #332

Merged
pengzhendong merged 2 commits into
masterfrom
fix/unittest-failures
Jun 9, 2026
Merged

fix: resolve 16 failing unit tests#332
pengzhendong merged 2 commits into
masterfrom
fix/unittest-failures

Conversation

@pengzhendong

Copy link
Copy Markdown
Member

Summary

  • Chinese ITN: prefer currency symbol ($) over ISO code (USD) by adding weight to code FST in money rule, so 美元 maps to $ instead of USD
  • Japanese ITN: fix big_integer FST structure to prevent 三十 from being split into 3 + 10 = 310 instead of parsed as 30
  • English TN: prefer oh over zero for digit 0 in non-deterministic mode by adding weight penalty to zero path in cardinal rule
  • English TN: fix whitelist test expectation Hon.Honorable (capitalized)

Test plan

  • All 1393 unit tests pass (previously 16 failures)
  • CI passes on PR

…and English TN

- Chinese ITN: prefer currency symbol ($) over ISO code (USD) by adding
  weight to code FST in money rule
- Japanese ITN: fix big_integer FST structure to prevent 三十 being split
  into 3+10=310 instead of parsed as 30
- English TN: prefer "oh" over "zero" for digit 0 in non-deterministic
  mode by adding weight to zero path
- English TN: fix whitelist test expectation for Hon. -> Honorable
Remove entries from tts.tsv that duplicate mappings in alternatives.tsv
(Hon., Mr., Mrs., Ms.) or are self-duplicated Greek letters (κ, ω, α,
ν, δ, Δ, Α, β, Β). This avoids non-deterministic FST behavior across
platforms when the same key maps to different values in unioned files.
@pengzhendong
pengzhendong merged commit b1c7af4 into master Jun 9, 2026
1 check passed
@pengzhendong
pengzhendong deleted the fix/unittest-failures branch June 9, 2026 06:54
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