A high-performance, linguistically accurate Roman-to-Bengali transliteration engine built with Rust.
- ⚡ High Performance: Built in Rust for speed and efficiency
- 🔍 Linguistic Accuracy: Based on phonological principles rather than exhaustive mappings
- 🧩 Algorithm-Driven: Handles Bengali writing complexities algorithmically
- 💻 Cross-Platform: Works on desktop, web, and can be integrated into other systems
- 🌐 WASM Support: Compiles to WebAssembly for web usage
- ✓ Consonants and vowels
- ✓ Conjuncts (juktakkhor)
- ✓ Reph (র্)
- ✓ Hasanta/Hosonto (্)
- ✓ Vowel diacritics (kar)
- ✓ Ya-phala (্য), Ra-phala (্র), etc.
- ✓ Special symbols (Chandrabindu, Visarga, etc.)
- ✓ Bengali numerals and punctuation
- Clone the repository:
git clone https://github.com/yourusername/obadh_engine.git
cd obadh_engine
- Build the library:
cargo build --release
- Run tests:
cargo test
- Build WebAssembly module (for web usage):
wasm-pack build --target web --out-dir www/pkg
- Run the web interface:
cd www
python -m http.server # Or any local server
Then visit http://localhost:8000
in your browser.
use obadh_engine::ObadhEngine;
fn main() {
// Create a new engine instance
let engine = ObadhEngine::new();
// Transliterate text
let bengali = engine.transliterate("amar sonar bangla");
println!("{}", bengali); // Output: আমার সোনার বাংলা
}
// Import the WebAssembly module
const wasm = await import('./pkg/obadh_engine.js');
await wasm.default();
// Create an instance of the WasmEngine
const engine = new wasm.WasmEngine();
// Transliterate text
const result = engine.transliterate("ami bangla likhte pari");
console.log(result); // Output: আমি বাংলা লিখতে পারি
Unlike traditional transliteration engines that use extensive lookup tables, Obadh Engine uses a phonological approach:
- Tokenization: Input text is broken into meaningful linguistic units
- Phoneme Analysis: Tokens are converted to Bengali phonemes
- Syllable Formation: Phonemes are organized into syllables following Bengali rules
- Orthographic Rendering: Syllables are rendered with proper conjuncts, pholas, etc.
This approach is more memory-efficient and linguistically accurate than exhaustive mappings.
obadh_engine/
├── src/ # Source code
│ ├── engine/ # Core engine components
│ ├── linguistic/ # Linguistic models
│ └── wasm/ # WebAssembly bindings
├── tests/ # Test suite
└── www/ # Web interface
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.