diff --git a/src/arabic/wiktionary/WordNetAra.gf b/src/arabic/wiktionary/WordNetAra.gf index 992775b69..dd3d72060 100644 --- a/src/arabic/wiktionary/WordNetAra.gf +++ b/src/arabic/wiktionary/WordNetAra.gf @@ -243,8 +243,8 @@ lin kilometre_1_N = 'كَمّ_N' ; -- 647 [['quantity, multitude'], ['quantum']] -- lin kilometre_1_N = 'كِمّ_N' ; -- 6304 [['calyx of a flower, the envelope or spathe of a palm-tree or the like']] -- lin kilometre_1_N = 'كُمّ_N' ; -- 16436 [['sleeve of a garment']] lin kina_N = mkN "كينا" ; --- guess from كينا -lin king_1_N = 'مَلَك_N' ; -- 1462 [['angel']] --- lin king_1_N = 'مَلِك_N' ; -- 11923 [['king, sovereign, monarch']] +-- lin king_1_N = 'مَلَك_N' ; -- 1462 [['angel']] +lin king_1_N = 'مَلِك_N' ; -- 11923 [['king, sovereign, monarch']] -- lin king_1_N = 'مَلَك_1_N' ; -- 14484 [['possession, property'], ['food and water, resources; anything which regulates, maintains, or sustains; essentials, supplies, utilities'], ['foundation of ones existence'], ['foundation of ones existence', 'agent or effective cause']] -- lin king_1_N = 'مِلْك_N' ; -- 117902 [['verbal noun of مَلَكَ (malaka) (form I)'], ['property, possession, goods and chattels, fortune, wealth'], ['estate'], ['real estate, landed property']] -- lin king_1_N = 'مُلْك_N' ; -- 117903 [['verbal noun of مَلَكَ (malaka) (form I)'], ['rule, reign, supreme authority, dominion, dominance, sway, power'], ['sovereignty, kingship, royalty'], ['monarchy']] diff --git a/src/finnish/CatFin.gf b/src/finnish/CatFin.gf index 7e93e5b41..849e8ad6a 100644 --- a/src/finnish/CatFin.gf +++ b/src/finnish/CatFin.gf @@ -97,7 +97,7 @@ concrete CatFin of Cat = CommonX ** open ResFin, StemFin, Prelude in { N2 = SNoun ** {c2 : Compl ; isPre : Bool ; postmod : Number => Str} ; N3 = SNoun ** {c2,c3 : Compl ; isPre,isPre2 : Bool} ; PN = SPN ; - LN = SPN ** {n : Number} ; + LN = SPN ** {n : Number ; extCase : Bool} ; -- extCase=True -> Adessive, Ablative, Allative GN = SPN ** {g : Sex} ; SN = {s : Sex => SPN; pl : SPN} ; diff --git a/src/finnish/ConstructionFin.gf b/src/finnish/ConstructionFin.gf index 0d7e3f327..047cb2638 100644 --- a/src/finnish/ConstructionFin.gf +++ b/src/finnish/ConstructionFin.gf @@ -74,9 +74,10 @@ lin yearAdv y = SyntaxFin.mkAdv (prePrep nominative "vuonna") y ; dayMonthAdv d m = ParadigmsFin.mkAdv ((mkUtt d).s ++ BIND ++ "." ++ (mkUtt (mkNP m)).s) ; monthYearAdv m y = SyntaxFin.mkAdv in_Prep (mkNP (mkNP m) (SyntaxFin.mkAdv (casePrep nominative) y)) ; ----- dayMonthYearAdv d m y = ----- lin Adv {s = d.s ! R.NPCase R.Nom ++ BIND ++ "." ++ m.s ! R.NCase R.Sg R.Part ++ y.s ! R.NPCase R.Nom} ; - + dayMonthYearAdv d m y = + ParadigmsFin.mkAdv ((mkUtt d).s ++ BIND ++ "." ++ + (SyntaxFin.mkAdv part_Prep (mkNP m)).s ++ + (SyntaxFin.mkAdv (casePrep nominative) y).s) ; intYear = symb ; intMonthday = symb ; diff --git a/src/finnish/NamesFin.gf b/src/finnish/NamesFin.gf index 8ecbf92f1..3bc888844 100644 --- a/src/finnish/NamesFin.gf +++ b/src/finnish/NamesFin.gf @@ -32,12 +32,8 @@ lin UseLN, PlainLN = \ln -> { isPron = False ; isNeg = False } ; -lin InLP ln = { - s = appCompl True Pos ln.c { s = snoun2np ln.n ln ; - a = agrP3 ln.n ; - isPron = False ; - isNeg = False - } - } ; +lin InLN ln = + let c = case ln.extCase of {True => Adess ; False => Iness} + in {s = ln.s ! c} ; } diff --git a/src/finnish/ParadigmsFin.gf b/src/finnish/ParadigmsFin.gf index 2d4c9ca93..c44570a61 100644 --- a/src/finnish/ParadigmsFin.gf +++ b/src/finnish/ParadigmsFin.gf @@ -843,10 +843,14 @@ mkVS = overload { } ; mkLN = overload { - mkLN : Str -> LN = \s -> lin LN (snoun2spn (mk1N s) ** {n = Sg}) ; - mkLN : Str -> Number -> LN = \s,n -> lin LN (snoun2spn (mk1N s) ** {n = n}) ; - mkLN : N -> LN = \noun -> lin LN (snoun2spn noun ** {n = Sg}) ; - mkLN : N -> Number -> LN = \noun,n -> lin LN (snoun2spn noun ** {n = n}) ; + mkLN : Str -> LN = \s -> lin LN (snoun2spn (mk1N s) ** {n = Sg ; extCase = False}) ; + mkLN : Str -> Number -> LN = \s,n -> lin LN (snoun2spnGen (mk1N s) n ** {n = n ; + extCase = case n of {Pl => True ; Sg => False}}) ; -- default case for Sg is In, for Pl is On + mkLN : N -> LN = \noun -> lin LN (snoun2spn noun ** {n = Sg ; extCase = False}) ; + mkLN : N -> Number -> LN = \noun,n -> lin LN (snoun2spnGen noun n ** {n = n ; + extCase = case n of {Pl => True ; Sg => False}}) ; + mkLN : Str -> Number -> Bool -> LN = \s,n,c -> lin LN (snoun2spnGen (mk1N s) n ** {n = n ; extCase = c}) ; + mkLN : N -> Number -> Bool -> LN = \noun,n,c -> lin LN (snoun2spnGen noun n ** {n = n ; extCase = c}) ; } ; mkGN = overload { diff --git a/src/finnish/StemFin.gf b/src/finnish/StemFin.gf index 00eb3558e..5237e55bf 100644 --- a/src/finnish/StemFin.gf +++ b/src/finnish/StemFin.gf @@ -38,7 +38,9 @@ oper SPN : Type = {s : Case => Str} ; - snoun2spn : SNoun -> SPN = \n -> {s = \\c => n.s ! NCase Sg c} ; + + snoun2spn : SNoun -> SPN = \n -> snoun2spnGen n Sg ; + snoun2spnGen : SNoun -> Number -> SPN = \n,nb -> {s = \\c => n.s ! NCase nb c} ; exceptNomSNoun : SNoun -> Str -> SNoun = \noun,nom -> { s = table { diff --git a/src/malay/AdjectiveMay.gf b/src/malay/AdjectiveMay.gf index bee168c43..e203fec28 100644 --- a/src/malay/AdjectiveMay.gf +++ b/src/malay/AdjectiveMay.gf @@ -59,6 +59,7 @@ concrete AdjectiveMay of Adjective = CatMay ** open ResMay, Prelude in { -- : AdA -> AP -> AP ; -- AdAP ada ap = ap ** { } ; + -- It can also be postmodified by an adverb, typically a prepositional phrase. diff --git a/src/malay/AdverbMay.gf b/src/malay/AdverbMay.gf index d7b65fd70..15465cab1 100644 --- a/src/malay/AdverbMay.gf +++ b/src/malay/AdverbMay.gf @@ -20,9 +20,13 @@ lin --AdAdv : AdA -> Adv -> Adv ; -- very quickly -- AdAdv ada adv = adv ** -- Like adverbs, adadjectives can be produced by adjectives. + AdAdv ada adv = adv ** { + s = ada.s ++ adv.s ; + } ; -- : A -> AdA ; -- extremely -- PositAdAAdj a = { } ; + -- PositAdAAdj a = {s = a.s} ; -- Subordinate clauses can function as adverbs. diff --git a/src/malay/ExtendMay.gf b/src/malay/ExtendMay.gf index a646139c3..d72a25ce9 100644 --- a/src/malay/ExtendMay.gf +++ b/src/malay/ExtendMay.gf @@ -8,6 +8,7 @@ concrete ExtendMay of Extend = CatMay , ListVPI -- infinitive VP's (TODO: with anteriority and polarity) , MkVPS , PredVPS, RelVPS, QuestVPS, SQuestVPS + , PassVPSlash, PassAgentVPSlash -- excluded because RGL funs needed for them not implemented yet , PredAPVP @@ -79,6 +80,7 @@ concrete ExtendMay of Extend = CatMay PastPartAP vp = { s = linVP vp } ; + -- GenModNP : Num -> NP -> CN -> NP ; -- this man's car(s) GenModNP n np cn = variants {}; @@ -100,6 +102,22 @@ concrete ExtendMay of Extend = CatMay ByVP vp = cc2 by8means_Prep (GerundAdv vp) ; + -- PassVPSlash : VPS -> VP ; + -- be begged to sleep + PassVPSlash vps = vps ** { + s = \\vf,pol => vps.s ! Passive ! pol ++ vps.adjCompl; + }; + + -- PassAgentVPSlash : VPSlash -> NP -> VP ; -- be begged by her to go + PassAgentVPSlash vps np = { + s = \\vf,pol => vps.s ! Passive ! pol ++ vps.adjCompl ++ (applyPrep by8agent_Prep np); + }; + -- PassAgentVPSlash vps np = { + -- s = \\vf,pol => vps.s ! Passive ! pol ++ (applyPrep by8agent_Prep np) ; + -- }; + + + -- MkVPS2 : Temp -> Pol -> VPSlash -> VPS2 ; -- has loved -- ConjVPS2 : Conj -> [VPS2] -> VPS2 ; -- has loved and now hates -- ComplVPS2 : VPS2 -> NP -> VPS ; -- has loved and now hates that person diff --git a/src/malay/LexiconMay.gf b/src/malay/LexiconMay.gf index effc63b48..6ca8163b7 100644 --- a/src/malay/LexiconMay.gf +++ b/src/malay/LexiconMay.gf @@ -27,7 +27,7 @@ lin bank_N = mkN "bank" ; lin beautiful_A = mkA "cantik" ; -- lin become_VA = mkVA "jadi" ; lin beer_N = mkN "bir" ; --- lin beg_V2V = mkV2 "" ; +lin beg_V2V = mkV2 "rayu" ; -- lin belly_N = mkN "" ; lin big_A = mkA "besar" ; lin bike_N = mkN "basikal" ; @@ -95,8 +95,9 @@ lin day_N = mkN "hari" ; -- lin doctor_N = mkN "" ; lin dog_N = mkN "anjing" ; lin door_N = mkN "pintu" ; -lin drink_V2 = let drink' : V2 = mkV2 "minum" in drink' ** { - s = \\_ => "minum" ; +lin drink_V2 = let drink' : V2 = mkV2 "minum" in drink' ** { s = table { + Passive => "diminum" ; + _ => "minum"} ; }; -- lin dry_A = mkA "" ; -- lin dull_A = mkA "" ; @@ -108,7 +109,9 @@ lin drink_V2 = let drink' : V2 = mkV2 "minum" in drink' ** { -- lin ear_N = mkN "" ; -- lin earth_N = mkN "" ; lin eat_V2 = let eat' : V2 = mkV2 "makan" in eat' ** { - s = \\_ => "makan" ; + s = table { + Passive => "dimakan" ; + _ => "makan"} ; }; -- lin egg_N = mkN "" ; -- lin empty_A = mkA "" ; @@ -208,15 +211,16 @@ lin king_N = mkN "raja" ; -- lin language_N = mkN "" ; -- lin laugh_V = mkV "" ; -- lin leaf_N = mkN "" ; -lin learn_V2 = mkV2 (prefixV (mkV "ajar" Ber)) emptyPrep ; +lin learn_V2 = mkV2 (prefixV (mkV "belajar" NoPrefix)) emptyPrep ; -- lin leather_N = mkN "" ; -- lin leave_V2 = mkV2 "" ; -- lin leg_N = mkN "" ; -- lin lie_V = mkV "" ; lin like_V2 = let like' : V2 = mkV2 "suka" in like' ** { - s = \\_ => "suka" ; - passive = "disukai" ; -} ; + s = table { + Passive => "disukai" ; + _ => "suka"} ; +}; -- lin listen_V2 = mkV2 "" ; -- lin live_V = mkV ""; -- lin liver_N = mkN "" ; @@ -224,11 +228,12 @@ lin long_A = mkA "panjang" ; -- lin lose_V2 = mkV2 "" ; -- lin louse_N = mkN "" ; -- lin love_N = mkN "" ; --- lin love_V2 = let love' : V2 = mkV2 "cinta" in love' ** { --- s = \\_ => "mencintai" ; --- passive = "dicintai" ; --- } ; -lin love_V2 = mkV4 "cinta" "i"; +lin love_V2 = let love' : V2 = mkV2 "cinta" in love' ** { + s = table { + Passive => "dicintai" ; + _ => "mencintai" }; +}; +-- lin love_V2 = mkV4 "cinta" "i"; ---- -- M @@ -288,7 +293,7 @@ lin queen_N = mkN "ratu" ; -- lin radio_N = mkN "" ; lin rain_N = mkN "hujan" ; lin rain_V0 = mkV "hujan" ; -lin read_V2 = mkV2 "baca" ; +lin read_V2 = mkV2 (prefixV (mkV "baca" Meng)) emptyPrep ; -- lin ready_A = mkA "" ; -- lin reason_N = mkN "" ; -- lin red_A = mkA "" ; @@ -336,7 +341,7 @@ lin sing_V = mkV "nyanyi" ; -- lin sit_V = mkV "" ; -- lin skin_N = mkN "" ; -- lin sky_N = mkN "" ; --- lin sleep_V = mkV "" ; +lin sleep_V = mkV "tidur" ; lin small_A = mkA "kecil" ; -- lin smell_V = mkV "" ; -- lin smoke_N = mkN "" ; @@ -345,7 +350,8 @@ lin small_A = mkA "kecil" ; -- lin snow_N = mkN "" ; -- lin sock_N = mkN "" ; lin song_N = mkN "lagu" ; --- lin speak_V2 = mkV2 "" ; +lin speak_V2 = mkV2 (prefixV (mkV "cakap" Ber)) emptyPrep ; + -- lin spit_V = mkV "" ; -- lin split_V2 = mkV2 "" ; -- lin squeeze_V2 = mkV2 "" ; @@ -372,7 +378,7 @@ lin stop_V = mkV "henti" ; -- lin table_N = mkN "" ; -- lin tail_N = mkN "" ; lin talk_V3 = mkV3 (mkV "cakap" Ber) (mkPrep "tentang") (mkPrep "dengan") ; -lin teach_V2 = mkV2 "ajar" ; +lin teach_V2 = mkV2 (prefixV (mkV "ajar" Meng)) emptyPrep; -- lin teacher_N = mkN "" ; -- lin television_N = mkN "" ; -- lin thick_A = mkA "" ; @@ -402,7 +408,7 @@ lin ugly_A = mkA "jelek" ; -- W - Y -- lin wait_V2 = mkV2 "" ; -lin walk_V = mkV "jalan" ; +lin walk_V = (prefixV (mkV "jalan" Ber)) ; -- lin war_N = mkN "" ; -- lin warm_A = mkA "" ; -- lin wash_V2 = mkV2 "" ; diff --git a/src/malay/NounMay.gf b/src/malay/NounMay.gf index 72d85a764..be459693d 100644 --- a/src/malay/NounMay.gf +++ b/src/malay/NounMay.gf @@ -13,7 +13,7 @@ concrete NounMay of Noun = CatMay ** open ResMay, Prelude in { -- TODO classifier is necessary if numeral comes after noun. See Mintz p. 298. -- ++ if_then_Str (isNum det.n) "buah" [] -- TODO store classifier in CN ++ case det.poss of { - Bare => cn.s ! NF (toNum det.n) poss ; + Bare => cn.s ! NF (toNum det.n) det.poss ; _ => cn.s ! NF (toNum det.n) det.poss -- TODO check if this make sense } ++ det.s ++ cn.heavyMod ; } ; diff --git a/src/malay/ParadigmsMay.gf b/src/malay/ParadigmsMay.gf index dd22ff332..18cb71f78 100644 --- a/src/malay/ParadigmsMay.gf +++ b/src/malay/ParadigmsMay.gf @@ -75,12 +75,16 @@ oper -- mkVQ : Str -> VQ -- = \s -> lin VQ (regV s) ; - + mkV2A : overload { + mkV2A : Str -> V2A ; + } ; -- -- mkV2A : Str -> V2A -- = \s -> lin V2A (regV s ** {c2 = noPrep}) ; - -- mkV2Q : Str -> V2Q - -- = \s -> lin V2Q (regV s ** {c2 = noPrep}) ; + mkV2Q : overload { + mkV2Q : Str -> V2Q ; + mkV2Q : V -> Prep -> V2Q ; + } ; ----- diff --git a/src/malay/ParamMay.gf b/src/malay/ParamMay.gf index 5ea50b375..af9f0cd3b 100644 --- a/src/malay/ParamMay.gf +++ b/src/malay/ParamMay.gf @@ -27,8 +27,11 @@ oper prefix : Prefix -> Str -> Str = \p -> case p of { Meng => prefixMeng ; - Ber => prefixBer + Ber => prefixBer ; + NoPrefix => prefixNone } ; + + prefixNone : Str -> Str = \belajar -> belajar ; prefixMeng : Str -> Str = \makan -> case makan of { @@ -63,8 +66,6 @@ oper } ; prefixBer : Str -> Str = \jalan -> case jalan of { - -- Exception - "ajar" => "belajar" ; -- Drop the r (#c + "er" + _ -- be+kerja @@ -149,6 +150,7 @@ param Prefix = Meng | Ber + | NoPrefix ; -- TODO more? -------------------------------------------------------------------------------- diff --git a/src/malay/PhraseMay.gf b/src/malay/PhraseMay.gf index 45e296443..6bba6689d 100644 --- a/src/malay/PhraseMay.gf +++ b/src/malay/PhraseMay.gf @@ -7,9 +7,9 @@ concrete PhraseMay of Phrase = CatMay ** open Prelude, ResMay in { UttQS qs = qs ; UttIAdv iadv = iadv ; UttNP np = {s = np.s ! Bare} ; - UttIP ip = {s = ip.sp ! NF Sg Bare} ; + UttIP ip = {s = ip.s ! Bare} ; UttImpSg pol imp = {s = pol.s ++ imp.s ! Sg ! pol.p } ; - UttImpPol pol imp = {s = pol.s ++ imp.s ! Sg ! pol.p} ; + UttImpPol pol imp = {s = "tolong" ++ pol.s ++ imp.s ! Sg ! pol.p} ; UttImpPl pol imp = {s = pol.s ++ imp.s ! Pl ! pol.p} ; UttVP vp = {s = linVP vp} ; UttAP ap = {s = ap.s} ; diff --git a/src/malay/QuestionMay.gf b/src/malay/QuestionMay.gf index 17d03521c..42a5fa39e 100644 --- a/src/malay/QuestionMay.gf +++ b/src/malay/QuestionMay.gf @@ -8,9 +8,18 @@ concrete QuestionMay of Question = CatMay ** open -- determiners, with or without a noun. lin -- : IDet -> CN -> IP ; -- which five songs - IdetCN idet cn = NM.DetCN idet cn ** { - sp = \\nf => idet.sp ! nf ++ cn.s ! nf - } ; +-- IdetCN idet cn = NM.DetCN idet cn ** { +-- sp = \\nf => idet.sp ! nf ++ cn.s ! nf +-- } ; + IdetCN idet cn = emptyNP ** { + s = \\poss => + idet.pr + ++ case idet.poss of { + Bare => cn.s ! NF (toNum idet.n) idet.poss ; + _ => cn.s ! NF (toNum idet.n) idet.poss -- TODO check if this make sense + } ++ idet.s ++ cn.heavyMod ; + sp = \\nf => idet.sp ! nf ++ cn.s ! nf; + } ; -- : IDet -> IP ; -- which five IdetIP idet = NM.DetNP idet ** {sp = idet.sp}; diff --git a/src/malay/ResMay.gf b/src/malay/ResMay.gf index 65863162b..9fd534333 100644 --- a/src/malay/ResMay.gf +++ b/src/malay/ResMay.gf @@ -230,7 +230,7 @@ oper -- VV : Type = Verb ** {vvtype : VVForm} ; regVerb : Str -> Prefix -> Verb = \str,p -> - mkVerb str (prefix p str) ("di" + str) (str + "kan") ; + mkVerb str (prefix p str) ("di" + str) (str ++ BIND ++ "kan") ; mkVerb : (makan, memakan, dimakan, makankan : Str) -> Verb = \rt,act,pass,imp -> { s = table { @@ -251,7 +251,7 @@ oper mkVerb4 : Verb -> Preposition -> Str -> Verb4 = \v,pr,str -> v ** { s = \\_ => v.s ! Active ++ str; c2 = pr ; - passive = "di" ++ BIND ++ v.s ! Root ++ str + -- passive = "di" ++ BIND ++ v.s ! Root ++ str } ; copula : Verb = {s = \\_ => "ada"} ; -- TODO @@ -292,8 +292,11 @@ oper useV : Verb -> VerbPhrase = \v -> v ** { s = \\vf,pol => verbneg pol ++ v.s ! vf } ; - + useComp : Str -> VerbPhrase = \s -> { + s = \\vf,pol => verbneg pol ++ s ; + } ; + useCompN : Str -> VerbPhrase = \s -> { s = \\vf,pol => nounneg pol ++ s ; } ; diff --git a/src/malay/SentenceMay.gf b/src/malay/SentenceMay.gf index d09387f9c..ddda07696 100644 --- a/src/malay/SentenceMay.gf +++ b/src/malay/SentenceMay.gf @@ -95,7 +95,7 @@ lin oper advS : (comma : Str) -> Adverb -> S -> S = \comma,a,sent -> sent ** { - s = sent.s ++ comma ++ a.s + s = a.s ++ comma ++ sent.s } ; } diff --git a/src/malay/StructuralMay.gf b/src/malay/StructuralMay.gf index 14a10deaf..567149fd9 100644 --- a/src/malay/StructuralMay.gf +++ b/src/malay/StructuralMay.gf @@ -47,9 +47,9 @@ lin or_Conj = {s2 = "atau" ; s1 = [] ; n = Sg} ; -- lin both7and_DConj = mkConj "" "" pl ; -- lin either7or_DConj = {s2 = \\_ => "" ; s1 = "" ; n = Sg} ; -- --- lin but_PConj = ss "" ; +lin but_PConj = ss "tetapi" ; -- lin otherwise_PConj = ss "" ; --- lin therefore_PConj = ss "" ; +lin therefore_PConj = ss "oleh itu" ; ----------------- @@ -104,7 +104,7 @@ lin by8agent_Prep = mkPrep "oleh" ; -- for pronoun agent, see Mintz p. 170, 5.4. lin by8means_Prep = mkPrep "dengan" ; -- lin during_Prep = mkPrep ; -- lin except_Prep = mkPrep ; --- lin for_Prep = mkPrep ; +lin for_Prep = mkPrep "untuk" ; -- lin from_Prep = mkPrep "" ; -- lin in8front_Prep = mkPrep "" ; lin in_Prep = mkPrep "di" ; diff --git a/src/malay/VerbMay.gf b/src/malay/VerbMay.gf index 64b6ccbb4..4ab5da38d 100644 --- a/src/malay/VerbMay.gf +++ b/src/malay/VerbMay.gf @@ -1,4 +1,4 @@ -concrete VerbMay of Verb = CatMay ** open ResMay, AdverbMay, Prelude in { +concrete VerbMay of Verb = CatMay ** open ResMay, AdverbMay, StructuralMay, Prelude in { lin @@ -16,7 +16,7 @@ lin -- : VV -> VP -> VP ; ComplVV vv vp = vp ** useV { - s = \\vf => vv.s ++ linVP vp + s = \\vf => vv.s ++ vp.s ! Root! Pos; } ; -- : VA -> AP -> VP ; -- they become red @@ -56,7 +56,13 @@ lin -- : V3 -> NP -> VPSlash ; -- give (it) to her Slash3V3 v3 iobj = useV { - s = \\vf => v3.s ! vf ++ applyPrep v3.c3 emptyNP ++ iobj.s ! Bare; + s = \\vf => v3.s ! vf ++ + case iobj.a of { + IsPron p => applyPrep v3.c2 emptyNP ++ applyPrep v3.c3 iobj ; + _ => applyPrep v3.c2 iobj ++ applyPrep v3.c3 emptyNP + } + -- ++ applyPrep v3.c2 iobj ++ + -- applyPrep v3.c3 emptyNP ; --iobj.s ! Bare -- applyPrep v3.c3 iobj -- TODO check if this works for all -- probably not } ** { c2 = v3.c2 ;-- Now the VPSlash is missing only the direct object @@ -72,20 +78,24 @@ lin } ; -- : V2V -> VP -> VPSlash ; -- beg (her) to go - SlashV2V v2 vp = vp ** useV { - s = \\vf => v2.s ! vf ++ (linVP vp); + SlashV2V v2 vp = useV { + s = \\vf => v2.s ! vf; } ** { - c2 = v2.c2; - adjCompl = [] ; + c2 = v2.c2 ; + adjCompl = for_Prep.s ++ vp.s ! Root ! Pos; } ; - -- : V2S -> S -> VPSlash ; -- answer (to him) that it is good SlashV2S v2 s = useV v2 ** { c2 = v2.c2; adjCompl = "yang" ++ s.s ; -- TODO check /Inari } ; + -- : V2Q -> QS -> VPSlash ; -- ask (him) who came + -- SlashV2Q v2q qs = useV v2q ** { + -- s = + -- }; + {- -- : V2S -> S -> VPSlash ; -- answer (to him) that it is good @@ -102,12 +112,9 @@ lin -- : VPSlash -> NP -> VP ComplSlash vps np = vps ** { s = \\vf,pol => - vps.s ! vf ! pol - ++ applyPrep vps.c2 np ++ vps.adjCompl - -- s = \\vf,pol => vps.s ! vf ! pol ++ applyPrep vps.c2 np + vps.s ! vf ! pol ++ applyPrep vps.c2 np ++ vps.adjCompl } ; - -- : VV -> VPSlash -> VPSlash ; SlashVV vv vps = ComplVV vv vps ** { c2 = vps.c2 ; -- like ComplVV except missing object @@ -141,7 +148,12 @@ lin AdVVPSlash adv vps = vps ** { adv = adv.s ++ vps.adv } ; -} -- : VP -> Prep -> VPSlash ; -- live in (it) - -- VPSlashPrep vp prep = vp ** {c2 = prep} ; + VPSlashPrep vp prep = vp ** { + s = \\vf,pol => vp.s ! vf ! pol ; + } ** { + c2 = prep ; + adjCompl =[] ; + } ; --2 Complements to copula @@ -152,10 +164,10 @@ lin CompAP ap = useComp ap.s ; -- : CN -> Comp ; - CompCN cn = useComp (cn.s ! NF Sg Bare) ; + CompCN cn = useCompN (cn.s ! NF Sg Bare) ; -- NP -> Comp ; - CompNP np = useComp (np.s ! Bare) ; + CompNP np = useCompN (np.s ! Bare) ; -- : Adv -> Comp ; --"Both bukan and tidak may negate prepositional phrases. The choice of either diff --git a/src/malay/unittest/complements.gftest b/src/malay/unittest/complements.gftest index 9e07837e7..f5becfcbe 100644 --- a/src/malay/unittest/complements.gftest +++ b/src/malay/unittest/complements.gftest @@ -4,6 +4,7 @@ LangMay: dia memberi kucing kepadaku Lang: UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron he_Pron) (ComplSlash (Slash3V3 give_V3 (UsePron i_Pron)) (MassNP (UseN cat_N))))) LangMay: dia memberi aku kucing +-- dia memberi aku kepada kucing -- Sentence complements diff --git a/src/malay/unittest/passive.gftest b/src/malay/unittest/passive.gftest index d0df9e0fa..23d192a7f 100644 --- a/src/malay/unittest/passive.gftest +++ b/src/malay/unittest/passive.gftest @@ -16,4 +16,4 @@ LangMay: buku itu dibaca Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant that_Quant NumSg) (UseN book_N)) (AdvVP (PassV2 read_V2) (PrepNP to_Prep (UsePron youSg_Pron)))) LangEng: that book is read to you -LangMay: buku itu dibacakan kepada kamu \ No newline at end of file +LangMay: buku itu dibaca kepadamu \ No newline at end of file diff --git a/src/malay/unittest/questions.gftest b/src/malay/unittest/questions.gftest index 76c478363..78634e9d7 100644 --- a/src/malay/unittest/questions.gftest +++ b/src/malay/unittest/questions.gftest @@ -8,7 +8,7 @@ LangMay: kamu suka lagu-lagu yang mana Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPres ASimul) PPos (QuestSlash (IdetCN how8many_IDet (UseN cat_N)) (SlashVP (UsePron youPl_Pron) (SlashV2a have_V2))))) NoVoc LangEng: how many cats do you have -LangMay: kamu ada berapa kucing +LangMay: kamu ada berapa banyak kucing Lang: PhrUtt NoPConj (UttIP (IdetCN how8many_IDet (UseN cat_N))) NoVoc LangEng: how many cats @@ -70,4 +70,12 @@ LangMay: mengapa dia makan daging Lang: UseQCl (TTAnt TPast ASimul) PPos (QuestVP whatSg_IP (UseComp (CompNP (DetCN (DetQuant DefArt NumSg) (RelCN (UseN meat_N) (UseRCl (TTAnt TPast ASimul) PPos (RelVP IdRP (PassV2 eat_V2)))))))) LangEng: what was the meat that was eaten -LangMay: apa daging yang dimakan \ No newline at end of file +LangMay: apa daging yang dimakan + +AllEngAbs: (PassAgentVPSlash (SlashV2V beg_V2V (UseV go_V)) (UsePron i_Pron)) +AllEng: be begged to go by me +AllMay: dirayu untuk pergi olehku + +AllEngAbs: (PassVPSlash (SlashV2V beg_V2V (UseV sleep_V))) +AllEng: be begged to sleep +AllMay: dirayu untuk tidur \ No newline at end of file diff --git a/src/malay/unittest/relative.gftest b/src/malay/unittest/relative.gftest index be6748d60..552309cca 100644 --- a/src/malay/unittest/relative.gftest +++ b/src/malay/unittest/relative.gftest @@ -49,7 +49,7 @@ LangMay: bapanya memberi buku kepadanya -- 2. A book that her father gave her -- TODO: would it be better as "buku yang bapanya beri kepadanya"? (Or any other variation?) Lang: DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (ComplN2 father_N2 (UsePron she_Pron))) (Slash3V3 give_V3 (UsePron she_Pron)))))) -LangMay: buku yang bapanya memberi kepada dia +LangMay: buku yang bapanya memberi kepadanya -- The preposition "kepada" comes from the definition of give_V3 in LexiconMay.gf. -- If "buku yang bapanya beri kepadanya" is correct in general, but sometimes @@ -64,7 +64,7 @@ LangMay: buku yang bapanya memberi kepada dia -- I want to read the book that my father gave me -- TODO check: would "aku mahu baca buku yang bapaku beri kepadaku" be better? Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashVV want_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (ComplN2 father_N2 (UsePron i_Pron))) (Slash3V3 give_V3 (UsePron i_Pron))))))))) -LangMay: aku mahu membaca buku yang bapaku memberi kepada aku +LangMay: aku mahu membaca buku yang bapaku memberi kepadaku -- I want to read the book that my father read Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashVV want_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (ComplN2 father_N2 (UsePron i_Pron))) (SlashV2a read_V2)))))))) diff --git a/src/malay/unittest/tenses.gftest b/src/malay/unittest/tenses.gftest index da1b8df10..c0f5df543 100644 --- a/src/malay/unittest/tenses.gftest +++ b/src/malay/unittest/tenses.gftest @@ -13,8 +13,9 @@ Lang: UseCl (TTAnt TFut ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumSg) (Use LangEng: the cat will walk LangMay: kucing akan berjalan -Lang: PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (UseV go_V)) (UsePron she_Pron)) +Lang: UttS (UseCl (TTAnt TPast ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2V beg_V2V (UseV go_V)) (DetNP (DetQuant (PossPron she_Pron) NumPl))))) LangEng: I begged her to go +LangMay: aku merayu dia untuk pergi ------------- -- Conditions diff --git a/src/malay/unittest/verbal_affixes.gftest b/src/malay/unittest/verbal_affixes.gftest index 26e1c5dfd..d9e17d4d6 100644 --- a/src/malay/unittest/verbal_affixes.gftest +++ b/src/malay/unittest/verbal_affixes.gftest @@ -108,14 +108,14 @@ LangMay: sekiranya tidak hujan sekarang , aku akan berjalan Lang: UttImpSg PPos (ImpVP (ComplSlash (SlashV2a open_V2) (DetCN (DetQuant DefArt NumSg) (UseN door_N)))) LangEng: open the door -LangMay: buka pintu +LangMay: bukakan pintu Lang: UttImpSg PNeg (ImpVP (ComplSlash (SlashV2a open_V2) (DetCN (DetQuant DefArt NumSg) (UseN door_N)))) LangEng: don't open the door -LangMay: jangan buka pintu +LangMay: jangan bukakan pintu Lang: UttImpPol PPos (ImpVP (ComplSlash (SlashV2a open_V2) (DetCN (DetQuant DefArt NumSg) (UseN door_N)))) LangEng: open the door -LangMay: bukakan pintu +LangMay: tolong bukakan pintu ---------------------------------------- -- Questions