The Assamese to English Transliterator is a web-based or CLI-based application that allows users to convert Assamese script into its phonetic English representation. This tool is useful for language learners, researchers, and individuals who want to transliterate Assamese words or sentences into the Roman alphabet.
- Supports real-time transliteration of Assamese text into English.
- Preserves phonetic accuracy to maintain readability.
- Simple and user-friendly interface.
- Can be integrated into larger NLP applications.
- Works with Unicode Assamese script.
Ensure you have the following dependencies installed:
- Python 3.x
- Flask (for web app) or argparse (for CLI usage)
- Google Gemini API key
- Clone the repository:
git clone https://github.com/yourusername/Eng2Asm.git cd Eng2Asm - Install dependencies:
pip install -r requirements.txt
- Set up your Gemini API key:
export GEMINI_API_KEY="your_api_key_here"
- Run the application:
- For CLI usage:
python app.py "অগ্নি" # Example Assamese text
- For Web App:
Then, open
python app.py
http://127.0.0.1:5000in your browser.
- For CLI usage:
Run the script with an Assamese input string:
python app.py "অগ্নি"Output:
"agni"
- Open the web interface.
- Enter Assamese text in the input box.
- Click the "Transliterate" button.
- View the transliterated output in English.
- POST
/transliterate
Request:Response:{ "text": "অগ্নি" }{ "transliteration": "agni" }
The transliteration process is powered by the Google Gemini API. The application sends a request to the Gemini API, which processes the Assamese text and returns its phonetic English representation.
import requests
import os
def transliterate(text):
api_key = os.getenv("GEMINI_API_KEY")
url = "https://api.gemini.com/v1/transliterate"
headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"}
data = {"text": text}
response = requests.post(url, json=data, headers=headers)
return response.json()["transliteration"]
print(transliterate("অগ্নি"))- Fork the repository.
- Create a feature branch:
git checkout -b feature-xyz - Commit your changes:
git commit -m "Add feature xyz" - Push to the branch:
git push origin feature-xyz - Open a pull request.
This project is licensed under the MIT License.
Special thanks to open-source transliteration libraries and contributors who made this project possible.