Skip to content

Conversation

@sydneyfi
Copy link

Bug: #552

Fixes #552 by Paola L. & Sydney F.

Changes proposed in this pull request:

  • To fix the diciotto issue, we updated the phonetic_contraction() function to skip applying contractions if the string contains "diciotto", preventing it from being incorrectly shortened to "dicotto".

Status

  • READY
  • HOLD
  • WIP (Work-In-Progress)

How to verify this change

To verify the fix for the diciotto issue, we wrote unit tests for numbers like 118, 218, ..., 918, confirming that they correctly return "diciotto" instead of the incorrect "dicotto". We also tested other cases like 28, 88, and 21 to ensure valid phonetic contractions still work as expected. To manually verify this fix, you can run num2words(, lang="it") with any number ending in 18, and it should correctly preserve "diciotto" in the output. All tests passed, confirming the fix is working and safe.

Additional notes

If applicable, explain the rationale behind your change.

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.

Wrong Italian transcription for numbers ending with 18

2 participants