The code has been converted into PyPI module for the easy installation and update.
indic-num2words
moduls converts numbers like 36
to words like छत्तीस
.
- Speech recognition pre-processing
- Language modeling data pre-processing
To install latest PyPI stable release
pip install indic-num2words
In code there's only one function to use
>>> from num_to_words import num_to_word
>>> num_to_word(36, lang='hi')
छत्तीस
>>> num_to_word('४५', lang='hi')
पैंतालीस
>>> num_to_word("35,43,57,730", lang='hi')
पैंतीसकरोड़ तैंतालीसलाख सत्तावनहज़ार सातसौ तीस
>>> num_to_word(795, lang='kn', separator='-')
ಏಳುನೂರ-ತೊಂಬತ್ತೈದು
>>> num_to_word(545589, lang='en', separator=', ', combiner='-')
five-lakh, forty-five-thousand, five-hundred, eighty-nine
The module currently supports the following languages:
en
(English-India)hi
(Hindi)gu
(Gujarati)mr
(Marathi)bn
(Bengali)te
(Telugu)ta
(Tamil)kn
(Kannada)or
(Oriya)pa
(Punjabi)
Add Support for following Languages
- Malayalam
- Urdu
- Assamese
check utils/constants.py to add support for any indian languages.
Shout out if you want to help :)