[][src]Crate rupantor

Rupantor is a very flexible Bengali phonetic parser written in Rust.

rupantor converts text into Bengali text by obeying the rules given in a grammar. A grammar is actually a Json formated data.

Avro Phonetic is a very popular phonetic based transliteration method for writing Bengali. rupantor supports Avro Phonetic writing method out of the box. User can use Avro Phonetic by using the AvroPhonetic.

Example: Using Avro Phonetic to convert text into Bengali

use rupantor::avro::AvroPhonetic;
let avro = AvroPhonetic::new();
let bengali = avro.convert("ami banglay gan gai");
assert_eq!(bengali, "আমি বাংলায় গান গাই");

rupantor is very flexible as the conversion is driven by a grammar file. Actually the AvroPhonetic struct uses PhoneticParser struct and a Avro Phonetic grammar file internally to do the conversion.

The phonetic conversion algorithm was actually implemented by Rifat Nabi in JavaScript and ObjectiveC. This crate is the Rust port of that phonetic conversion algorithm.