Source code for pythainlp.transliterate.ipa

# -*- coding: utf-8 -*-
"""
Transliterating text to International Phonetic Alphabet (IPA)
Using epitran

:See Also:
    * `GitHub \
        <https://github.com/dmort27/epitran>`_
"""
from typing import List

import epitran

_EPI_THA = epitran.Epitran("tha-Thai")


[docs]def transliterate(text: str) -> str: return _EPI_THA.transliterate(text)
[docs]def trans_list(text: str) -> List[str]: return _EPI_THA.trans_list(text)
[docs]def xsampa_list(text: str) -> List[str]: return _EPI_THA.xsampa_list(text)