Complete Telugu Translation & Transliteration Package with Built-in Typing Tool
Project description
Telugu Translation & Transliteration Package v1.0.0
Complete Telugu language support package combining translation, transliteration, and an interactive typing tool.
Features
Translation (Online - requires internet)
- English ↔ Telugu: Full bidirectional translation using Google Translate
- Automatic Fallback: Uses deep-translator as backup if primary service fails
- Multi-language Support: Translate from/to any language supported by Google Translate
Transliteration (Offline - no internet required)
- Roman ↔ Telugu Script: Convert between Roman text and Telugu script
- Phonetic Conversion: Convert English phonetic spelling to Telugu script
- Fully Offline: Works without internet connection
Built-in Typing Tool (NEW!)
- Interactive Typing: Type in Roman script, press SPACE to auto-convert to Telugu
- GUI Application: Full-featured typing tool with real-time conversion
- Command-line Access: Launch with simple commands
- Space-triggered Conversion: Automatic transliteration when you press spacebar
Installation
pip install -r requirements.txt
Or install directly:
pip install googletrans==4.0.0rc1 deep-translator indic-transliteration
Quick Start
from my_telugu_lib import (
en2te, te2en, # Translation
roman_to_telugu, telugu_to_roman # Transliteration
)
# Translation (needs internet)
print(en2te("Hello")) # Output: హలో
print(te2en("నమస్కారం")) # Output: Hello
# Transliteration (offline)
print(roman_to_telugu("ramu")) # Output: రాము
print(telugu_to_roman("పుస్తకం")) # Output: pusthakam
API Reference
Translation Functions
en2te(text)
Translate English to Telugu.
Parameters:
text(str): English text to translate
Returns:
- str: Telugu translation
Example:
>>> en2te("Good morning")
'శుభోదయం'
te2en(text)
Translate Telugu to English.
Parameters:
text(str): Telugu text to translate
Returns:
- str: English translation
Example:
>>> te2en("రాము")
'Ramu'
translate(text, source='auto', target='te')
Generic translation function for any language pair.
Parameters:
text(str): Text to translatesource(str): Source language code (default: 'auto')target(str): Target language code (default: 'te')
Returns:
- str: Translated text
Example:
>>> translate("Bonjour", source='fr', target='te')
'బోన్జోర్'
Transliteration Functions
roman_to_telugu(text)
Convert Romanized Telugu to Telugu script.
Parameters:
text(str): Roman text (e.g., "ramu")
Returns:
- str: Telugu script (e.g., "రాము")
Example:
>>> roman_to_telugu("ramu pusthakam")
'రాము పుస్తకం'
telugu_to_roman(text)
Convert Telugu script to Roman transliteration.
Parameters:
text(str): Telugu text (e.g., "రాము")
Returns:
- str: Roman text (e.g., "rAmu")
Example:
>>> telugu_to_roman("రాము పుస్తకం")
'rAmu pusthakam'
english_to_telugu_script(text)
Convert English phonetic spelling to Telugu script.
Parameters:
text(str): English text
Returns:
- str: Telugu script approximation
Example:
>>> english_to_telugu_script("hello")
'హెల్లొ'
Typing Tool Functions
start_typing_tool()
Launch the interactive Telugu typing tool GUI.
Usage:
from my_telugu_lib import start_typing_tool
start_typing_tool()
Command-line:
telugu-typing
convert_on_space(text)
Convert Roman text to Telugu (used internally by typing tool).
Parameters:
text(str): Roman text to convert
Returns:
- str: Telugu script
Example:
>>> convert_on_space("ramu")
'రాము'
interactive_typing()
Start interactive typing mode in the console.
Usage:
from my_telugu_lib import interactive_typing
interactive_typing()
Command-line:
telugu-interactive
Typing Tool Quick Start
Type in Roman script and press SPACE to automatically convert to Telugu:
# In your Python script
from my_telugu_lib import start_typing_tool
start_typing_tool()
# Or from command line
# telugu-typing
Type: ramu → Press SPACE → Output: రాము
Running the Demo
python demo.py
Dependencies
googletrans==4.0.0rc1- Google Translate API wrapperdeep-translator- Alternative translation serviceindic-transliteration- Indian language script conversion
License
MIT License
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
For issues and questions, please open an issue on the GitHub repository.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file my_telugu_lib-1.0.0.tar.gz.
File metadata
- Download URL: my_telugu_lib-1.0.0.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a40b362a7ffcb355071fd94dc74e6a2b2c71c36fceb3fd090806b3c9524c7277
|
|
| MD5 |
ad5cf53243486ee98615c809911664a9
|
|
| BLAKE2b-256 |
8bfba13a6f28b25ea08074778a415ce74ce45f52a3297493d49669656452eee4
|
File details
Details for the file my_telugu_lib-1.0.0-py3-none-any.whl.
File metadata
- Download URL: my_telugu_lib-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da7af02379525fec0e5c3a5044b9e8b82c9fcf1a196a0bc5dc425991273a6d36
|
|
| MD5 |
d1fa33094ba9de51951dd4bcfed77da8
|
|
| BLAKE2b-256 |
c7abb0ae1ca3af5caadb71eda744d61bca4b6b75484c1210b72d109d3be83bf7
|