Skip to main content

Package to convert numbers to words with support of multiple indian languages.

Project description

The code has been converted into PyPI module for the easy installation and update.

indic-num2words moduls converts numbers like 36 to words like छत्तीस.

Use Cases:-

  1. Speech recognition pre-processing

  2. Language modeling data pre-processing

Installation :-

To install latest PyPI stable release

pip install indic-num2words

Usage :-

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)

What’s next

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 :)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

indic-num2words-1.2.0.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

indic_num2words-1.2.0-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file indic-num2words-1.2.0.tar.gz.

File metadata

  • Download URL: indic-num2words-1.2.0.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for indic-num2words-1.2.0.tar.gz
Algorithm Hash digest
SHA256 20f5257eb6a3cf5110c0051eb6c93a12024568545332ebd0f000980e243dc770
MD5 e409d9334603360d44bed9dcca062445
BLAKE2b-256 2c34da67cbb9c84156d7ff1099570e0ee1840b65abadd2ee0e9f33a6f30bae7e

See more details on using hashes here.

File details

Details for the file indic_num2words-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for indic_num2words-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a39a4e8526cee2201e757760bff3b6ef66001265d46799bb7d7701e9a9347a70
MD5 5101ccca3602b1db4175b81d222b93c1
BLAKE2b-256 33e8215a154972d5b40c505e7a5b10caf3acecf886e88b61caede24780602ac4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page