corrections in thai numerals

This commit is contained in:
aarne
2006-12-28 14:30:25 +00:00
parent cef20174f6
commit 83c5b57615
3 changed files with 15 additions and 11 deletions

View File

@@ -3,6 +3,8 @@ include numerals.Abs.gf ;
-- Thai transliteration, produces thaiU.gf by GF/Text/Thai.hs
-- AR 28/12/2006
flags coding=utf8 ;
lincat
Numeral = {s : Str} ;
Digit = {s : DForm => Str} ;
@@ -18,10 +20,10 @@ lin
n2 = mkNum "s-Og" "y'i:E" "s-Og" ;
n3 = regNum "s-a:m" ;
n4 = regNum "s-i:E" ;
n5 = regNum "ha:E" ;
n4 = regNum "s-i:E" ; -- E = E48 '
n5 = regNum "hTa:" ; -- T = E49 9
n6 = regNum "ho?k" ;
n7 = regNum "ecMd'" ;
n7 = regNum "ecMd'" ; -- M = E47 w
n8 = regNum "e:pd'" ;
n9 = regNum "eka:" ;
@@ -63,5 +65,5 @@ oper
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"} ;

View File

@@ -1,6 +1,7 @@
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 ;
@@ -19,10 +20,10 @@ lin
n2 = mkNum "สอง" "ยี่" "สอง" ;
n3 = regNum "สาม" ;
n4 = regNum "สี่" ;
n5 = regNum "หา" ;
n4 = regNum "สี่" ; -- E = E48 '
n5 = regNum "หา" ; -- T = E49 9
n6 = regNum "หก" ;
n7 = regNum "เจ็ด" ;
n7 = regNum "เจ็ด" ; -- M = E47 w
n8 = regNum "แปด" ;
n9 = regNum "เกา" ;
@@ -64,5 +65,5 @@ oper
sip = table {Unit => "ศิบ" ; Thousand => "หมื่น"} ;
roy = table {Unit => "รอย" ; Thousand => "ซแน"} ;
roy = table {Unit => "รอย" ; Thousand => "ซแน"} ;
phan = table {Unit => [] ; Thousand => "พะน"} ;

View File

@@ -102,12 +102,13 @@ thaiFinalMap = Map.fromList $ zip allThaiTrans finals
thaiTable :: String
thaiTable = unlines [
"\t" ++
hex c ++ "\t" ++
encodeUTF8 (showThai s) ++ "\t" ++
s ++ "\t" ++
pronThai s ++ "\t" ++
[f] ++ "\t" ++
[q]
[q] ++ "\t"
|
(c,q,f,s) <- zip4 allThaiCodes heights finals allThaiTrans
]
@@ -119,7 +120,7 @@ showThai s = case s of
pronThai s = case s of
[c,p]
| isUpper c && isDigit p -> show p
| isUpper c && isDigit p -> [p]
| isDigit p -> c:"h"
| p==':' -> c:[c]
| elem p "%&" -> c:"y"