Skip to content

Conversation

@cmartinez32
Copy link

Fixes #628 by adding space after "duizend"

Changes proposed in this pull request:

  • Changed elif statement in merge method so it triggers at values =>10^3 instead of values => 10^6. Words with values equal to or greater than 10^3 such as "duizend" and "miljoen" and so forth, will have a space after them as long as they are not the last word in the string.
  • Added unit tests covering this spacing behavior for cardinal numbers and fixed existing tests to require a space after "duizend" (only when "duizend" is not the last word).

Status

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

How to verify this change

Test with num2words(1001, lang="nl") and ensure that there is space after "duizend". Can use any number n as long as n>1000 and has digits>0 in the hundreds, tens, or ones positions (or equivalently, where "duizend" is not the last word).
Run python -m unittest tests.test_nl to verify Dutch language tests pass.

Additional notes

Justification for this change:

  1. https://woordenlijst.org/zoeken/?leidraad=6-9 (linked by @hiddefolkertsma in [Dutch] "duizend" is not followed by a space #628)
  2. https://en.wikibooks.org/wiki/Dutch/Vocabulary/The_numbers
  3. https://taaladvies.net/aaneenschrijven-van-telwoorden-algemeen/

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.

[Dutch] "duizend" is not followed by a space

1 participant