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

@@ -2,10 +2,10 @@ compile = runghc Compile
all: demo missing
thaidroid:
thaidroid: #thaiscript
cp -p Phrasebook.pgf FullPhrasebook.pgf
$(compile) -opt Eng Swe Tha Thp DisambPhrasebookEng
$(compile) -link Eng Fin Swe Tha Thp DisambPhrasebookEng
$(compile) -opt Eng Swe Tha PhrasebookThaP DisambPhrasebookEng
$(compile) -link Eng Fin Swe Tha PhrasebookThaP DisambPhrasebookEng
mv Phrasebook.pgf Thaidroid.pgf
mv FullPhrasebook.pgf Phrasebook.pgf

View File

@@ -31,7 +31,7 @@ concrete WordsTha of Words = SentencesTha **
-- Properties; many of them are in the resource lexicon, others can be built by $mkA$.
Bad = L.bad_A ;
Boring = mkA (R.thword "น่า" "เบ่อ") ;
Boring = mkA (R.thword "น่า" "เบ่อ") ;
Cheap = mkA (R.thword "รา" "คา" "ถูก") ;
Cold = L.cold_A ;
Delicious = mkA "อร่อย" ;
@@ -131,7 +131,7 @@ concrete WordsTha of Words = SentencesTha **
(mkNP (mkNP a_Det (mkN "ห้อง")) (SyntaxTha.mkAdv for_Prep (mkNP num (mkN "หมาย" "เลข")))) ;
AHasTable p num = mkCl p.name have_V2
(mkNP (mkNP a_Det (mkN "โต๊ะ")) (SyntaxTha.mkAdv for_Prep (mkNP num (mkN "ตัว" "ที่")))) ;
AHasName p name = mkCl (nameOf p) name ;
AHasName p name = mkCl p.name (mkV2 "ชื่อ") name ; ---
AHungry p = mkCl p.name (mkA (R.thword "หิว" "ข้าว")) ;
AIll p = mkCl p.name (mkA (R.thword "เจ็บ" "ปวย")) ;
AKnow p = mkCl p.name <lin V L.know_V2 : V> ;
@@ -251,8 +251,6 @@ concrete WordsTha of Words = SentencesTha **
{name = mkNP the_Det (mkCN (personN f) (SyntaxTha.mkAdv possess_Prep p.name)) ;
isPron = False ; poss = the_Quant} ; ---- poss not used
nameOf : NPPerson -> NP = \p -> (xOf L.name_N.s p).name ;
mkTransport : N -> {name : CN ; by : Adv} = \n -> {
name = mkCN n ;

View File

@@ -1,5 +1,17 @@
DisambPhrasebookEng :
PhrasebookBul : ABusinessman ACook ADoctor AEngineer ALawyer AProfessor AStudent ATeacher Baht Beach Beef Chili Coke Durian Egg Garlic IceCream ItsCold ItsRaining ItsWarm ItsWindy Lemonade Mango Noodles ObjPlur OrangeJuice Pineapple Pork Rice Salad Shrimps Smoke SunShine Thai ThesPlur ThesePlur ThosePlur
PhrasebookCat : ABusinessman ACook ADoctor AEngineer ALawyer AProfessor AStudent ATeacher Baht Beach Beef Chili Coke Durian Egg Garlic IceCream ItsCold ItsRaining ItsWarm ItsWindy Lemonade MMust Mango Noodles ObjPlur OrangeJuice Pineapple Pork Rice Salad Shrimps Smoke SunShine Thai ThesPlur ThesePlur ThosePlur
PhrasebookDan : ABusinessman ACook ADoctor AEngineer ALawyer AProfessor AStudent ATeacher Baht Beach Beef Chili Coke Durian Egg Garlic IceCream ItsCold ItsRaining ItsWarm ItsWindy Lemonade Mango Noodles ObjPlur OrangeJuice Pineapple Pork Rice Salad Shrimps Smoke SunShine Thai ThesPlur ThesePlur ThosePlur
PhrasebookDut : ABusinessman ACook ADoctor AEngineer ALawyer AProfessor AStudent ATeacher Baht Beach Beef Chili Coke Durian Egg Garlic IceCream ItsCold ItsRaining ItsWarm ItsWindy Lemonade Mango Noodles ObjPlur OrangeJuice Pineapple Pork Rice Salad Shrimps Smoke SunShine Thai ThesPlur ThesePlur ThosePlur
PhrasebookEng :
PhrasebookFin :
PhrasebookFre : ABusinessman ACook ADoctor AEngineer ALawyer AProfessor AStudent ATeacher Baht Beach Beef Chili Coke Durian Egg Garlic IceCream ItsCold ItsRaining ItsWarm ItsWindy Lemonade Mango Noodles ObjPlur OrangeJuice Pineapple Pork Rice Salad Shrimps Smoke SunShine Thai ThesPlur ThesePlur ThosePlur
PhrasebookGer : ABusinessman ACook ADoctor AEngineer ALawyer AModVerbPhrase AModVerbPhrasePlace AProfessor AStudent ATeacher Baht Beach Beef Chili Coke Durian Egg Garlic IceCream ItsCold ItsRaining ItsWarm ItsWindy Lemonade Mango Noodles ObjPlur OrangeJuice Pineapple Pork Rice Salad Shrimps Smoke SunShine Thai ThesPlur ThesePlur ThosePlur
PhrasebookIta : ABusinessman ACook ADoctor AEngineer ALawyer AProfessor AStudent ATeacher Baht Beach Beef Chili Coke Durian Egg Garlic IceCream ItsCold ItsRaining ItsWarm ItsWindy Lemonade MCan MMust Mango Noodles ObjPlur OrangeJuice Pineapple Pork Rice Salad Shrimps Smoke SunShine Thai ThesPlur ThesePlur ThosePlur
PhrasebookNor : ABusinessman ACook ADoctor AEngineer ALawyer AProfessor AStudent ATeacher Baht Beach Beef Chili Coke Durian Egg Garlic IceCream ItsCold ItsRaining ItsWarm ItsWindy Lemonade Mango Noodles ObjPlur OrangeJuice Pineapple Pork Rice Salad Shrimps Smoke SunShine Thai ThesPlur ThesePlur ThosePlur
PhrasebookPol : ABusinessman ACook ADoctor AEngineer ALawyer AProfessor AStudent ATeacher Baht Beach Beef Chili Coke Durian Egg Garlic IceCream ItsCold ItsRaining ItsWarm ItsWindy Lemonade Mango Noodles ObjPlur OrangeJuice Pineapple Pork Rice Salad Shrimps Smoke SunShine Thai ThesPlur ThesePlur ThosePlur
PhrasebookRon : ABusinessman ACook ADoctor AEngineer ALawyer AProfessor AStudent ATeacher Baht Beach Beef Chili Coke Durian Egg Garlic IceCream ItsCold ItsRaining ItsWarm ItsWindy Lemonade Mango Noodles ObjPlur OrangeJuice Pineapple Pork Rice Salad Shrimps Smoke SunShine Thai ThesPlur ThesePlur ThosePlur
PhrasebookRus : ABusinessman ACook ADoctor AEngineer ALawyer AProfessor AStudent ATeacher Baht Beach Beef Belgian Belgium Chili Coke Durian Egg Flemish Garlic IceCream ItsCold ItsRaining ItsWarm ItsWindy Lemonade Mango Noodles ObjPlur OrangeJuice Pineapple Pork Rice Salad Shrimps Smoke SunShine Thai ThesPlur ThesePlur ThosePlur
PhrasebookSpa : ABusinessman ACook ADoctor AEngineer ALawyer AProfessor AStudent ATeacher Baht Beach Beef Chili Coke Durian Egg Garlic IceCream ItsCold ItsRaining ItsWarm ItsWindy Lemonade Mango Noodles ObjPlur OrangeJuice Pineapple Pork Rice Salad Shrimps Smoke SunShine Thai ThesPlur ThesePlur ThosePlur
PhrasebookSwe :
PhrasebookTha :

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