adjustments in Thai pronunciation

This commit is contained in:
aarne
2011-12-05 09:36:26 +00:00
parent 89806a05d9
commit d5623f9d67
7 changed files with 29 additions and 15 deletions

View File

@@ -54,7 +54,7 @@ langsCoding = [
(("spanish", "Spa"),"Romance"),
(("swedish", "Swe"),"Scand"),
(("thai", "Tha"),""),
(("thai", "Thp"),""), -- Thai pronunciation
(("thai", "ThaP"),""), -- Thai pronunciation
(("turkish", "Tur"),""),
(("urdu", "Urd"),"Hindustani")
]
@@ -67,7 +67,7 @@ langs = map fst langsCoding
langsLangAll = langs
-- languagues that are almost complete and for which Lang is normally compiled
langsLang = langs `except` (langsIncomplete ++ ["Thp"])
langsLang = langs `except` langsIncomplete
-- languagues that have notpresent marked
langsPresent = langsLang `except` ["Lav","Nep","Pes","Tha"]

View File

@@ -5,7 +5,8 @@ GF_LIB_PATH=..
.PHONY: all present alltenses full lang api math prelude test demo parse synopsis link compiled constructX clean
all: link prelude constructX present alltenses full
all: link prelude constructX present alltenses
#full
present:
$(RUNMAKE) present lang

View File

@@ -347,7 +347,7 @@ lin
win_V2 = mkV2 "ชนะ" ;
wind_N = mkN (thword "ลม") ;
window_N = mkN (thword "หน้า" "ต่าง" "บาน") ; ----?
wine_N = mkN (thword "เหล้า" "งุ่น") "ขวด" ;
wine_N = mkN (thword "เหล้า" "องุ่น") "ขวด" ;
wing_N = mkN (thword "ปิก") ;
wipe_V2 = mkV2 (thword "เช็ด") ;
woman_N = personN (thword "หญิง") ;

View File

@@ -5,7 +5,7 @@ import Data.List
import qualified Data.Map as Map
import System
-- convert all files *Tha.gf into *Thp.gf with "t" changed to (thpron "t" "p")
-- convert all files *Tha.gf into *ThP.gf with "t" changed to (thpron "t" "p")
main = allThpron
@@ -22,9 +22,9 @@ fileThpron file = do
appThpron s = case s of
'"':cs -> let (w,_:rest) = break (=='"') cs in mkThpron w ++ appThpron rest
'T':'h':'a':'A':rest -> "ThpA" ++ appThpron rest -- AllThaAbs
'T':'h':'a':'A':rest -> "ThaPA" ++ appThpron rest -- AllThaAbs
'T':'h':'a':c:rest | isAlpha c -> "Tha" ++ c : appThpron rest -- Thank
'T':'h':'a':rest -> "Thp" ++ appThpron rest
'T':'h':'a':rest -> "ThaP" ++ appThpron rest
c:cs -> c:appThpron cs
_ -> s
@@ -71,6 +71,8 @@ dat2pron is = case is of
[CO,Cy,CT1,CaL,Cg] -> "y" ++ low "aa" ++ i_ng
[CO,Cy,CT1,CuL] -> "y" ++ low "uu"
[Cp3,Cr] -> "phan" --- not in Smyth
[Cc2,CvL,CT1,CO] -> "ch" ++ falling i_uue --- to get rid of final O
[CO,Cg,CT1,Cu,Cn] -> low "a" ++ i_ng ++ low "un" --- probably there is a rule for leading vowelless O
-- words following the rules (mostly from Smyth's Essential Grammar)
_ -> case getSyllable is of
@@ -89,6 +91,7 @@ dat2pron is = case is of
[Ce] : cc : [Ci,Cy,CaP] : d : cs -> prons cc ++ tone cc d cs "ia" ++ endWith cs -- e-iya-> ia
[Ce] : cc : [CiL,CO] : d : cs -> prons cc ++ tone cc d cs "ia" ++ endWith cs -- e-iiO-> üa
[Ce] : cc : [CvL,CO] : d : cs -> prons cc ++ tone cc d cs (i_ue++"a") ++ endWith cs -- e-vvO-> üa
[Ce] : cc : [CvL,CO,Cy] : d : cs -> prons cc ++ tone cc d cs (i_ue++"ay")++ endWith cs -- e-vvOy-> üay
[Ce'] : cc : [CaP] : d : cs -> prons cc ++ tone cc d cs i_ae ++ endWith cs -- ä-a -> ä
[CoL] : cc : [CaP] : d : cs -> prons cc ++ tone cc d cs "o" ++ endWith cs -- o-a -> o
[] :[CO]: v : d : cs -> tone[CO]d cs (prons v) ++ endWith cs -- Ov -> v
@@ -124,7 +127,7 @@ getSyllable s = case s of
getCons v s = case s of
Ch:c:cs | isConsonant c && isLow c -> let (cc:ccs) = getCons v (c:cs) in (Ch:cc):ccs -- hC
CO:cs -> [CO] :getVow v cs -- O
Cs:Cr:cs -> [Cs] :getVow v cs -- O
Cs:Cr:cs -> [Cs] :getVow v cs -- sr -> s
_:CK:[] -> []
b:Cr:Cr:[] | isConsonant b -> [b] :[Ca]:[]:[Cr]:[] -- Crr -> Can
b:Cr:Cr:[c] | all isConsonant [b,c] -> [b] :[Ca]:[]:[c]:[] -- CrrC -> CaC