mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
Nui's corrections to Synopsis examples and Phrasebook; a logo for Thai
This commit is contained in:
@@ -22,7 +22,7 @@ lin
|
||||
GLookOut = mkGreeting (thword "ระ" "วัง") ; ---- google
|
||||
GNiceToMeetYou, GNiceToMeetYouPol =
|
||||
mkGreeting (thword "ยิน" "ดี" "ที่" "ได้" "รู้" "จัก") ;
|
||||
GPleaseGive, GPleaseGivePol = mkGreeting (thword "ช่วย") ; ----
|
||||
GPleaseGive, GPleaseGivePol = mkGreeting "นะ" ;
|
||||
GSeeYouSoon = mkGreeting (thword "เจอ" "กัน" "นะ") ;
|
||||
GSorry, GSorryPol = mkGreeting (thword "ขอ" "โทษ") ;
|
||||
GThanks = mkGreeting (thword "ขอบ" "คุณ") ;
|
||||
|
||||
@@ -4,8 +4,8 @@ all: demo missing
|
||||
|
||||
thaidroid: #thaiscript
|
||||
cp -p Phrasebook.pgf FullPhrasebook.pgf
|
||||
$(compile) -opt Eng Swe Tha PhrasebookThaP DisambPhrasebookEng
|
||||
$(compile) -link Eng Fin Swe Tha PhrasebookThaP DisambPhrasebookEng
|
||||
$(compile) -opt Eng Swe Tha Thb DisambPhrasebookEng
|
||||
$(compile) -link Eng Fin Swe Tha Thb DisambPhrasebookEng
|
||||
mv Phrasebook.pgf Thaidroid.pgf
|
||||
mv FullPhrasebook.pgf Phrasebook.pgf
|
||||
|
||||
|
||||
@@ -298,7 +298,7 @@ concrete WordsTha of Words = SentencesTha **
|
||||
ItsCold = mkCl (mkVP L.cold_A) ;
|
||||
ItsWarm = mkCl (mkVP L.warm_A) ;
|
||||
ItsWindy = mkCl (mkVP (P.mkA (R.thword "ลม" "จัด"))) ;
|
||||
SunShine = mkCl (mkNP the_Det L.sun_N) (mkVP (R.regV "ฉาย")) ;
|
||||
SunShine = mkCl (mkNP the_Det L.sun_N) (mkVP (R.regV (R.thword "ฉาย" "แสง"))) ;
|
||||
|
||||
Smoke = mkVP (P.mkV (R.thword "สูบ" "บุ" "รี")) ;
|
||||
|
||||
|
||||
BIN
examples/phrasebook/thai.png
Normal file
BIN
examples/phrasebook/thai.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
1698
lib/doc/CC_eng_tha.txt
Normal file
1698
lib/doc/CC_eng_tha.txt
Normal file
File diff suppressed because it is too large
Load Diff
@@ -54,7 +54,7 @@ langsCoding = [
|
||||
(("spanish", "Spa"),"Romance"),
|
||||
(("swedish", "Swe"),"Scand"),
|
||||
(("thai", "Tha"),""),
|
||||
(("thai", "ThaP"),""), -- Thai pronunciation
|
||||
(("thai", "Thb"),""), -- Thai pronunciation
|
||||
(("turkish", "Tur"),""),
|
||||
(("urdu", "Urd"),"Hindustani")
|
||||
]
|
||||
|
||||
@@ -10,7 +10,7 @@ concrete AdjectiveTha of Adjective = CatTha ** open ResTha, Prelude in {
|
||||
|
||||
AdjOrd ord = ord ;
|
||||
|
||||
CAdvAP ad ap np = mkAdj (thbind ap.s ad.s np.s) ;
|
||||
CAdvAP ad ap np = mkAdj (thbind ap.s ad.s ad.p np.s) ;
|
||||
|
||||
ComplA2 a np = mkAdj (thbind a.s a.c2 np.s) ;
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ concrete AdverbTha of Adverb = CatTha **
|
||||
|
||||
PrepNP prep np = thbind prep np ;
|
||||
|
||||
ComparAdvAdj cadv a np = ss (thbind a.s cadv.s np.s) ;
|
||||
ComparAdvAdj cadv a np = ss (thbind a.s cadv.s cadv.p np.s) ;
|
||||
|
||||
ComparAdvAdjS cadv a s = ss (thbind a.s cadv.s s.s) ;
|
||||
ComparAdvAdjS cadv a s = ss (thbind a.s cadv.s cadv.p s.s) ;
|
||||
|
||||
AdAdv adv ad = thbind ad adv ;
|
||||
|
||||
|
||||
@@ -11,15 +11,15 @@ concrete ConjunctionTha of Conjunction = CatTha ** open Prelude, Coordination in
|
||||
-- These fun's are generated from the list cat's.
|
||||
|
||||
BaseS = twoSS ;
|
||||
ConsS = consrSS comma ;
|
||||
ConsS = consrSS thcomma ;
|
||||
BaseAdv = twoSS ;
|
||||
ConsAdv = consrSS comma ;
|
||||
ConsAdv = consrSS thcomma ;
|
||||
BaseNP = twoSS ;
|
||||
ConsNP = consrSS comma ;
|
||||
ConsNP = consrSS thcomma ;
|
||||
BaseAP = twoSS ;
|
||||
ConsAP = consrSS comma ;
|
||||
ConsAP = consrSS thcomma ;
|
||||
BaseRS = twoSS ;
|
||||
ConsRS = consrSS comma ;
|
||||
ConsRS = consrSS thcomma ;
|
||||
|
||||
lincat
|
||||
[S] = {s1,s2 : Str} ;
|
||||
@@ -28,4 +28,7 @@ concrete ConjunctionTha of Conjunction = CatTha ** open Prelude, Coordination in
|
||||
[AP] = {s1,s2 : Str} ;
|
||||
[RS] = {s1,s2 : Str} ;
|
||||
|
||||
oper
|
||||
thcomma : Str = [] ; ---- should be a space
|
||||
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ lin
|
||||
breast_N = mkN (thword "หน้า" "อก") ;
|
||||
breathe_V = mkV (thword "หาย" "ใจ") ;
|
||||
broad_A = mkA "กว้าง" ;
|
||||
brother_N2 = mkN2 (personN (thword "พี่" "ชาย")) [] ;
|
||||
brother_N2 = mkN2 (personN (thword "พี่" "ชาย")) poss ;
|
||||
brown_A = mkA (thword "สี" "น้ำ" "ตาล") ;
|
||||
burn_V = mkV (thword "เผา") ;
|
||||
butter_N = mkN (thword "เนย") "สด" ; ----?
|
||||
@@ -102,7 +102,7 @@ lin
|
||||
fall_V = mkV (thword "ตก") ;
|
||||
far_Adv = ss (thword "ไกล") ;
|
||||
fat_N = mkN (thword "ไข" "มัน") ;
|
||||
father_N2 = mkN2 (personN (thword "พ่อ")) [] ;
|
||||
father_N2 = mkN2 (personN (thword "พ่อ")) poss ;
|
||||
fear_N = mkN (thword "ความ" "กลัว") ;
|
||||
fear_V2 = mkV2 "กลัว";
|
||||
fear_VS = mkVS (regV "กลัว") ;
|
||||
@@ -195,7 +195,7 @@ lin
|
||||
meat_N = mkN (thword "เนื้อ") ;
|
||||
milk_N = mkN (thword "นม") kew_s ;
|
||||
moon_N = mkN (thword "พระ" "จันทร์") ;
|
||||
mother_N2 = personN "แม่" ** {c2 = []} ;
|
||||
mother_N2 = mkN2 (personN "แม่") poss ;
|
||||
mountain_N = mkN (thword "เขา") ;
|
||||
mouth_N = mkN (thword "ปาก") ;
|
||||
music_N = mkN (thword "ดน" "ตรี") ; ----?
|
||||
@@ -208,7 +208,7 @@ lin
|
||||
newspaper_N = mkN (thword "หนัง" "สือ" "พิมพ์") "ฉบับ" ;
|
||||
night_N = mkN (thword "กลาง" "คืน") ;
|
||||
nose_N = mkN (thword "จมูก") ;
|
||||
now_Adv = mkAdv (thword "เดี่ยว" "นี้") ;
|
||||
now_Adv = mkAdv (thword "เดี๋ยว" "นี้") ;
|
||||
number_N = mkN (thword "หมาย" "เลข") ; ----?
|
||||
oil_N = mkN (thword "น้ำมัน") ; ----?
|
||||
old_A = mkA (thword "แก่") ;
|
||||
@@ -255,7 +255,7 @@ lin
|
||||
run_V = mkV "วิ่ง" ;
|
||||
salt_N = mkN (thword "เกลือ") ;
|
||||
sand_N = mkN (thword "ทราย") ;
|
||||
say_VS = mkVS (regV ("ว่า")) ;
|
||||
say_VS = mkVS (regV "พูด") ;
|
||||
school_N = placeN (thword "โรง" "เรียน") ;
|
||||
---- science_N = mkN "science" ; ----?
|
||||
scratch_V2 = mkV2 (thword "เกา") ;
|
||||
@@ -264,7 +264,7 @@ lin
|
||||
seed_N = mkN (thword "เม็ด") ;
|
||||
seek_V2 = mkV2 "หา" ;
|
||||
sell_V3 = mkV3 "ขาย" ;
|
||||
send_V3 = mkV3 "ส่ง" ;
|
||||
send_V3 = mkV3 (mkV "ส่ง" "ให้") ;
|
||||
sew_V = mkV (thword "เย็บ") ;
|
||||
sharp_A = mkA (thword "คม") ;
|
||||
sheep_N = animalN "แกะ" ;
|
||||
@@ -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 "หญิง") ;
|
||||
@@ -359,4 +359,7 @@ lin
|
||||
yellow_A = mkA (thword "สี" "เหลือง") ;
|
||||
young_A = mkA "รุ่น" ;
|
||||
|
||||
oper
|
||||
poss = "ของ" ;
|
||||
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ concrete NounTha of Noun = CatTha ** open StringsTha, ResTha, Prelude in {
|
||||
NumNumeral numeral = numeral ** {hasC = True} ;
|
||||
OrdNumeral numeral = {s = thbind thii_s numeral.s} ;
|
||||
|
||||
AdNum adn num = thbind num adn ;
|
||||
AdNum adn num = thbind adn num ; ---- always?
|
||||
|
||||
OrdSuperl a = {s = thbind a.s thii_s sut_s} ;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ concrete PhraseTha of Phrase = CatTha ** open Prelude, ResTha in {
|
||||
UttCN cn = cn ;
|
||||
UttAP ap = ap ;
|
||||
UttCard x = x ;
|
||||
UttVP vp = {s = vp.s ! Pos} ;
|
||||
UttVP vp = {s = vp.s ! Pos ++ vp.e} ;
|
||||
UttAdv adv = adv ;
|
||||
|
||||
NoPConj = {s = []} ;
|
||||
|
||||
@@ -11,8 +11,8 @@ concrete SentenceTha of Sentence = CatTha **
|
||||
|
||||
ImpVP vp = {
|
||||
s = table {
|
||||
Pos => thbind (vp.s ! Pos) si_s ;
|
||||
Neg => thbind yaa_s (vp.s ! Pos)
|
||||
Pos => thbind (vp.s ! Pos) vp.e si_s ;
|
||||
Neg => thbind yaa_s (vp.s ! Pos) vp.e
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ hay_s = "ให้" ; -- give
|
||||
hoog_s = "ห้อง" ; -- room
|
||||
hok_s = "หก" ; -- six
|
||||
jai_s = "ใจ" ; -- understand2
|
||||
kaaw_s = "เกา" ; -- nine
|
||||
kaaw_s = "เก้า" ; -- nine
|
||||
kam_s = "กำ" ; -- Progr1
|
||||
kew_s = "แก้ว" ; -- glass (drink Classif)
|
||||
khaw_s = "เขา" ; -- he
|
||||
|
||||
@@ -5,11 +5,11 @@ concrete StructuralTha of Structural = CatTha **
|
||||
|
||||
lin
|
||||
above_Prep = ss (thword "ข้าง" "บน") ;
|
||||
after_Prep = ss "หลัง" ;
|
||||
after_Prep = ss (thword "หลัง" "จาก") ;
|
||||
all_Predet = ss (thword "ทั้ง" "หมด") ;
|
||||
almost_AdA, almost_AdN = ss (thword "เกิ" "อบ") ;
|
||||
although_Subj = ss "ถืง" ;
|
||||
always_AdV = ss (thword "ตลอด" "ไป") ;
|
||||
always_AdV = ss (thword "เส" "มอ") ; --- pronunciation
|
||||
and_Conj = {s1 = [] ; s2 = "และ"} ;
|
||||
as_CAdv = {s = thword "เท่า" ; p = "กับ"} ; ----
|
||||
at_least_AdN = ss (thword "อย่าง" "น้อย") ;
|
||||
@@ -17,16 +17,16 @@ concrete StructuralTha of Structural = CatTha **
|
||||
because_Subj = ss (thword "เพ" "ราะ") ;
|
||||
before_Prep = ss "ก่อน" ;
|
||||
behind_Prep = ss "หลัง" ;
|
||||
between_Prep = ss (thword "ระ" "หวา่ง") ;
|
||||
both7and_DConj = {s1 = "และ" ; s2 = "และ"} ; ----
|
||||
between_Prep = ss (thword "ระ" "หว่าง") ;
|
||||
both7and_DConj = {s1 = "ทั้ง" ; s2 = "และ"} ;
|
||||
but_PConj = ss "แต่" ;
|
||||
by8agent_Prep = ss [] ;
|
||||
by8means_Prep = ss "ผ่าน" ;
|
||||
can8know_VV = {s = pen_s ; typ = VVPost} ;
|
||||
can_VV = {s = "ได้" ; typ = VVPost} ;
|
||||
during_Prep = ss "ที" ;
|
||||
either7or_DConj = {s1 = "หริอ" ; s2 = "หริอ"} ; ----
|
||||
everybody_NP = mkNP (thword "ทัว" "ห้นา") ;
|
||||
during_Prep = ss (thword "ระ" "หว่าง") ;
|
||||
either7or_DConj = {s1 = [] ; s2 = "หริอ"} ; ---- or: mai - ko
|
||||
everybody_NP = mkNP (thword "ทุก" "คน") ;
|
||||
every_Det = quantDet "ทุก" ;
|
||||
everything_NP = mkNP (thword "ทุก" "สิ่ง") ;
|
||||
everywhere_Adv = ss (thword "ทุก" "ที") ;
|
||||
@@ -48,30 +48,30 @@ concrete StructuralTha of Structural = CatTha **
|
||||
if_then_Conj = {s1 = "ถ้า" ; s2 = "ก็"} ; ---- ko between subj and verb
|
||||
in_Prep = ss (thword "ใน") ;
|
||||
it_Pron = ss "มัน" ;
|
||||
less_CAdv = {s = "น้อย" ; p = "กว่า"} ; ----
|
||||
less_CAdv = {s = "น้อย" ; p = "กว่า"} ;
|
||||
many_Det = quantDet "หลาย" ;
|
||||
more_CAdv = {s = "มาก" ; p = "กว่า"} ; ----
|
||||
more_CAdv = {s = "มาก" ; p = "กว่า"} ;
|
||||
most_Predet = ss (thword "มาก" "ที่" "สุด") ;
|
||||
much_Det = quantDet "มาก" ;
|
||||
much_Det = quantDet "หลาย" ; ---- always?
|
||||
must_VV = {s = tog_s ; typ = VVPre} ;
|
||||
no_Quant = quantDet may_s ; ----
|
||||
no_Quant = quantDet (thword "ไม่" "มี") ;
|
||||
no_Utt = ss may_s ;
|
||||
nobody_NP = mkNP (thword "ไม่" "มี" "ใคร") ;
|
||||
not_Predet = ss may_s ; ----
|
||||
nothing_NP = mkNP "เปล่า" ;
|
||||
on_Prep = ss "บน" ;
|
||||
only_Predet = ss (thword "เฑา" "นั้น") ;
|
||||
only_Predet = ss (thword "เท่า" "นั้น") ;
|
||||
or_Conj = {s1 = [] ; s2 = "หริอ"} ;
|
||||
otherwise_PConj = ss (thword "ไม่" "งัน") ;
|
||||
otherwise_PConj = ss (thword "ไม่" "อย่าง" "นั้น") ;
|
||||
part_Prep = ss "" ; ----
|
||||
please_Voc = ss "ขอ" ;
|
||||
possess_Prep = ss "ของ" ;
|
||||
quite_Adv = ss (thword "คอน" "ข้าง") ;
|
||||
she_Pron = ss khaw_s ;
|
||||
so_AdA = ss (thword "เท่า" "กัน") ; ----
|
||||
quite_Adv = ss (thword "ค่อน" "ข้าง") ;
|
||||
she_Pron = ss "หล่อน" ;
|
||||
so_AdA = ss (thword "ดัง" "นั้น") ;
|
||||
somebody_NP = mkNP (thword "บาง" "คน") ;
|
||||
somePl_Det = quantDet ("บ้าง") ;
|
||||
someSg_Det = quantDet ("บ้าง") ;
|
||||
somePl_Det = quantDet ("บาง") ;
|
||||
someSg_Det = quantDet ("บาง") ;
|
||||
something_NP = mkNP (thword "บาง" "สิ่ง") ;
|
||||
somewhere_Adv = mkAdv (thword "บาง" "แห่ง") ;
|
||||
that_Quant = demDet nan_s ;
|
||||
@@ -80,7 +80,7 @@ concrete StructuralTha of Structural = CatTha **
|
||||
there7to_Adv = ss (thword "ที่" "นั่น") ; ----
|
||||
there7from_Adv = ss (thword "จาก" "นั่น") ; ----
|
||||
therefore_PConj = ss (thword "เพราะ" "ฉะ" "นั้น") ;
|
||||
they_Pron = mkNP khaw_s ;
|
||||
they_Pron = mkNP (thword "พวก" khaw_s) ; --- mkNP (thword "เขา" "ทั้ง" "หลาย") ;
|
||||
this_Quant = demDet nii_s ;
|
||||
through_Prep = ss "ผ่าน" ;
|
||||
too_AdA = ss (thword "เกิน" "ไป") ;
|
||||
@@ -91,16 +91,16 @@ concrete StructuralTha of Structural = CatTha **
|
||||
we_Pron = ss raw_s ;
|
||||
whatPl_IP, whatSg_IP = ss (thword "อะ" "ไร") ;
|
||||
when_IAdv = ss (thword "เมื่อไร") ;
|
||||
when_Subj = ss "ฑี" ;
|
||||
when_Subj = ss "ที" ;
|
||||
where_IAdv = ss (thword "ที่" "ไหน") ;
|
||||
which_IQuant = demDet "ไหน" ;
|
||||
whoPl_IP, whoSg_IP = ss "ไคร" ;
|
||||
why_IAdv = ss (thword "ฑำ" "ไม") ;
|
||||
without_Prep = ss (thword "ไ่ม" "มี") ;
|
||||
whoPl_IP, whoSg_IP = ss "ใคร" ;
|
||||
why_IAdv = ss (thword "ทำ" "ไม") ;
|
||||
without_Prep = ss (thword "ไม่" "มี") ;
|
||||
with_Prep = ss "กับ" ;
|
||||
yes_Utt = ss chay_s ;
|
||||
youSg_Pron = ss khun_s ;
|
||||
youPl_Pron = ss khun_s ;
|
||||
youPl_Pron = ss (thword "พวก" khun_s) ;
|
||||
youPol_Pron = ss khun_s ;
|
||||
right_Ord = ss (thword "ขวา") ;
|
||||
left_Ord = ss (thword "ซ้าย") ;
|
||||
|
||||
@@ -21,11 +21,12 @@ fileThpron file = do
|
||||
writeFile tgt (appThpron s)
|
||||
putStrLn ("wrote " ++ tgt)
|
||||
|
||||
-- thb = IPA Thai; not used in ISO-639-3 like Thp
|
||||
appThpron s = case s of
|
||||
'"':cs -> let (w,_:rest) = break (=='"') cs in mkThpron w ++ appThpron rest
|
||||
'T':'h':'a':'A':rest -> "ThaPA" ++ appThpron rest -- AllThaAbs
|
||||
'T':'h':'a':'A':rest -> "Thb" ++ appThpron rest -- AllThaAbs
|
||||
'T':'h':'a':c:rest | isAlpha c -> "Tha" ++ c : appThpron rest -- Thank
|
||||
'T':'h':'a':rest -> "ThaP" ++ appThpron rest
|
||||
'T':'h':'a':rest -> "Thb" ++ appThpron rest
|
||||
c:cs -> c:appThpron cs
|
||||
_ -> s
|
||||
|
||||
@@ -72,6 +73,7 @@ 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
|
||||
[Cp2,Cw,Ck] -> "phw" ++ falling "ak" -- 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user