pronounce_ordinal returns a cardinal word for the Slovenian hundreds 200 to 900, the Croatian 1000 and the Turkish 200 and 500

Open Beginner friendly
#559 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
80/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python

Research direction

Start in ovos_number_parser/numbers_sl.py at pronounce_number_sl with ordinals=True, where the round hundreds fall through to the cardinal form, then check pronounce_ordinal_hr in ovos_number_parser/numbers_hr.py and the ordinal writer in ovos_number_parser/numbers_tr.py. Run the reproduction snippet, then assert the round trip is_ordinal(pronounce_ordinal(n, lang), lang) == n for sl 200-900, hr 1000 and tr 200/500. Done when each call returns the expected word from the issue table and those round trips pass.

Written by the indexing model from the issue text.

Description

🤖 Auto-generated by Claude Sonnet 5.5 (claude-sonnet-5-5) via Claude Code — NOT human-reviewed. Verify before acting.

pronounce_ordinal returns the cardinal word, not the ordinal, for the Slovenian hundreds 200 to 900, the Croatian 1000 and the Turkish 200 and 500. The result does not read back as an ordinal.

The round trip is_ordinal(pronounce_ordinal(n, lang), lang) == n shows the defect.

Observed

Checked on ovos-number-parser dev (commit 54a16d3) with numtag 0.19.2a1. The expected words are the ones that numtag reads as the ordinal of that value. The numtag hr lexicon cites CLDR RBNF %spellout-ordinal-masculine for "tisućiti".

Lang Call Returns Expected
sl pronounce_ordinal(200, "sl") dvesto dvestoti
sl pronounce_ordinal(300, "sl") tristo tristoti
sl pronounce_ordinal(400, "sl") štiristo štiristoti
sl pronounce_ordinal(500, "sl") petsto petstoti
sl pronounce_ordinal(600, "sl") šeststo šeststoti
sl pronounce_ordinal(700, "sl") sedemsto sedemstoti
sl pronounce_ordinal(800, "sl") osemsto osemstoti
sl pronounce_ordinal(900, "sl") devetsto devetstoti
hr pronounce_ordinal(1000, "hr") tisući tisućiti
tr pronounce_ordinal(200, "tr") iki yüz iki yüzüncü
tr pronounce_ordinal(500, "tr") beş yüz beş yüzüncü

A caller that speaks an ordinal and reads it back gets False for these eleven values. On dev, is_ordinal read the cardinal back as 200 and 500, so the round trip passed by accident.

The Slovenian ordinals of the other values in the round trip (1 to 199, 201 to 999 except the round hundreds) read back.

Expected

pronounce_ordinal(200, "sl") is dvestoti, as pronounce_ordinal(250, "sl") is dvestopetdeseti. pronounce_ordinal(1000, "hr") is tisućiti. pronounce_ordinal(200, "tr") is iki yüzüncü. The writers then agree with the readers of every language that reads through numtag.

Reproduce

from ovos_number_parser import pronounce_ordinal
print(pronounce_ordinal(200, "sl"), pronounce_ordinal(1000, "hr"), pronounce_ordinal(200, "tr"))

Where

ovos_number_parser/numbers_sl.py, pronounce_number_sl with ordinals=True, and pronounce_ordinal_hr in ovos_number_parser/numbers_hr.py, and the Turkish ordinal writer in ovos_number_parser/numbers_tr.py.

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.