A package for converting Bengali text to Avro and vice versa.
Project description
AvroConverter
A Python package for bidirectional conversion between Bengali (Bangla) text and Avro phonetic typing.
Overview
AvroConverter provides a robust solution for converting between Bengali Unicode text and Avro phonetic transliteration. It enables seamless transformation of Bengali text to its phonetic representation and vice versa.
Features
- Bengali to Avro Conversion: Convert Bengali Unicode text to Avro phonetic representation
- Avro to Bengali Conversion: Convert Avro phonetic text to Bengali Unicode
Installation
pip install MapAvro
Usage
Basic Usage
from MapAvro import AvroConverter
# Initialize the converter
converter = AvroConverter()
# Convert Bengali to Avro
bengali_text = "আমি বাংলায় গান গাই।"
avro_text = converter.bengali_to_avro(bengali_text)
print(avro_text) # Output: "ami banglay gan gai."
# Convert Avro to Bengali
avro_input = "ami banglay gan gai."
bengali_output = converter.avro_to_bengali(avro_input)
print(bengali_output) # Output: "আমি বাংলায় গান গাই।"
Technical Details
The conversion is based on character mapping tries that efficiently handle the transformation between Bengali and Avro representations. The package also includes text normalization capabilities to handle edge cases and ensure consistent input/output.
The core components are:
AvroConverter: Main class that handles bidirectional conversion
Requirements
- Python 3.6+
License
MIT License
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
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 mapavro-0.1.4.tar.gz.
File metadata
- Download URL: mapavro-0.1.4.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c635ad255b8d5e4da2621f4c4f8a8d8e2d71aa9d6548eb3adda02907b13cb9a
|
|
| MD5 |
4de55d6ba1314d4d35b24eab4cd0228e
|
|
| BLAKE2b-256 |
a1c35911e2c9caa5e1455655a90d193323bd063b88a7f07bb61f6ad99812d92a
|
File details
Details for the file mapavro-0.1.4-py3-none-any.whl.
File metadata
- Download URL: mapavro-0.1.4-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
997522b4a77eaf331da528ff20f728d16dfb01982195785d62efce8b049e9676
|
|
| MD5 |
1c0e1c971f32bf1fb29024fe38276611
|
|
| BLAKE2b-256 |
2c20a1a7ba0416a67c38c921f1f76d06d0ab64810f7056b846b42debb1037757
|