From 2d82f8d1061f94eec6124acd1d36f8b448b0f81f Mon Sep 17 00:00:00 2001 From: aarne Date: Fri, 16 Mar 2007 16:23:39 +0000 Subject: [PATCH] thai phrase translator --- resource-1.0/thai/FileThai.hs | 7 +++-- resource-1.0/thai/Makefile | 2 ++ resource-1.0/thai/StringsTha.gf | 5 ++++ resource-1.0/thai/StringsThai.gf | 5 ++++ resource-1.0/thai/pronunciation/StringsTha.gf | 26 ++++++++++++++++--- 5 files changed, 39 insertions(+), 6 deletions(-) diff --git a/resource-1.0/thai/FileThai.hs b/resource-1.0/thai/FileThai.hs index 13c94325f..6ae038b11 100644 --- a/resource-1.0/thai/FileThai.hs +++ b/resource-1.0/thai/FileThai.hs @@ -22,10 +22,11 @@ import System main = do xx <- getArgs case xx of + "-f":f:[] -> thaiFakeFile f Nothing "-p":f:[] -> thaiPronFile f Nothing "-w":f:[] -> thaiWordList f f :[] -> thaiFile f Nothing - _ -> putStrLn "usage: filethai (-p) File" + _ -> putStrLn "usage: filethai (-f|-p|-w) File" -- adapted to the format of StringsThai @@ -37,7 +38,9 @@ thaiWordList f = do where mkLine s = case words s of o : "=" : s : ";" : "--" : es -> - putStrLn $ thai s ++ "\t" ++ pron s ++ "\t" ++ unwords es + putStrLn $ + thai s ++ "\t" ++ pron s ++ "\t" ++ fake s ++ "\t" ++ unwords es _ -> return () thai = encodeUTF8 . mkThaiWord . init . tail pron = mkThaiPron . init . tail + fake = mkThaiFake . init . tail diff --git a/resource-1.0/thai/Makefile b/resource-1.0/thai/Makefile index 54bd73510..eea6096ad 100644 --- a/resource-1.0/thai/Makefile +++ b/resource-1.0/thai/Makefile @@ -2,6 +2,8 @@ strings: runghc -i../../../src FileThai.hs StringsThai.gf >StringsTha.gf pronstrings: runghc -i../../../src FileThai.hs -p StringsThai.gf >pronunciation/StringsTha.gf +fakestrings: + runghc -i../../../src FileThai.hs -f StringsThai.gf >pronunciation/StringsTha.gf wordlist: runghc -i../../../src FileThai.hs -w StringsThai.gf diff --git a/resource-1.0/thai/StringsTha.gf b/resource-1.0/thai/StringsTha.gf index 46020d6f5..77ed218be 100644 --- a/resource-1.0/thai/StringsTha.gf +++ b/resource-1.0/thai/StringsTha.gf @@ -13,6 +13,7 @@ ca_s = "จะ" ; -- Modal cet_s = "เจ็ด" ; -- seven chan_s = "ฉัน" ; -- I chay_s = "ใช่" ; -- yes +cheut_s = "เชื้ต" ; -- shirt2 chuay_s = "ช่วย" ; -- help1 di_s = "ดิ" ; -- I (fem)1 dii_s = "ดี" ; -- hello2 @@ -45,6 +46,7 @@ nag_s = "หนะง" ; -- book1 nai_s = "ไหน" ; -- where2 nam_s = "นำ" ; -- water nan_s = "นั้น" ; -- that +nii_s = "นี้" ; -- this noon_s = "นอน" ; -- sleep1 nvg_s = "หนึง" ; -- one pay_s = "ไป" ; -- go @@ -53,12 +55,14 @@ pen_s = "เป็น" ; -- be, can-know phan_s = "พัน" ; -- thousand phom_s = "ผม" ; -- I (masc) puu_s = "ผู้" ; -- woman1 +rai_s = "ไร" ; -- how-much2 rak_s = "รัก" ; -- love raw_s = "เรา" ; -- we rooy_s = "ร้อย" ; -- hundred saam_s = "สาม" ; -- three sawat_s = "สวัส" ; -- hello1 seen_s = "แสน" ; -- hundred thousand +seua_s = "เสื้อ" ; -- shirt1 si_s = "ซิ" ; -- Imperative sii_s = "สี่" ; -- four sip_s = "สิบ" ; -- ten @@ -66,6 +70,7 @@ soog_s = "สอง" ; -- two svv_s = "สือ" ; -- book2 thii_s = "ที่" ; -- Ord thoot_s = "โทษ" ; -- sorry2 +thao_s = "เท่า" ; -- how-much1 tog_s = "ต้อง" ; -- must waa_s = "ว่า" ; -- that Conj way_s = "ไหว" ; -- can-potent diff --git a/resource-1.0/thai/StringsThai.gf b/resource-1.0/thai/StringsThai.gf index 570285556..f654035a4 100644 --- a/resource-1.0/thai/StringsThai.gf +++ b/resource-1.0/thai/StringsThai.gf @@ -13,6 +13,7 @@ ca_s = "ca." ; -- Modal cet_s = "ecSd" ; -- seven chan_s = "c1an" ; -- I chay_s = "a%c2T1" ; -- yes +cheut_s = "ec2v:T2t" ; -- shirt2 chuay_s = "[ch^uay]c2T1wy" ; -- help1 di_s = "di" ; -- I (fem)1 dii_s = "di:" ; -- hello2 @@ -45,6 +46,7 @@ nag_s = "hna.g" ; -- book1 nai_s = "a&hn" ; -- where2 nam_s = "na+" ; -- water nan_s = "naT2n" ; -- that +nii_s = "ni:T2" ; -- this noon_s = "nOn" ; -- sleep1 nvg_s = "hnvg" ; -- one pay_s = "a&p" ; -- go @@ -53,12 +55,14 @@ pen_s = "epSn" ; -- be, can-know phan_s = "p2an" ; -- thousand phom_s = "p1m" ; -- I (masc) puu_s = "p1u:T2" ; -- woman1 +rai_s = "a&r" ; -- how-much2 rak_s = "rak" ; -- love raw_s = "era:" ; -- we rooy_s = "rT2Oy" ; -- hundred saam_s = "sa:m" ; -- three sawat_s = "swas" ; -- hello1 seen_s = "e'sn" ; -- hundred thousand +seua_s = "esv:T2O" ; -- shirt1 si_s = "s'i" ; -- Imperative sii_s = "si:T1" ; -- four sip_s = "sib" ; -- ten @@ -66,6 +70,7 @@ soog_s = "sOg" ; -- two svv_s = "sv:O" ; -- book2 thii_s = "t5i:T1" ; -- Ord thoot_s = "o:t5r'" ; -- sorry2 +thao_s = "et5T1a:" ; -- how-much1 tog_s = "tT2Og" ; -- must waa_s = "wT1a:" ; -- that Conj way_s = "a&hw" ; -- can-potent diff --git a/resource-1.0/thai/pronunciation/StringsTha.gf b/resource-1.0/thai/pronunciation/StringsTha.gf index 82b50bbb7..fe44b6850 100644 --- a/resource-1.0/thai/pronunciation/StringsTha.gf +++ b/resource-1.0/thai/pronunciation/StringsTha.gf @@ -6,30 +6,44 @@ resource StringsTha = { oper +aphai_s = "`aphai" ; -- excuse2 baan_s = "b^aan" ; -- house -biar_s = "b-va" ; +biar_s = "b-va" ; -- beer ca_s = "c`a" ; -- Modal cet_s = "c`et" ; -- seven chan_s = "ch~an" ; -- I -chay_s = "ch^ay" ; -- be-not +chay_s = "ch^ay" ; -- yes +chuay_s = "ch^uay" ; -- help1 +di_s = "d`i" ; -- I (fem)1 +dii_s = "d-ii" ; -- hello2 +duay_s = "d^uay" ; -- help2 dvm_s = "d-vm" ; -- drink et_s = "O`et" ; -- one' haa_s = "h^aa" ; -- five hay_s = "h^ay" ; -- give +hoog_s = "h^OOg" ; -- room hok_s = "k`o" ; -- six +jai_s = "-ay" ; -- understand2 kaaw_s = "k-aw" ; -- nine kew_s = "k^ääw" ; -- glass (drink Classif) khaw_s = "kh~aw" ; -- he khon_s = "kh-on" ; -- people Classif +khoo_s = "kh~OO" ; -- please khoog_s = "kh~OOg" ; -- Possessive +khoop_s = "kh`OOp" ; -- thank +khow_s = "kh^eew" ; -- understand1 khun_s = "kh-un" ; -- you +koon_s = "k`OOn" ; -- bye2 +laa_s = "l-aa" ; -- bye1 lag_s = "l~ag" ; -- houses Classif lap_s = "l`ap" ; -- sleep2 lem_s = "l^eem" ; -- books Classif -may_s = "m-ay" ; -- not +may_s = "m^ay" ; -- not m'ay_s = "m~ay" ; -- Question mvvn_s = "m`vvn" ; -- ten thousand nag_s = "n~ag" ; -- book1 +nai_s = "n~ay" ; -- where2 +nam_s = "n-am" ; -- water nan_s = "n~an" ; -- that noon_s = "n-OOn" ; -- sleep1 nvg_s = "n~vg" ; -- one @@ -37,11 +51,13 @@ pay_s = "p-ay" ; -- go peet_s = "p`äät" ; -- eight pen_s = "p-en" ; -- be, can-know phan_s = "ph-an" ; -- thousand +phom_s = "ph~om" ; -- I (masc) puu_s = "ph^uu" ; -- woman1 rak_s = "r'ak" ; -- love raw_s = "r-aw" ; -- we rooy_s = "r~OOy" ; -- hundred saam_s = "s~aam" ; -- three +sawat_s = "s`awt" ; -- hello1 seen_s = "s~ään" ; -- hundred thousand si_s = "s'i" ; -- Imperative sii_s = "s`ii" ; -- four @@ -49,6 +65,7 @@ sip_s = "s`ip" ; -- ten soog_s = "s~OOg" ; -- two svv_s = "s~vvO" ; -- book2 thii_s = "th^ii" ; -- Ord +thoot_s = "th^oot" ; -- sorry2 tog_s = "t^OOg" ; -- must waa_s = "w^aa" ; -- that Conj way_s = "w~ay" ; -- can-potent @@ -57,6 +74,7 @@ yaak_s = "y`aak" ; -- want yay_s = "y~ay" ; -- big yig_s = "y~ig" ; -- woman2 yii_s = "y^ii" ; -- two' - +yin_s = "y-in" ; -- you're-welcome1 +yuu_s = "y-uu" ; -- where0(?) }