pythainlp.ancient
Modules
- pythainlp.ancient.aksonhan_to_current(word: str) str[source]
Convert AksonHan words to current Thai words
AksonHan (อักษรหัน) writes two consonants to spell the short /a/ vowel (สระ อะ).
Today, รร is an aksonhan pattern still used in Thai.
- Parameters:
word (str) – Thai word
- Returns:
Thai AksonHan to be converted to current Thai word
- Return type:
- Example:
>>> from pythainlp.ancient import aksonhan_to_current >>> print(aksonhan_to_current("จกก")) จัก >>> print(aksonhan_to_current("บงงคบบ")) บังคับ >>> print(aksonhan_to_current("สรรเพชญ")) # รร is still used. สรรเพชญ
- pythainlp.ancient.convert_currency(value: float, from_unit: str) dict[str, float][source]
Convert ancient Thai currency to other units
เบี้ย (Bia)
อัฐ (At)
ไพ (Pi)
เฟื้อง (Feuang)
สลึง (Saleung)
บาท (Bath)
ตำลึง (Tamleung)
ชั่ง (Chang)
- See more:
- Parameters:
- Returns:
Thai currency
- Return type:
- Example:
>>> from pythainlp.ancient import convert_currency >>> print(convert_currency(8, "บาท")) {'เบี้ย': 51200.0, 'อัฐ': 512.0, 'ไพ': 256.0, 'เฟื้อง': 64.0, 'สลึง': 32.0, 'บาท': 8.0, 'ตำลึง': 2.0, 'ชั่ง': 0.1}