From b78891eab977fb9f058be989d4be22e6892c59b3 Mon Sep 17 00:00:00 2001 From: aarne Date: Mon, 5 Dec 2011 09:36:26 +0000 Subject: [PATCH] adjustments in Thai pronunciation --- src/Make.hs | 4 ++-- src/Makefile | 3 ++- src/thai/LexiconTha.gf | 2 +- src/thai/ThaiScript.hs | 11 +++++++---- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/Make.hs b/src/Make.hs index bfcc21475..eee65a023 100644 --- a/src/Make.hs +++ b/src/Make.hs @@ -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"] diff --git a/src/Makefile b/src/Makefile index 2f38f5ce6..547c01884 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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 diff --git a/src/thai/LexiconTha.gf b/src/thai/LexiconTha.gf index 6c135a522..dc25522f9 100644 --- a/src/thai/LexiconTha.gf +++ b/src/thai/LexiconTha.gf @@ -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 "หญิง") ; diff --git a/src/thai/ThaiScript.hs b/src/thai/ThaiScript.hs index 1676485e8..d1cb62bc5 100644 --- a/src/thai/ThaiScript.hs +++ b/src/thai/ThaiScript.hs @@ -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