savoirfairelinux / num2words

Modules to convert numbers to words. 42 --> forty-two
GNU Lesser General Public License v2.1
820 stars 497 forks source link

Add Czech ISO code cs to converter classes #571

Open comodoro opened 6 months ago

comodoro commented 6 months ago

Fixes # by...

Changes proposed in this pull request:

Add Czech language ISO code cs to converter classes For compatibility at least with gruut

Status

How to verify this change

Additional notes

I am playing witn Coqui TTS and gettingNotImplementedError because of this

coveralls commented 5 months ago

Coverage Status

coverage: 97.561%. remained the same when pulling 45d7ee2d2f9ab8d17ff45e63e798846fa2297ef9 on comodoro:patch-1 into 5e6fa94866eef0ea5b5df6843699c64379d02c81 on savoirfairelinux:master.

comodoro commented 5 months ago

I have just used the original repo, the exceptions are

Failed to convert number 22 to words for language cs-cz
Traceback (most recent call last):
  File "/home/vojta/tts/venv/lib/python3.10/site-packages/gruut/text_processor.py", line 2086, in _verbalize_number
    num_str = num2words(final_num, **num2words_kwargs)
  File "/home/vojta/tts/venv/lib/python3.10/site-packages/num2words/__init__.py", line 91, in num2words
    raise NotImplementedError()
NotImplementedError
Failed to convert number 22 to words for language cs-cz
Traceback (most recent call last):
  File "/home/vojta/tts/venv/lib/python3.10/site-packages/gruut/text_processor.py", line 2086, in _verbalize_number
    num_str = num2words(final_num, **num2words_kwargs)
  File "/home/vojta/tts/venv/lib/python3.10/site-packages/num2words/__init__.py", line 91, in num2words
    raise NotImplementedError()
NotImplementedError
Failed to convert number 1963 to words for language cs-cz
Traceback (most recent call last):
  File "/home/vojta/tts/venv/lib/python3.10/site-packages/gruut/text_processor.py", line 2086, in _verbalize_number
    num_str = num2words(final_num, **num2words_kwargs)
  File "/home/vojta/tts/venv/lib/python3.10/site-packages/num2words/__init__.py", line 91, in num2words
    raise NotImplementedError()
NotImplementedError
[...]
TrangOul commented 1 week ago

"CZ" is wrong, it should be replaced. Done in #587.