GithubHelp home page GithubHelp logo

bophono's Introduction

Tibetan Phonetics Engine

Description

The goal of this code is to provide a library to:

  • implement the conversion of a Tibetan Unicode word into IPA, according to different schemes / dialects
  • implement some conversions between IPA and phonetics readable by people with various language backgrounds (Chinese, English, etc.)

The primary focus of this library is litterary pronounciation, ideally representing how an umze would pronounce a traditional text, but contributions for other uses are welcome. We also do not handle Sanskrit transliteration (this can be done through custom exceptions lists).

Note that this library integrates no segmenter and needs to be applied on each word separately. You can use it in combination with pybo to get the phonetics of full sentences.

Phonetics methods

We currently provide two phonetics schemes:

Manual of Standard Tibetan (by Tournadre)

Colloquial Amdo Tibetan (by Kuo-ming Sung and Lha Byams Rgyal)

Outputs

Apart from raw IPA, we provide the following output possibilities:

Chinese phonetics

The Chinese is produced by a streamlined phonetic scheme in order to match the Mandarin phonology (vowels have been simplified and most of the Tibetan suffixes removed).

To produce the final output, we first transform the generated IPA into Zhuyin, and then the Zhuyin into Traditional Chinese characters, with a manually built correspondance list.

Installation

pip install bophono

API

To get the IPA for a word according to the MST scheme:

# see https://github.com/Esukhia/bophono/blob/master/bophono/PhonStateMST.py#L36 for other options
options = {
  'aspirateLowTones': True
}

mstconverter = bophono.UnicodeToApi(schema="MST", options = options)
mstipa = converter.get_api("སྐུ")
print(mstipa) # kú

Note that you must first segment your text in words and then convert each word.

Changes

See CHANGELOG.md.

License

The Python code is Copyright (C) 2018 Esukhia, provided under MIT License. See CONTRIBUTORS.md for a list of authors and contributors.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.