Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Romanize(A+B) != Romanize(A) + Romanize(B) #26

Open
the-over-ape opened this issue Aug 1, 2024 · 0 comments
Open

Romanize(A+B) != Romanize(A) + Romanize(B) #26

the-over-ape opened this issue Aug 1, 2024 · 0 comments

Comments

@the-over-ape
Copy link

This script:

from pythainlp.transliterate import romanize

A = "สวัสดี ครับ"
B = "คุณ ชื่อ อะไร ครับ"
A_B = "สวัสดี ครับ คุณ ชื่อ อะไร ครับ"
print(romanize(A, engine="thai2rom"))
print(romanize(B, engine="thai2rom"))
print(romanize(A_B, engine="thai2rom"))
for z in A_B.split(' '):
    roman = romanize(z, engine="thai2rom")
    print(roman, ' ', end="")

Prints out:

sawatdi khrap
khun chue arai khrap
sawatdi khrap khun chuen chuen chuen chuen chuen chuen chuen chuen chuen chuen chuen chuen chuen chu
sawatdi  khrap  khun  chue  arai  khrap 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant