Tltk_ipa - tltk, output is International Phonetic Alphabet (IPA)įrom ansliterate import transliterate transliterate ( "สามารถ", engine = "icu" ) # output: 's̄āmārt̄h' transliterate ( "สามารถ", engine = "ipa" ) # output: 'saːmaːrot' transliterate ( "สามารถ", engine = "thaig2p" ) # output: 's aː ˩˩˦. Iso_11940 - Thai text into Latin characters with ISO 11940. Tltk_g2p - Thai Grapheme-to-Phoneme from TLTK., Ipa - epitran, output is International Phonetic Alphabet (IPA) Icu - pyicu, based on International Components for Unicode (ICU) Thaig2p - (default) Thai Grapheme-to-Phoneme, Text ( str) – Thai text to be transliteratedĮngine ( str) – ‘icu’, ‘ipa’, or ‘thaig2p’ (default)Ī string of phonetic alphabets indicating transliterate ( text : str, engine : str = 'thaig2p' ) → str It’s a fundamental tool for rendering Thai words and phrases in a more familiar format. The romanize function allows you to transliterate Thai text, converting it into a phonetic representation using the English alphabet. Lookup - Look up on Thai-English Transliteration dictionary v1.4 compiled by Wannaphong.įrom ansliterate import romanize romanize ( "สามารถ", engine = "royin" ) # output: 'samant' romanize ( "สามารถ", engine = "thai2rom" ) # output: 'samat' romanize ( "สามารถ", engine = "tltk" ) # output: 'samat' romanize ( "ภาพยนตร์", engine = "royin" ) # output: 'phapn' romanize ( "ภาพยนตร์", engine = "thai2rom" ) # output: 'phapphayon' romanize ( "ภาพยนตร์", engine = "thai2rom_onnx" ) # output: 'phapphayon' romanize ( "ก็อปปี้", engine = "lookup" ) # output: 'copy' Thai2rom_onnx - a deep learning-based Thai romanization engine with ONNX runtime Thai2rom - a deep learning-based Thai romanization engine Transcription issued by Royal Institute of Thailand. Royin - (default) based on the Royal Thai General System of Default to ‘royin’.Ī string of Thai words rendered in the Latin alphabet. See more in options for engine section.įallback_engine ( str) – If engine equals ‘lookup’, use fallback_engine for words that are not in the transliteration dict. RTGS is the official system publishedīy the Royal Institute of Thailand. Using the Royal Thai General System of Transcription (RTGS) This function renders Thai words in the Latin alphabet or “romanization”, romanize ( text : str, engine : str = 'royin', fallback_engine : str = 'royin' ) → str This functionality is invaluable for making Thai text more accessible to non-Thai speakers and for various language processing tasks. The ansliterate module is dedicated to the transliteration of Thai text into romanized form, effectively spelling it out with the English alphabet.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |