diff --git a/src/malay/AdjectiveMay.gf b/src/malay/AdjectiveMay.gf index 2df3e73a..4909f119 100644 --- a/src/malay/AdjectiveMay.gf +++ b/src/malay/AdjectiveMay.gf @@ -4,6 +4,11 @@ concrete AdjectiveMay of Adjective = CatMay ** open ResMay, Prelude in { lin + -- : AP -> Adv -> AP ; -- warm by nature + AdvAP ap adv = ap ** { + s = ap.s ++ adv.s ; + } ; + -- : A -> AP ; PositA a = a ** { compar = [] ; @@ -58,7 +63,6 @@ concrete AdjectiveMay of Adjective = CatMay ** open ResMay, Prelude in { -- It can also be postmodified by an adverb, typically a prepositional phrase. - -- : AP -> Adv -> AP ; -- warm by nature - -- AdvAP ap adv = ap ** {} ; + } diff --git a/src/malay/MissingMay.gf b/src/malay/MissingMay.gf index 44cc5cd0..d1a55f58 100644 --- a/src/malay/MissingMay.gf +++ b/src/malay/MissingMay.gf @@ -9,8 +9,6 @@ oper AdjCN : AP -> CN -> CN = notYet "AdjCN" ; oper AdjDAP : DAP -> AP -> DAP = notYet "AdjDAP" ; oper AdjOrd : Ord -> AP = notYet "AdjOrd" ; oper AdnCAdv : CAdv -> AdN = notYet "AdnCAdv" ; -oper AdvAP : AP -> Adv -> AP = notYet "AdvAP" ; -oper AdvCN : CN -> Adv -> CN = notYet "AdvCN" ; oper AdvIAdv : IAdv -> Adv -> IAdv = notYet "AdvIAdv" ; oper AdvIP : IP -> Adv -> IP = notYet "AdvIP" ; oper AdvNP : NP -> Adv -> NP = notYet "AdvNP" ; @@ -191,7 +189,6 @@ oper but_PConj : PConj = notYet "but_PConj" ; oper butter_N : N = notYet "butter_N" ; oper camera_N : N = notYet "camera_N" ; oper can8know_VV : VV = notYet "can8know_VV" ; -oper can_VV : VV = notYet "can_VV" ; oper cap_N : N = notYet "cap_N" ; oper carpet_N : N = notYet "carpet_N" ; oper ceiling_N : N = notYet "ceiling_N" ; @@ -362,7 +359,6 @@ oper mountain_N : N = notYet "mountain_N" ; oper mouth_N : N = notYet "mouth_N" ; oper much_Det : Det = notYet "much_Det" ; oper music_N : N = notYet "music_N" ; -oper must_VV : VV = notYet "must_VV" ; oper n_unit_CN : Card -> CN -> CN -> CN = notYet "n_unit_CN" ; oper n_units_AP : Card -> CN -> A -> AP = notYet "n_units_AP" ; oper n_units_of_NP : Card -> CN -> NP -> NP = notYet "n_units_of_NP" ; diff --git a/src/malay/NounMay.gf b/src/malay/NounMay.gf index 76142d54..90f0b7d5 100644 --- a/src/malay/NounMay.gf +++ b/src/malay/NounMay.gf @@ -39,7 +39,9 @@ concrete NounMay of Noun = CatMay ** open ResMay, Prelude in { -- s = \\c => v2.s ! ??? ++ np.s ! c } ; ---- -- : NP -> Adv -> NP ; -- Paris today ; boys, such as .. - --AdvNP,ExtAdvNP = \np,adv -> np ** {} ; + AdvNP,ExtAdvNP = \np,adv -> np ** { + s = \\pos => np.s ! pos ++ adv.s + } ; -- : NP -> RS -> NP ; -- Paris, which is here RelNP np rs = np ** { diff --git a/src/malay/ParadigmsMay.gf b/src/malay/ParadigmsMay.gf index 2ffaa712..2d20d248 100644 --- a/src/malay/ParadigmsMay.gf +++ b/src/malay/ParadigmsMay.gf @@ -27,7 +27,9 @@ noPrep : Prep = mkPrep "" ; mkA : (adj : Str) -> A ; } ; - -- mkA2 : Str -> Prep -> A2 ; + mkA2 : overload { + mkA2 : (adj : Str) -> Prep -> A2 ; + } ; --2 Verbs @@ -57,8 +59,10 @@ noPrep : Prep = mkPrep "" ; -- = \s -> lin VA (regV s) ; -- mkVQ : Str -> VQ -- = \s -> lin VQ (regV s) ; - -- mkVS : Str -> VS - -- = \s -> lin VS (regV s) ; + mkVS : overload { + mkV : (root : Str) -> V ; -- Verb that takes meng as a active prefix + mkV : (root : Str) -> Prefix -> V -- Root and prefix + } ; -- -- mkV2A : Str -> V2A -- = \s -> lin V2A (regV s ** {c2 = noPrep}) ; @@ -103,6 +107,12 @@ noPrep : Prep = mkPrep "" ; mkN2 : N -> N2 = \n -> lin N2 (n ** {c2 = dirPrep}) ; } ; + mkN3 = overload { + mkN3 : Str -> N3 = \s -> lin N3 (mkNoun s ** {c2,c3 = dirPrep}) ; + mkN3 : N -> N3 = \n -> lin N3 (n ** {c2,c3 = dirPrep}) ; + mkN3 : N -> Prep -> Prep -> N3 = \n,c2,c3 -> lin N3 (n ** {c2,c3 = dirPrep}) ; + } ; + mkPN = overload { mkPN : Str -> PN = \s -> lin PN {s = \\_ => s} ; } ; @@ -111,6 +121,11 @@ noPrep : Prep = mkPrep "" ; mkA : (adj : Str) -> A = \s -> lin A (mkAdj s) ; } ; + mkA2 = overload { + mkA2 : (adj : Str) -> A = \s -> lin A2 (mkAdj s) ; + mkA2 : A -> Prep -> A = \a,p -> lin A2 (a) ; + } ; + mkV = overload { mkV : Str -> V = \v -> lin V (mkVerb v Ber) ; mkV : Str -> Prefix -> V = \v,p -> lin V (mkVerb v p) diff --git a/src/malay/PhraseMay.gf b/src/malay/PhraseMay.gf index a3a03204..4132faaf 100644 --- a/src/malay/PhraseMay.gf +++ b/src/malay/PhraseMay.gf @@ -11,6 +11,7 @@ concrete PhraseMay of Phrase = CatMay ** open Prelude, ResMay in { UttImpSg pol imp = { s = pol.s ++ imp.s ! Sg ! pol.p } ; UttImpPol pol imp = {s = pol.s ++ imp.s ! Sg ! pol.p} ; UttVP vp = {s = linVP vp} ; + UttAP ap = { s = ap.s } ; {- UttImpSg pol imp = UttImpPl pol imp = @@ -20,7 +21,6 @@ concrete PhraseMay of Phrase = CatMay ** open Prelude, ResMay in { UttAdv adv = {s = } ; UttCN n = {s = } ; UttCard n = {s = } ; - UttAP ap = { s = ap.s ! } ; UttInterj i = i ; -} NoPConj = {s = []} ; diff --git a/src/malay/ResMay.gf b/src/malay/ResMay.gf index 0a621724..cbc33ef4 100644 --- a/src/malay/ResMay.gf +++ b/src/malay/ResMay.gf @@ -60,6 +60,12 @@ oper empty = [] } ; + mkNounPhrase : Str -> NounPhrase = \str -> { + s = \\_ => str ; + a = NotPron ; + empty = [] + } ; + mkIP : Str -> IPhrase = \str -> { s = \\_ => str ; a = NotPron ; diff --git a/src/malay/StructuralMay.gf b/src/malay/StructuralMay.gf index a2cb1cb7..e182f6dc 100644 --- a/src/malay/StructuralMay.gf +++ b/src/malay/StructuralMay.gf @@ -57,13 +57,14 @@ lin and_Conj = {s2 = "dan" ; s1 = [] ; n = Pl} ; lin how8many_IDet = mkIdet "berapa" "berapa banyak" "" Sg True; +lin every_Det = mkDet "semua" "semua" Sg ; -- to check + {-} lin all_Predet = {s = ""} ; lin not_Predet = { s = "" } ; lin only_Predet = { s = "" } ; lin most_Predet = {s = ""} ; -lin every_Det = {s = ""} ; lin few_Det = R.indefDet "" pl ; lin many_Det = R.indefDet "" pl ; lin much_Det = R.indefDet "" sg ; @@ -78,6 +79,9 @@ lin which_IQuant = mkQuant "yang mana" ** {isPre = False} ; ----- -- NP + +lin somebody_NP = mkNounPhrase "seorang" ; --todo + {- lin everybody_NP = defNP "" N.NumPl ; lin everything_NP = defNP "" N.NumSg ; @@ -174,8 +178,8 @@ lin have_V2 = let have' : V2 = mkV2 "ada" in have' ** { passive = "diadakan" ; } ; -- lin can8know_VV = can_VV ; -- can (capacity) --- lin can_VV = mkVV "" ; -- can (possibility) --- lin must_VV = mkVV "" ; +lin can_VV = mkVV "boleh" ; -- can (possibility) +lin must_VV = mkVV "perlu" ; lin want_VV = mkVV "mahu" ; ------ diff --git a/src/malay/VerbMay.gf b/src/malay/VerbMay.gf index 77511c0c..b6985a83 100644 --- a/src/malay/VerbMay.gf +++ b/src/malay/VerbMay.gf @@ -118,6 +118,11 @@ lin s = \\vf,pol => vp.s ! vf ! pol ++ adv.s } ; + -- : AdV -> VP -> VP ; -- always sleep + AdVVP adv vp = vp ** { + s = \\vf,pol => vp.s ! vf ! pol ++ adv.s + } ; + {- -- : VPSlash -> Adv -> VPSlash ; -- use (it) here AdvVPSlash = insertAdv ; @@ -125,9 +130,6 @@ lin -- : VP -> Adv -> VP ; -- sleep , even though ... ExtAdvVP vp adv = ; - -- : AdV -> VP -> VP ; -- always sleep - AdVVP adv vp = vp ** {adv = adv} ; - -- : AdV -> VPSlash -> VPSlash ; -- always use (it) AdVVPSlash adv vps = vps ** { adv = adv.s ++ vps.adv } ; -}