Skip to content

A high-performance, linguistically accurate Roman-to-Bengali transliteration engine built with Rust.

Notifications You must be signed in to change notification settings

Y3454R/obadh_engine

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Obadh Engine (অবাধ ইঞ্জিন)

A high-performance, linguistically accurate Roman-to-Bengali transliteration engine built with Rust.

Features

  • 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

Bengali Writing Features Supported

  • ✓ 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

Quick Start

Prerequisites

Building the Project

  1. Clone the repository:
git clone https://github.com/yourusername/obadh_engine.git
cd obadh_engine
  1. Build the library:
cargo build --release
  1. Run tests:
cargo test
  1. Build WebAssembly module (for web usage):
wasm-pack build --target web --out-dir www/pkg
  1. Run the web interface:
cd www
python -m http.server  # Or any local server

Then visit http://localhost:8000 in your browser.

Usage Examples

As a Rust Library

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: আমার সোনার বাংলা
}

On the Web

// 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: আমি বাংলা লিখতে পারি

How It Works

Unlike traditional transliteration engines that use extensive lookup tables, Obadh Engine uses a phonological approach:

  1. Tokenization: Input text is broken into meaningful linguistic units
  2. Phoneme Analysis: Tokens are converted to Bengali phonemes
  3. Syllable Formation: Phonemes are organized into syllables following Bengali rules
  4. Orthographic Rendering: Syllables are rendered with proper conjuncts, pholas, etc.

This approach is more memory-efficient and linguistically accurate than exhaustive mappings.

Project Structure

obadh_engine/
├── src/               # Source code
│   ├── engine/        # Core engine components
│   ├── linguistic/    # Linguistic models
│   └── wasm/          # WebAssembly bindings
├── tests/             # Test suite
└── www/               # Web interface

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A high-performance, linguistically accurate Roman-to-Bengali transliteration engine built with Rust.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Makefile 83.5%
  • Rust 12.8%
  • JavaScript 1.3%
  • HTML 1.1%
  • Other 1.3%