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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| telugu_words_numbers-0.0.8.tar.gz | 8.4 kB | Without provenance | Details for telugu_words_numbers-0.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| telugu_words_numbers-0.0.8-py3-none-any.whl | Python 3 | none | any | Details for telugu_words_numbers-0.0.8-py3-none-any.whl |
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
|
Security for telugu-words-numbers 0.0.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.