Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Java implementation of Avro Phonetic
branch: xml

This branch is even with torifat:xml

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src
.gitignore
.travis.yml
MPL-1.1.txt
README.md
pom.xml

README.md

JAvroPhonetic v1.2

A Java implementation of Avro Phonetic

Website: OmicronLab.com

Compilation

We use maven to handle our dependencies.

  • Install Maven 3
  • Check out this repo and: mvn clean install

Usage

With Built-in XML Loader & XML Rules

PhoneticParser avro = PhoneticParser.getInstance();    
avro.setLoader(new PhoneticXmlLoader());
String bangla = avro.parse("ami banglay gan gai");
System.out.println(bangla); // আমি বাংলায় গান গাই

With Built-in XML Loader & Custom XML Rules File

PhoneticParser parser = PhoneticParser.getInstance();
String customXmlRulesFile = "/path/to/the/rules.xml";
PhoneticLoader loader = new PhoneticXmlLoader(customXmlRulesFile);
parser.setLoader(loader);
String output = parser.parse("content to parse");

With Custom Loader

public class CustomLoader implements PhoneticLoader {
    …
    public Data getData() throws Exception {
        …
    }
    …
}

PhoneticParser parser = PhoneticParser.getInstance();
parser.setLoader(new CustomLoader());
String output = parser.parse("content to parse");
Something went wrong with that request. Please try again.