Indic-numtowords is a Python module developed by AI4Bharat that converts numbers into their word representations for various Indian languages and English (India). It supports languages such as Hindi, Nepali, Gujarati, Marathi, Bengali, Telugu, Tamil, Kannada, Oriya, Punjabi, and Malayalam. The library is currently at version 1.1.0, with an irregular release cadence.
pip install indic-numtowordsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to import the `num2words` function and use it to convert numbers into words for various supported languages. It also shows the usage of `lang`, `variations`, and `split` parameters.
Double-check your `pip install` command and `from ... import ...` statement. For this library (AI4Bharat/indic-numtowords), use `pip install indic-numtowords` and `from indic_numtowords import num2words`.
Refer to the official documentation or the `README.md` for a comprehensive list of supported language codes before use. For example, `en` refers to English-India.
For decimal or currency conversions, you may need to implement custom pre-processing or post-processing logic to handle fractional parts separately. Check the latest documentation for any new features.
Ensure the package is installed using pip: `pip install indic-numtowords`
Use the correct function name: `from indic_numtowords import num2words` and then `words = num2words(...)`
Provide a supported ISO 639-1 language code, such as 'hi' for Hindi, 'ta' for Tamil, or 'en' for English (India). Refer to the library's documentation for a complete list of supported languages.