All Projects → sadlil → go-avro-phonetic

sadlil / go-avro-phonetic

Licence: MIT license
Golang implementation of Avro Phonetic

Programming Languages

go
31211 projects - #10 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to go-avro-phonetic

bangla-tts
Bangla text to speech, Multilingual (Bangla, English) real-time ([almost] in a GPU) speech synthesis library
Stars: ✭ 61 (+90.63%)
Mutual labels:  bangla
number-to-bengali-word
An amazing package to convert your number to bengali word representation.
Stars: ✭ 22 (-31.25%)
Mutual labels:  bangla
docs
লারাভেল বাংলা ডকুমেন্টেশন
Stars: ✭ 32 (+0%)
Mutual labels:  bangla
BangalASR
Transformer based Bangla Speech Recognition
Stars: ✭ 20 (-37.5%)
Mutual labels:  bangla
bangla-bert
Bangla-Bert is a pretrained bert model for Bengali language
Stars: ✭ 41 (+28.13%)
Mutual labels:  bangla

go-avro-phonetic

Go port of the popular Bengali phonetic-typing software Avro Phonetic. website

Overview

go-avro-phonetic provides a go package which includes a text parser that converts Bangla written in Roman script to its phonetic equivalent in Bangla. It implements the Avro Phonetic Dictionary Search Library by Mehdi Hasan Khan.

In addition this library provides a cli to parse text file or text via console.

Inspirations

This package is inspired from Rifat Nabi's jsAvroPhonetic. So far, the code is a go port of jsAvroPhonetic.

And acknowledges Kaustav Das Modak for pyAvroPhonetic.

Installation

$ go get -u -v github.com/sadlil/go-avro-phonetic/...

Usage

Import the library as

import (
    avro "github.com/sadlil/go-avro-phonetic"
)

With Built in Rules:

// Parse() tries to parse the given string
// In case of failure it returns an erros
text, err := avro.Parse("ami banglay gan gai")
if err != nil {
    // Handle error
}

fmt.Println(test) // আমি বাংলায় গান গাই


// MustParse() tries to parse the given string
// In case of failure it panics
text := avro.MustParse("ami banglay gan gai")
fmt.Println(text) // আমি বাংলায় গান গাই

With Custom Rules: avro.ParseWith() receives an plugable Dictionary interface{} to support custom parsing.

data.LoadJSON() provides support for overloading custom dictionary from JSON, which can be used for custom parsing.

customDictonary := []byte("custom dictonary json")

dict, err := data.LoadJSON(customDictonary)
if err == nil {
    text := avro.ParseWith(dict, "ami banglay gan gai")
    fmt.Println(text) // custom parsed text
}

CLI

Avro command line interface to parse data using command line.

Install

$ go get -u -v github.com/sadlil/go-avro-phonetic/avrocli
$ go install github.com/sadlil/go-avro-phonetic/avrocli

Usages

Parse a test:

$ avrocli parse ami banglay gan gai
আমি বাংলায় গান গাই  # this could need font support for cli.

Parse a file:

$ avrocli parse -f my_bangla.txt # this will create a my_bangla.bn.txt file
                                 # in the same directory as the given file
                                 # with parsed bangla texts.

Acknowledgements

  • Mehdi Hasan Khan for originally developing and maintaining Avro Phonetic,
  • Rifat Nabi for porting it to Javascript,
  • Sarim Khan for writing ibus-avro.

License

Licensed under MIT Licence.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].