Skip to content

Fix increasing scale groups in English number normalization - #2896

Open
Shubham-Padkonde wants to merge 1 commit into
openai:mainfrom
Shubham-Padkonde:fix/increasing-number-multipliers
Open

Shubham-Padkonde wants to merge 1 commit into
openai:mainfrom
Shubham-Padkonde:fix/increasing-number-multipliers

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

The English number normalizer currently turns one thousand million and 1000 million into 1000, rather than 1000000000. Its integer multiplier path always preserves the part above the last three digits, so a following million or billion never scales the thousands that belong to it.

Use the current multiplier as the group boundary for multipliers above a thousand. This also handles ordinal/plural multiplier forms and retains already accumulated higher groups: one trillion two thousand million becomes 1002000000000. Existing descending expressions such as one million two hundred thousand remain unchanged.

The new parameterized cases run through both EnglishNumberNormalizer and EnglishTextNormalizer. Sixteen cases fail before the fix; all 24 normalizer cases pass afterward.

Validation: all 37 tests excluding transcription-model and CUDA tests pass on Python 3.10 / PyTorch 2.6 CPU. The repository's pinned pre-commit hooks pass for both changed files. Model transcription and CUDA tests were not run. git diff --check passes.

AI-assisted contribution.

ravindra-y added a commit to ravindra-y/pr-courtroom that referenced this pull request Oct 24, 2026
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