From c98f9a84d871f61719cc922b2db42006836a300b Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Tue, 18 Aug 2020 20:57:15 +0200 Subject: [PATCH] (May) ComplSlash, prepositions and some V2s --- src/malay/LexiconMay.gf | 2 +- src/malay/ParadigmsMay.gf | 9 ++++----- src/malay/ResMay.gf | 9 +++++++-- src/malay/StructuralMay.gf | 6 +++--- src/malay/VerbMay.gf | 16 ++++++++++------ 5 files changed, 25 insertions(+), 17 deletions(-) diff --git a/src/malay/LexiconMay.gf b/src/malay/LexiconMay.gf index d60ed0e8..221b1b1a 100644 --- a/src/malay/LexiconMay.gf +++ b/src/malay/LexiconMay.gf @@ -204,7 +204,7 @@ lin house_N = mkN "rumah" ; -- lin language_N = mkN "" ; -- lin laugh_V = mkV "" ; -- lin leaf_N = mkN "" ; -lin learn_V2 = mkV2 "ajar" Ber ; +lin learn_V2 = mkV2 (mkV "ajar" Ber) emptyPrep ; -- lin leather_N = mkN "" ; -- lin leave_V2 = mkV2 "" ; -- lin leg_N = mkN "" ; diff --git a/src/malay/ParadigmsMay.gf b/src/malay/ParadigmsMay.gf index 9bbd3575..73338494 100644 --- a/src/malay/ParadigmsMay.gf +++ b/src/malay/ParadigmsMay.gf @@ -34,9 +34,8 @@ oper mkV2 : overload { - mkV2 : (root : Str) -> V2 ; - mkV2 : (root : Str) -> Prefix -> V -- Root and prefix - -- TODO prepositions + mkV2 : (root : Str) -> V2 ; -- The prefix is meng and no preposition + mkV2 : V -> Prep -> V2 ; -- V and Prep } ; -- mkV3 : overload { @@ -108,8 +107,8 @@ oper } ; mkV2 = overload { - mkV2 : Str -> V2 = \v2 -> lin V2 (mkVerb v2 Meng) ; - mkV2 : Str -> Prefix -> V2 = \v2,p -> lin V2 (mkVerb v2 p) + mkV2 : Str -> V2 = \v2 -> lin V2 ((mkVerb v2 Meng) ** {c2 = emptyPrep}) ; + mkV2 : V -> Prep -> V2 = \v,p -> lin V2 (v ** {c2 = p}) } ; -- -- mkV3 = overload { diff --git a/src/malay/ResMay.gf b/src/malay/ResMay.gf index 671da4b9..067ffa12 100644 --- a/src/malay/ResMay.gf +++ b/src/malay/ResMay.gf @@ -93,6 +93,11 @@ oper obj = \\p => dengan + poss2str (Poss p) } ; + emptyPrep : Preposition = { + s = [] ; + obj = \\_ => [] + } ; + -------------------------------------------------------------------------------- -- Adjectives @@ -108,8 +113,8 @@ oper Verb : Type = { s : VForm => Str } ; - Verb2 : Type = Verb ; --** {c2 : Preposition} ; - Verb3 : Type = Verb2 ; -- ** {c3 : Preposition} ; + Verb2 : Type = Verb ** {c2 : Preposition} ; + Verb3 : Type = Verb2 ** {c3 : Preposition} ; -- VV : Type = Verb ** {vvtype : VVForm} ; diff --git a/src/malay/StructuralMay.gf b/src/malay/StructuralMay.gf index e104b39d..ad37a6de 100644 --- a/src/malay/StructuralMay.gf +++ b/src/malay/StructuralMay.gf @@ -103,14 +103,14 @@ oper -- lin for_Prep = mkPrep ; -- lin from_Prep = mkPrep "" ; -- lin in8front_Prep = mkPrep "" ; --- lin in_Prep = mkPrep "" ; +lin in_Prep = mkPrep "di" ; -- lin on_Prep = mkPrep "" ; -- lin part_Prep = mkPrep ; -- lin possess_Prep = mkPrep ; -- lin through_Prep = mkPrep ; --- lin to_Prep = mkPrep ; +lin to_Prep = mkPrep "ke" ; -- lin under_Prep = mkPrep "" ; --- lin with_Prep = mkPrep "" ; +lin with_Prep = mkPrep "dengan" ; -- lin without_Prep = mkPrep "" ; diff --git a/src/malay/VerbMay.gf b/src/malay/VerbMay.gf index fa624749..c41cd2ed 100644 --- a/src/malay/VerbMay.gf +++ b/src/malay/VerbMay.gf @@ -35,10 +35,10 @@ lin -} -------- -- Slash -{- - -- : V2 -> VPSlash - SlashV2a = useVc ; + -- : V2 -> VPSlash + SlashV2a v2 = v2 ; +{- -- : V3 -> NP -> VPSlash ; -- give it (to her) -- : V3 -> NP -> VPSlash ; -- give (it) to her Slash2V3, @@ -54,9 +54,11 @@ lin SlashV2Q v2q qs = ; -- : V2A -> AP -> VPSlash ; -- paint (it) red - -- : VPSlash -> NP -> VP - ComplSlash = insertComp ; + SlashV2A v2a ap = ; -} + -- : VPSlash -> NP -> VP + ComplSlash vps np = {s = \\vf => vps.s ! vf ++ vps.c2.s ++ np.s} ; + {- -- : VV -> VPSlash -> VPSlash ; -- Just like ComplVV except missing subject! @@ -111,7 +113,9 @@ lin } ; -- : Adv -> Comp ; - -- CompAdv adv = adv ; + CompAdv adv = { + s = \\_ => adv.s ; + } ; -- : VP -- Copula alone; --UseCopula = useV copula ;