Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New languages: Welsh (Celtic) and Chechen (Nakho-Dagestanian) #543

Merged
merged 11 commits into from
Mar 28, 2024

Conversation

jheinecke
Copy link
Contributor

Fixes # by Johannes Heinecke

Changes proposed in this pull request:

support of two new languages

  • Welsh (a Celtic language)
  • Chechen (a North-East-Caucasian (or Nakho-Dagestanian) language)

Status

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

How to verify this change

run tests for Welsh and Chechen

pytest -v tests/test_cy.py
pytest -v tests/test_ce.py

Additional notes

Welsh

I needed Welsh for a personal project. I also added Chechen since was on it.

The Welsh function has two additional arguments: gender (valid values fem or masc) and the counted object. The latter is needed since in Welsh the counted object does not follow the number (like English seventeen dogs) but is inserted within the numeric expression:

dau gi  ar bymtheg
2   dog on 15

e.g. num2words(17, lang="cy", counted="ci", gender="masc")

Currencies are used in the same way

E.g. num2words(31.50, lang='cy', to="currency", currency="GBP")

tair punt  ar ddeg, hanner cant    ceiniog
3   pound on 10     half   hundred penny

After a numeral the noun is always in Singular

Chechen

The Chechen API as also two language specific arguments, case (valid values: abs, gen, dat, erg, instr, mat, comp, all, obl, attr) and the semantic class (gender). The cases obl is needed when the numeral is used with a noun in non-Absolute Case, attr is needed (only internally) if the numeral precedes another numeral (ши бӀе == 2 * 100). All other cases are used if the numeral is used as a noun (Tree are coming)
Chechen has 6 classes (genders) which are marked by 4 letters ("д", "б", "й" or "в".

class SG PL
1 в д
2 й д
3 д д
4 й й
5 б б
6 б д

Adjectives, numerals and verbs agree with the noun in class. In case of numerals it is only 4, 14, 40, 80 which show the class letter. If not given "д" is used:

e.g. num2words(4, lang='ce', case="abs", clazz="в")

@coveralls
Copy link

coveralls commented Nov 9, 2023

Coverage Status

coverage: 97.561% (+0.08%) from 97.483%
when pulling 69dd3e8 on jheinecke:master
into 038e92d on savoirfairelinux:master.

jheinecke and others added 3 commits November 9, 2023 17:25
trying to improve ...
tests do pass in 333->343, 341->343, 572->exit but coverage marks as not testes
@jheinecke
Copy link
Contributor Author

Hi, is there any action needed from me ? checks seemed to have passed successfully :-)

@mrodriguezg1991
Copy link
Contributor

Hi, is there any action needed from me ? checks seemed to have passed successfully :-)

Hi, sorry for the delay, seems to be some conflicts with the main branch, can you fix it, pls? Thanks

@jheinecke
Copy link
Contributor Author

I resolved the conflict. Should be OK now

@mrodriguezg1991 mrodriguezg1991 merged commit 5e6fa94 into savoirfairelinux:master Mar 28, 2024
14 checks passed
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.

3 participants