🇧🇩 Banglish-to-Bangla: Phonetic Smart Converter
An intelligent, rule-based, and dictionary-validated NLP engine designed to convert Romanized Bengali (Banglish) into authentic Bangla Unicode script. Features dynamic vowel-expansion for informal texting/chat shorthand, weighted multi-dictionary validation across 464,000+ words, and an alphabetically sorted curated base dictionary of 2,770+ words covering 80%+ of daily conversational Bengali.
🚀 Key Features
- Dynamic Vowel-Expansion & Shorthand Recovery: Seamlessly transliterates informal chat shorthand (e.g.,
tmi→ তুমি,vlo→ ভালো,kmn→ কেমন,amr→ আমার,bndhu→ বন্ধু,rsta→ রাস্তা). - Curated 2,770+ Baseline Dictionary: Pre-indexed and alphabetically sorted mapping in
data/ben2bn.csvcovering top 80%+ everyday Bengali vocabulary. - Weighted Multi-Tier Dictionary: Validates candidates against 464,411 words across 4 frequency tiers for maximum accuracy.
- Modern Glassmorphic Web UI: Responsive web app with live transliteration, history, voice typing, and clipboard utilities.
- FastAPI Backend: Clean RESTful endpoints (
/convert,/stats) for integration into web, mobile, and desktop applications. - In-Memory Cache: High-speed session caching (
b2b_cache) without disk pollution. - PWA & Offline Ready: Service Worker and Web Manifest support for mobile/desktop installability.
💻 Installation & Usage
1. Install via pip (Recommended)
pip install shobdosearch
Python Usage:
from converter import BanglishConverter
conv = BanglishConverter()
print(conv.convert_sentence("tmi kmn aso? amr vlo lagse."))
# আউটপুট: তুমি কেমন আছো? আমার ভালো লাগছে.
2. Clone the Repository
git clone https://github.com/skhalidmahmud/ShobdoSearch.git
cd ShobdoSearch
2. Start the Web App (Recommended)
This installs required dependencies and launches the local dev server:
python run.py
Open your browser at http://localhost:8080.
3. Using Docker
docker build -t banglish-converter .
docker run -p 8080:8080 banglish-converter
4. Interactive CLI Mode
python converter.py
🧪 Testing & Verification
Run the built-in test suite to verify phonetic accuracy, edge cases, and chat shorthand recovery:
python verify.py
Output:
===========================================
SHOBDOSEARCH CONVERSION TESTS
===========================================
[PASS] ka -> কা
[PASS] kha -> খা
[PASS] eta -> এটা
[PASS] kemon -> কেমন
[PASS] ami -> আমি
[PASS] tumi -> তুমি
[PASS] valo -> ভালো
[PASS] shundor -> সুন্দর
[PASS] manush -> মানুষ
[PASS] ghor -> ঘর
...
-------------------------------------------
Total: 41 | Passed: 41 | Failed: 0
ALL TESTS PASSED SUCCESSFULLY!
🛠️ API Reference
- Interactive Documentation:
http://localhost:8080/docs - Transliterate Endpoint:
POST /convert Content-Type: application/json { "text": "tmi kmn aso? amr khub vlo lagse." }
Response:{ "original": "tmi kmn aso? amr khub vlo lagse.", "converted": "তুমি কেমন আছো? আমার খুব ভালো লাগছে." }
- Stats Endpoint:
GET /statsReturns dictionary size, active rules, and baseline mappings count.
📄 License
Distributed under the MIT License. See LICENSE for details.
Metadata
Release files for shobdosearch 2.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| shobdosearch-2.0.2.tar.gz | 2.4 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| shobdosearch-2.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.4 MB
Release files / shobdosearch-2.0.2.tar.gz
| Download URL | shobdosearch-2.0.2.tar.gz |
|---|---|
| Size | 2.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e40c62f838b70a14be86781da1c8b5961ef9a53b5a0ff561f5609ecc6285550
|
|
BLAKE2b-256 checksum How to use checksums |
6c13122b1fed36286f2f989ba038599d95d9b3c2d4299b5b3ae98e6f2176ac18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / shobdosearch-2.0.2-py3-none-any.whl
| Download URL | shobdosearch-2.0.2-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
310960c9c1fc5d87540f2128a09c1d9b0eca2245f7c39fc667e9bcaa70e731c1
|
|
BLAKE2b-256 checksum How to use checksums |
c3716cf0a8794065a7e661461c2acc14e5046a3d8e1c980170e25044170c5cbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|