indic-transliteration / indic_transliteration_py

Python package for indic script transliteration
MIT License
163 stars 33 forks source link

Phonetic Alphabets in Sancript #81

Open RobinManoli opened 1 week ago

RobinManoli commented 1 week ago

Namaskar! Since there are multiple scripts and romanizations, how about the possibility to convert to phonetic alphabets as well?

For example if you have a romanization IAST and want to convert to IPA, wouldn't it be nice if it's possible? It is documented here https://en.wikipedia.org/wiki/International_Alphabet_of_Sanskrit_Transliteration and here https://en.wikipedia.org/wiki/Help:IPA/Sanskrit

vvasuki commented 1 week ago

You're welcome to contribute a map to https://github.com/indic-transliteration/common_maps/tree/master/roman .

shreevatsa commented 1 week ago

In case it helps: There's "transliteration to IPA" in my little tool I wrote one afternoon in 2010: https://shreevatsa.appspot.com/sanskrit/transliterate.html — you can view-source to get the IPA map. It doesn't do anusvāra and visarga :)

'ipa':           ['ɐ', 'ɑː', 'i', 'iː', 'u', 'uː',
                  'ɻ', 'ɻː', 'ɭ', 'ɭː',
                  'eː', 'əi', 'oː', 'əu',

                  '[anusvara]', '[visarga]', '[elided a]', '', '',
              '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',

                  'k', 'kʰ', 'g', 'gʱ', 'ŋ',
                  //'c͡ç', 'c͡çʰ', 'ɟ͡ʝ', 'ɟ͡ʝʱ', 'ɲ',
                  'c', 'cʰ', 'ɟ', 'ɟʱ', 'ɲ',
                  'ʈ', 'ʈʰ', 'ɖ', 'ɖʱ', 'ɳ',
                  't̪', 't̪ʰ', 'd̪', 'd̪ʱ', 'n̪',
                  'p', 'pʰ', 'b', 'bʱ', 'm',

                  'j', 'r', 'l', 'ʋ',
                  'ɕ', 'ʂ', 's̪', 'ɦ']