mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
corrections in thai numerals
This commit is contained in:
@@ -3,6 +3,8 @@ include numerals.Abs.gf ;
|
|||||||
-- Thai transliteration, produces thaiU.gf by GF/Text/Thai.hs
|
-- Thai transliteration, produces thaiU.gf by GF/Text/Thai.hs
|
||||||
-- AR 28/12/2006
|
-- AR 28/12/2006
|
||||||
|
|
||||||
|
flags coding=utf8 ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Numeral = {s : Str} ;
|
Numeral = {s : Str} ;
|
||||||
Digit = {s : DForm => Str} ;
|
Digit = {s : DForm => Str} ;
|
||||||
@@ -18,10 +20,10 @@ lin
|
|||||||
|
|
||||||
n2 = mkNum "s-Og" "y'i:E" "s-Og" ;
|
n2 = mkNum "s-Og" "y'i:E" "s-Og" ;
|
||||||
n3 = regNum "s-a:m" ;
|
n3 = regNum "s-a:m" ;
|
||||||
n4 = regNum "s-i:E" ;
|
n4 = regNum "s-i:E" ; -- E = E48 '
|
||||||
n5 = regNum "ha:E" ;
|
n5 = regNum "hTa:" ; -- T = E49 9
|
||||||
n6 = regNum "ho?k" ;
|
n6 = regNum "ho?k" ;
|
||||||
n7 = regNum "ecMd'" ;
|
n7 = regNum "ecMd'" ; -- M = E47 w
|
||||||
n8 = regNum "e:pd'" ;
|
n8 = regNum "e:pd'" ;
|
||||||
n9 = regNum "eka:" ;
|
n9 = regNum "eka:" ;
|
||||||
|
|
||||||
@@ -63,5 +65,5 @@ oper
|
|||||||
|
|
||||||
|
|
||||||
sip = table {Unit => "s'ib" ; Thousand => "hmv:En"} ;
|
sip = table {Unit => "s'ib" ; Thousand => "hmv:En"} ;
|
||||||
roy = table {Unit => "rEOy'" ; Thousand => "se:n"} ;
|
roy = table {Unit => "rTOy'" ; Thousand => "se:n"} ;
|
||||||
phan = table {Unit => [] ; Thousand => "p2an"} ;
|
phan = table {Unit => [] ; Thousand => "p2an"} ;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
include numerals.Abs.gf ;
|
include numerals.Abs.gf ;
|
||||||
|
|
||||||
-- Thai UTF8, produced from thai.gf by GF/Text/Thai.hs. AR 28/12/2006
|
-- Thai transliteration, produces thaiU.gf by GF/Text/Thai.hs
|
||||||
|
-- AR 28/12/2006
|
||||||
|
|
||||||
flags coding=utf8 ;
|
flags coding=utf8 ;
|
||||||
|
|
||||||
@@ -19,10 +20,10 @@ lin
|
|||||||
|
|
||||||
n2 = mkNum "สอง" "ยี่" "สอง" ;
|
n2 = mkNum "สอง" "ยี่" "สอง" ;
|
||||||
n3 = regNum "สาม" ;
|
n3 = regNum "สาม" ;
|
||||||
n4 = regNum "สี่" ;
|
n4 = regNum "สี่" ; -- E = E48 '
|
||||||
n5 = regNum "หา่" ;
|
n5 = regNum "ห้า" ; -- T = E49 9
|
||||||
n6 = regNum "หก" ;
|
n6 = regNum "หก" ;
|
||||||
n7 = regNum "เจ็ด" ;
|
n7 = regNum "เจ็ด" ; -- M = E47 w
|
||||||
n8 = regNum "แปด" ;
|
n8 = regNum "แปด" ;
|
||||||
n9 = regNum "เกา" ;
|
n9 = regNum "เกา" ;
|
||||||
|
|
||||||
@@ -64,5 +65,5 @@ oper
|
|||||||
|
|
||||||
|
|
||||||
sip = table {Unit => "ศิบ" ; Thousand => "หมื่น"} ;
|
sip = table {Unit => "ศิบ" ; Thousand => "หมื่น"} ;
|
||||||
roy = table {Unit => "ร่อย" ; Thousand => "ซแน"} ;
|
roy = table {Unit => "ร้อย" ; Thousand => "ซแน"} ;
|
||||||
phan = table {Unit => [] ; Thousand => "พะน"} ;
|
phan = table {Unit => [] ; Thousand => "พะน"} ;
|
||||||
|
|||||||
@@ -102,12 +102,13 @@ thaiFinalMap = Map.fromList $ zip allThaiTrans finals
|
|||||||
|
|
||||||
thaiTable :: String
|
thaiTable :: String
|
||||||
thaiTable = unlines [
|
thaiTable = unlines [
|
||||||
|
"\t" ++
|
||||||
hex c ++ "\t" ++
|
hex c ++ "\t" ++
|
||||||
encodeUTF8 (showThai s) ++ "\t" ++
|
encodeUTF8 (showThai s) ++ "\t" ++
|
||||||
s ++ "\t" ++
|
s ++ "\t" ++
|
||||||
pronThai s ++ "\t" ++
|
pronThai s ++ "\t" ++
|
||||||
[f] ++ "\t" ++
|
[f] ++ "\t" ++
|
||||||
[q]
|
[q] ++ "\t"
|
||||||
|
|
|
|
||||||
(c,q,f,s) <- zip4 allThaiCodes heights finals allThaiTrans
|
(c,q,f,s) <- zip4 allThaiCodes heights finals allThaiTrans
|
||||||
]
|
]
|
||||||
@@ -119,7 +120,7 @@ showThai s = case s of
|
|||||||
|
|
||||||
pronThai s = case s of
|
pronThai s = case s of
|
||||||
[c,p]
|
[c,p]
|
||||||
| isUpper c && isDigit p -> show p
|
| isUpper c && isDigit p -> [p]
|
||||||
| isDigit p -> c:"h"
|
| isDigit p -> c:"h"
|
||||||
| p==':' -> c:[c]
|
| p==':' -> c:[c]
|
||||||
| elem p "%&" -> c:"y"
|
| elem p "%&" -> c:"y"
|
||||||
|
|||||||
Reference in New Issue
Block a user