Skip to main content

Telugu Number-Words To Numbers Conversion

Overview

  • The Telugu Number-Words to Numbers Conversion package is a Python library that enables developers to convert numerical representations written in Telugu language text (using words) into their equivalent numerical values.

Features

  • Convert Telugu number-words to numerical values.

  • Supports a wide range of Telugu numerical representations.

Create a virtual environment if require with the python version 3.8 or more


conda create -n telugu_num_env python=3.8

# Replace "telugu_num_env" with other name according to you

Supporting packages to be installed (Additional packages can be installed if require)


text2digits

numpy

Installation with `pip'


# From CMD terminal

pip install telugu-words-numbers

# From IPYNB notebook

!pip install telugu-words-numbers

Usage for single text conversion


# Import and create an instance of the class TeluguWordsToNumber

from telugu_words_numbers import TeluguWordsToNumber

converter = TeluguWordsToNumber()

text = """

        చేతిలో పదివేల ఐదువందల రూపాయలతో ఐదుగురు స్నేహితులున్నారు.

        వారు హోటల్‌కి వెళ్లి ఏడు వందల ఎనభై తొమ్మిది రూపాయలు మాత్రమే ఖర్చు చేశారు.

        మిగిలిన రెండు వందల పదకొండు వారు తిరిగి ఇంటికి వెళ్లేందుకు ఖర్చు చేశారు.

    """

number, converted_text = converter.word_number_conversion(text)

print('Number: ', number)

print('Original Text: ', text)

print('Converted Text: ', converted_text)

Out of single text conversion


Number:  ['10500', '789', '211']

Original Text:

            చేతిలో పదివేల ఐదువందల రూపాయలతో ఐదుగురు స్నేహితులున్నారు.

            వారు హోటల్‌కి వెళ్లి ఏడు వందల ఎనభై తొమ్మిది రూపాయలు మాత్రమే ఖర్చు చేశారు.

            మిగిలిన రెండు వందల పదకొండు వారు తిరిగి ఇంటికి వెళ్లేందుకు ఖర్చు చేశారు.  

Converted Text:

            చేతిలో 10500 రూపాయలతో ఐదుగురు స్నేహితులున్నారు.

            వారు హోటల్‌కి వెళ్లి 789 రూపాయలు మాత్రమే ఖర్చు చేశారు.

            మిగిలిన 211 వారు తిరిగి ఇంటికి వెళ్లేందుకు ఖర్చు చేశారు.

Usage for multiple text conversion


# Import and create an instance of the class TeluguWordsToNumber

from telugu_words_numbers import TeluguWordsToNumber

converter = TeluguWordsToNumber()

texts = [

        "నూట పదమూడు మామిడి పండ్లలో ఒక వ్యక్తి డెబ్బై ఏడు మామిడి పండ్లను కొన్నాడు.",

        "వెయ్యి యాభై ఐదు రూపాయలలో ఒక వ్యక్తి తొమ్మిది వందల తొంభై రూపాయలు మాత్రమే ఖర్చు చేశాడు."

    ]

for text in texts:

    number, converted_text = converter.word_number_conversion(text)

    print('Number: ', number)

    print('Original Text: ', text)

    print('Converted Text: ', converted_text)

    print('-'*20, '\n')

Output of multiple text conversion


Number:  ['113', '1', '77']

Original Text:  నూట పదమూడు మామిడి పండ్లలో ఒక వ్యక్తి డెబ్బై ఏడు మామిడి పండ్లను కొన్నాడు.

Converted Text:  113 మామిడి పండ్లలో 1 వ్యక్తి 77 మామిడి పండ్లను కొన్నాడు.

--------------------

Number:  ['1055', '1', '990']

Original Text:  వెయ్యి యాభై ఐదు రూపాయలలో ఒక వ్యక్తి తొమ్మిది వందల తొంభై రూపాయలు మాత్రమే ఖర్చు చేశాడు.

Converted Text:  1055 రూపాయలలో 1 వ్యక్తి 990 రూపాయలు మాత్రమే ఖర్చు చేశాడు.

--------------------

Metadata

Release files for telugu-words-numbers 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for telugu-words-numbers 0.0.8
File Size Uploaded
telugu_words_numbers-0.0.8.tar.gz 8.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for telugu-words-numbers 0.0.8
File Interpreter ABI Platform
telugu_words_numbers-0.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 15.7 kB

Release files / telugu_words_numbers-0.0.8.tar.gz

Download URL telugu_words_numbers-0.0.8.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
851aa85b2663213c6618ee6be9cb6f3380fa7a2073e6b9100b4d42287c5a0702
BLAKE2b-256 checksum
How to use checksums
94bcd010e2dacd2ac1e7347a1e20e203ab601835223463f53ca85cdf73597ef7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.10.2

Release files / telugu_words_numbers-0.0.8-py3-none-any.whl

Download URL telugu_words_numbers-0.0.8-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c668278d9ad1ff29d277005dd26ddf304531e6c74e226560b3f79678742a64cf
BLAKE2b-256 checksum
How to use checksums
475b55ec0aa2fc2e8653eeb9b5edbfd76f78c6fdee91910aeba0b3034ee4513f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.10.2

Release history Release notifications | RSS feed

This release

0.0.8 This release

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page