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.

Use Cases:-

  1. Speech recognition pre-processing

  2. Language modeling Data pre-processing

Usage :-

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

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)

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

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.0.1.tar.gz (16.6 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for indic-num2words-1.0.1.tar.gz
Algorithm Hash digest
SHA256 ca31b1dc38bb60c0af0333c807128e41c904e17279e3010fba3b8505ac676c80
MD5 0075cf9a5533fc7ccb5ef5910638e165
BLAKE2b-256 7116bf707cb0edf3a29698b9030737f2087cb6fb61786dadd97f61af981e770a

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