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

`python >>> 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., it’s pretty easy.

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.1.tar.gz (16.3 kB view hashes)

Uploaded Source

Built Distribution

indic_num2words-1.2.1-py3-none-any.whl (16.1 kB view hashes)

Uploaded Python 3

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