ผู้ใช้:Octahedron80/กระบะทราย4

จาก วิกิพจนานุกรม พจนานุกรมเสรี
ไปยังการนำทาง ไปยังการค้นหา
([bpmdtnlzcrsgknh]*)([aeêiou]+)([mnhbg]*)

local tie = mw.ustring.char(0x035C)

local initials = {
	[''] = {'อ', 'อ้', 'อ๋', 'อ่', 'อ๊', 'อ๊', 'อ่', 'อ๊'},
	['b'] = {'ป', 'ป้', 'ป๋', 'ป่', 'ป๊', 'ป๊', 'ป่', 'ป๊'},
	['p'] = {'พ', 'พ่', 'ผ', 'ผ่', 'พ้', 'พ้', 'ผ่', 'พ้'},
	['bh'] = {'บ', 'บ้', 'บ๋', 'บ่', 'บ๊', 'บ๊', 'บ่', 'บ๊'},
	['m'] = {'ม', 'ม่', 'หฺม', 'หฺม่', 'ม้', 'ม้', 'หฺม่', 'ม้'},
	['d'] = {'ต', 'ต้', 'ต๋', 'ต่', 'ต๊', 'ต๊', 'ต่', 'ต๊'},
	['t'] = {'ท', 'ท่', 'ถ', 'ถ่', 'ท้', 'ท้', 'ถ่', 'ท้'},
	['n'] = {'น', 'น่', 'หฺน', 'หฺน่', 'น้', 'น้', 'หฺน่', 'น้'},
	['l'] = {'ล', 'ล่', 'หฺล', 'หฺล่', 'ล้', 'ล้', 'หฺล่', 'ล้'},
	['z'] = {'จ', 'จ้', 'จ๋', 'จ่', 'จ๊', 'จ๊', 'จ่', 'จ๊'},
	['c'] = {'ช', 'ช่', 'ฉ', 'ฉ่', 'ช้', 'ช้', 'ฉ่', 'ช้'},
	['r'] = {'ดฺซ', 'ดฺซ่', 'ดฺส', 'ดฺส่', 'ดฺซ้', 'ดฺซ้', 'ดฺส่', 'ดฺซ้'},
	['s'] = {'ซ', 'ซ่', 'ส', 'ส่', 'ซ้', 'ซ้', 'ส่', 'ซ้'},
	['g'] = {'ก', 'ก้', 'ก๋', 'ก่', 'ก๊', 'ก๊', 'ก่', 'ก๊'},
	['k'] = {'ค', 'ค่', 'ข', 'ข่', 'ค้', 'ค้', 'ข่', 'ค้'},
	['gh'] = {'งฺก', 'งฺก้', 'งฺก๋', 'งฺก่', 'งฺก๊', 'งฺก๊', 'งฺก่', 'งฺก๊'},
	['ng'] = {'ง', 'ง่', 'หฺง', 'หฺง่', 'ง้', 'ง้', 'หฺง่', 'ง้'},
	['h'] = {'ฮ', 'ฮ่', 'ห', 'ห่', 'ฮ้', 'ฮ้', 'ห่', 'ฮ้'},
}

local vowels = {
	['a'] = {'า', 'ั'}, ['o'] = {'^โ', '^โ็'}, ['ê'] = {'^เ', '^เ็'}, ['e'] = {'ือ', 'ึ'},
	['ai'] = {'^ไ', '^ไ'}, ['oi'] = {'^โ็ย', '^โ็ย'}, ['ao'] = {'^เา', '^เา'}, ['ou'] = {'^โ็ว', ^โ็ว'},
	['i'] = {'ี', 'ิ'}, ['ia'] = {'^เีย', '^เีย'}, ['io'] = {'ิ'..tie..'โย', 'ิ'..tie..'โย็'},
	['iou'] = {'ิ'..tie..'โย็ว', 'ิ'..tie..'โย็ว'}, ['iu'] = {'ิว', 'ิว'},
	['u'] = {'ู', 'ุ'}, ['ua'] = {'ัว', 'ว'}, ['uê'] = {'ุ'..tie..'เว', 'ุ'..tie..'เว็'},
	['uai'] = {'วย', 'วย'}, ['ui'] = {'ุย', 'ุย'},
}

local finals = {
	[''] = '', ['n'] = 'น์', ['m'] = 'ม', ['ng'] = 'ง', ['h'] = 'อ์', ['b'] = 'บ', ['g'] = 'ก',
}