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

การ romanization ใช้กับชื่อผมไม่ได้ #11

Closed
wasdee opened this issue Jan 8, 2017 · 6 comments

Comments

@wasdee
Copy link
Contributor

wasdee commented Jan 8, 2017

from pythainlp.romanization import romanization

b=romanization("ณัฐชนน")
print(b) #ṇạṭ̄h chnn 

b=romanization("นัด") + romanization("ชะ") + romanization("โนน") #ใช้สระโอะ ไม่ได้ ToT
print(b) #nạdchanon ดีขึ้นถ้าแยกทีละพยางค์

b="natchanon" #ที่ถูกคือ
print(b)

เป็นไปได้ไหมที่เราจะนำ http://pioneer.chula.ac.th/~awirote/resources/thai-romanization.html port มา

@wasdee wasdee changed the title การ romanization ใช้กับชื่อผมไม่ได้ # การ romanization ใช้กับชื่อผมไม่ได้ Jan 8, 2017
@wannaphong
Copy link
Member

wannaphong commented Jan 9, 2017

การ romanization ของ http://pioneer.chula.ac.th/~awirote/resources/thai-romanization.html ทำตามหลักเกณฑ์การถอดเสียงภาษาไทยเป็นอักษรโรมัน - http://www.arts.chula.ac.th/~ling/tts/ThaiRoman.pdf ของรัฐบาลที่ประกาศใช้ครับ แต่ในส่วน PyThaiNLP ใช้คำสั่งจาก icu ที่ใช้การ romanization ตามมาตราฐาน ISO 11940-2 - https://en.wikipedia.org/wiki/ISO_11940-2 ครับ การ romanization จึงไม่เหมือนกัน

ตอนริเริ่มทำโมดูลนี้ ผมเขียนตามหลักเกณฑ์การถอดเสียงภาษาไทยเป็นอักษรโรมัน https://github.com/wannaphongcom/pythainlp/blob/531b9177919ce2da15d8bc9b5320e77ef4b06f45/pythainlp/romanization/royin.py แต่มีปัญหา คือ ไม่รองรับสระภาษาไทยครับ ผมจึงตัดสินใจลบไฟล์แล้วใช้ ISO 11940-2 แทน หากคุณ @wasdee ต้องการสามารถนำ https://github.com/wannaphongcom/pythainlp/blob/531b9177919ce2da15d8bc9b5320e77ef4b06f45/pythainlp/romanization/royin.py ไปพัฒนาต่อให้รองรับสระแล้วส่งกลับมาได้ครับ ขอบคุณครับ

@wannaphong
Copy link
Member

wannaphong commented Jan 9, 2017

@wasdee
Copy link
Contributor Author

wasdee commented Jan 10, 2017

ผมจะลองดูนะครับ

@wasdee
Copy link
Contributor Author

wasdee commented Jan 10, 2017

นอกจากคำว่า พรม แล้วมีคำที่มีปัญหาอื่นๆไหมครับ ผมยังไม่ค่อยเข้าใจที่พูดว่าไม่รองรับสระ ช่วยอธิบายเพิ่มหน่อยครับ

@wannaphong
Copy link
Member

ผมติดปัญหาตรงที่สระครับ ตัวอย่างเช่น
"สรรพ" คำนี้ใช้ รร (มีตัวสะกด) ได้เป็น sap
นี่คือปัญหาครับ จะตรวจสอบว่าเป็น รร (มีตัวสะกด) ได้อย่างไร ถ้าหากตรวจสอบไม่ได้ โปรแกรมอาจจะส่งค่ามาเป็น
sanp เป็น รร (ไม่มีตัวสะกด)
ครับ นอกจากนั้นยังมีปัญหาสระลดรูปในภาษาไทยตามที่ http://www.arts.chula.ac.th/~ling/tts/ThaiRoman.pdf กำหนดครับ

@wannaphong
Copy link
Member

@wasdee จาก d8fda84 ล่าสุด รองรับหลักเกณฑ์การถอดอักษรไทยเป็นอักษรโรมัน ฉบับราชบัณฑิตยสถานแล้วครับ
ผมลอง

from pythainlp.romanization import romanization
b=romanization("นัด",engine="royin") + romanization("ชะ",engine="royin") + romanization("โนน",engine="royin") #ใช้สระโอะ ไม่ได้ ToT
print(b) # natchanon

ในการที่จะถอดทั้งคำได้เลย ต่อไปในอนาคตจะเพิ่มระบบแปลงเป็นคำอ่านต่อไปครับ

@wasdee wasdee closed this as completed Aug 2, 2017
bact added a commit that referenced this issue Oct 31, 2018
 Remove obsoleted, unused, and experimental codes (#140)
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

2 participants