Sinhala Tools for converting Sinhala text to Roman and vice versa.
Project description
Sinhala Tools
A Python package to help with various Sinhala language processing tasks.
Features
-
Convert Sinhala text to Roman characters (Singlish) and vice versa.
-
Translate text and files between Sinhala and other languages using Google Translate.
-
Use Google Input Tools to convert text to Sinhala.
-
Find possible Sinhala matches for Singlish input.
Installation
Install the package via pip:
pip install SinhalaTools
Usage
Convert Sinhala to Roman
from SinhalaTools import sinhala_to_roman
sinhala_text = "සිංහල"
result = sinhala_to_roman(sinhala_text )
print(result)
Convert Roman to Sinhala
from SinhalaTools import roman_to_sinhala
roman_text = "siṃhala"
sinhala_text = roman_to_sinhala(roman_text)
print(sinhala_text)
Convert Using Google Input Tools
from SinhalaTools import inputTools
text = "sinhala"
result = inputTools(text)
print(result)
Finding Possible Matches
from SinhalaTools import possible_matches
input_str = "sinhala"
matches = possible_matches(input_str)
print(matches)
Translate a Text String
from SinhalaTools import translate
text = "Hello, how are you?"
translated_text = translate(text, source_language='en', target_language='si')
print(translated_text)
Translate a File
from SinhalaTools import translate_file
file = "sample.txt"
translated_text = translate_file(file, source_language='en', target_language='si')
print(translated_text)
Contact
For any inquiries or issues, please contact tharindu.20@cse.mrt.ac.lk.
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
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 SinhalaTools-0.0.7.tar.gz.
File metadata
- Download URL: SinhalaTools-0.0.7.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
565627f723d7763589aa868ee3d106acecf3856aff01720f2bedd7cb0aaecc34
|
|
| MD5 |
dcbd7ec40c71ba26d819fae68c593df6
|
|
| BLAKE2b-256 |
5685b5946659011a67034b866d62c7be3001b26737810a5cb4c259cc16939293
|
File details
Details for the file SinhalaTools-0.0.7-py3-none-any.whl.
File metadata
- Download URL: SinhalaTools-0.0.7-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f0ea19497d028c3cc7cd7da477df80bba7fe73b368439d398fbe04fb01d2972
|
|
| MD5 |
614f6c94fea5617a6417f6314076d0c5
|
|
| BLAKE2b-256 |
f232e95ab0213cb7947eef17b41ed7b8660f82956002cb36dd81d3d00c67f8b3
|