savoirfairelinux / num2words

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

Truncation of spelled number when you extend range in power other than 2 or 3. #414

Open hardeepparmar opened 3 years ago

hardeepparmar commented 3 years ago

Expected Behaviour

Numbers when spelled should not get truncated

Actual Behaviour

modify lang_EN_IN.py by adding higher power, which are not necessarily increasing in power 2 or 3. n="12345678901234567890123456789012345678901234567890123456789012345" print(num2words(n,lang ='en_IN') + ' (IND) ') results into "one hundred and twenty-three mahaugha, forty-five thousand, six hundred and seventy-eight ogha, ninety thousand, one hundred and twenty-three samudra, forty-five thousand, six hundred and seventy-eight mahakharav, ninety thousand, one hundred and twenty-three kharav, forty-five thousand, six hundred and seventy-eight mahapadam, ninety thousand, one hundred padam (IND)" truncation of trailing digits happens.

Steps to reproduce

hardeepparmar commented 3 years ago

https://en.wikipedia.org/wiki/Indian_numbering_system