pronounce_number misspells de "einstausend", it "centootto" and sv "etttusen "

Open
#585 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
73/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
localization

Research direction

Start by running the reproduce snippet from the issue, then read the cardinal writer paths in ovos_number_parser/numbers_de.py, numbers_it.py and numbers_sv.py to find where the unit word is joined to the scale word and where Swedish leaves a trailing space. Use _pronounce_rbnf in the same package as the reference engine to compare outputs, and check the existing tests for these languages for the fixtures already covering tens/hundreds composition. Done means the seven rows in the tables match, e.g. einhunderteintausend, centotto and ettusen with no trailing space, with no regressions in the other numbers.

Written by the indexing model from the issue text.

Description

🤖 Auto-generated by Claude Opus 5.5 (claude-opus-5-5) via Claude Code — NOT human-reviewed. Verify before acting. Every row was run on origin/dev d1e5321. The expected column is the output of the CLDR RBNF rules that this package already ships (_pronounce_rbnf), used as a second engine.

pronounce_number misspells some cardinals in de, it and sv. It also writes a trailing space after Swedish thousands.

Observed

lang number pronounce_number
de 101000 'einhunderteinstausend'
de 201000 'zweihunderteinstausend'
it 108 'centootto'
it 1108 'millecentootto'
sv 31000 'trettioetttusen '
sv 81000 'åttioetttusen '
sv 1000 'ettusen '

Expected

lang number expected (CLDR RBNF)
de 101000 'einhunderteintausend'
de 201000 'zweihunderteintausend'
it 108 'centotto'
it 1108 'millecentotto'
sv 31000 'trettioettusen'
sv 81000 'åttioettusen'
sv 1000 'ettusen'

In German, "eins" loses its "s" before "tausend", as it does in "eintausend" (which the writer gets right). In Italian, "cento" drops its last vowel before "otto", as it does before "ottanta" ("centottanta" is right). In Swedish, "ett" and "tusen" join with two t's, as in "ettusen" (right apart from the space).

Reproduce

from ovos_number_parser import pronounce_number
print(repr(pronounce_number(101000, "de")), repr(pronounce_number(108, "it")), repr(pronounce_number(31000, "sv")))

Where

The de, it and sv cardinal writers: ovos_number_parser/numbers_de.py, numbers_it.py and numbers_sv.py. The rows were found by a comparison of every writer language with CLDR RBNF over 1,508 numbers.

Dominant language
Python
Stars
4
Forks
5
Avg merge
5h 40m
Merged PRs (30d)
97

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OpenVoiceOS/ovos-number-parser

All issues in OpenVoiceOS/ovos-number-parser

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.