Skip to main content

🇧🇩 Banglish-to-Bangla: Phonetic Smart Converter

License: MIT Python 3.12+ Tests

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.csv covering 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 & Quick Start

1. Clone the Repository

git clone https://github.com/skhalidmahmud/ShobdoSearch.git
cd ShobdoSearch

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 /stats
    
    Returns 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.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shobdosearch 2.0.0
File Size Uploaded
shobdosearch-2.0.0.tar.gz 2.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for shobdosearch 2.0.0
File Interpreter ABI Platform
shobdosearch-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.4 MB

Release files / shobdosearch-2.0.0.tar.gz

Download URL shobdosearch-2.0.0.tar.gz
Size 2.4 MB
Tags Source
SHA-256 checksum
How to use checksums
8d9307d80cc91e8c462362b6c8a3611f5c66862dcd9f574496217eb5b13530bb
BLAKE2b-256 checksum
How to use checksums
a98a2ec1277b8b56b978c15034d0e5bb6881d2c0b9ea008e202d2bbb577c4872
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.0-py3-none-any.whl

Download URL shobdosearch-2.0.0-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
baf3e33102ba93823b72a5c08d78edbce748ea0e0f9ab8b83a94b83f84b7926a
BLAKE2b-256 checksum
How to use checksums
1b879a99702838da67ee5f13388de08628ea196d584028f06f3d0793ae265606
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release history Release notifications | RSS feed

2.0.2

2 release files

2.0.1

2 release files

This release

2.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page