Telugu words to numbers conversion
Project description
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-to-number
# From IPYNB notebook
!pip install telugu-words-to-number
Inference
# In the CMD terminal, go to the home where inference.py is present and run it as below
$ python3 inference.py
# Note: Comment/uncomment as mentioned in the inference.py script
Usage
# For single text conversion
# Go to the path where telugu_word_to_number.py is present
from telugu_word_to_number import TeluguWordsToNumber as tel_word_num
# create an object instance
obj = tel_word_num()
text = "దీపిక కి అరవై పంపండి"
number, converted_text = obj.word_number_conversion(text)
print('Number: ', number)
print('Original Text: ', text)
print('Converted Text: ', converted_text)
# Output
Number: 60.0
Original Text: దీపిక కి అరవై పంపండి
Converted Text: దీపిక కి 60 పంపండి
# For multiple texts conversion loop over list of Telugu texts
# Go to the path where telugu_word_to_number.py is present
from telugu_word_to_number import TeluguWordsToNumber as tel_word_num
# create an object instance
obj = tel_word_num()
texts = [
"దీపిక కి అరవై పంపండి",
"భరత్ కి ఏడు వందలు పంపు"
]
for text in texts:
number, converted_text = obj.word_number_conversion(text)
print('Number: ', number)
print('Original Text: ', text)
print('Converted Text: ', converted_text)
print('-'*20, '\n')
# Output
Number: 60.0
Original Text: దీపిక కి అరవై పంపండి
Converted Text: దీపిక కి 60 పంపండి
--------------------
Number: 700.0
Original Text: భరత్ కి ఏడు వందలు పంపు
Converted Text: భరత్ కి 700 పంపు
Issues and Contributions
If you encounter any issues or would like to contribute to this project, please visit the GitHub repository.
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
Built Distribution
File details
Details for the file telugu_words_numbers-0.0.3.tar.gz
.
File metadata
- Download URL: telugu_words_numbers-0.0.3.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3ee5d1c537f86fe12fc9bd7686945613b64ccf5e3329706ed478b4426d96db0 |
|
MD5 | 95f75af79d3e548b54b4057616aeeae0 |
|
BLAKE2b-256 | 2d183305bfc7f78d8e42c0cf369d0bd4203481f8cc38b3b225c6cba1d634fa5e |
Provenance
File details
Details for the file telugu_words_numbers-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: telugu_words_numbers-0.0.3-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3448ffab5044d522027bc20518c7137112b3453a023d3914c7e1c27d04a757c0 |
|
MD5 | ef0de15b082aea459b73fd7614cfc32e |
|
BLAKE2b-256 | 27789bbae5ebc3a2b5013d8001475675cc6afb8808bad2841cad6c91c8557c74 |