diff --git a/src/somali/LexiconSom.gf b/src/somali/LexiconSom.gf index 585b1fcc3..d36ebd0d1 100644 --- a/src/somali/LexiconSom.gf +++ b/src/somali/LexiconSom.gf @@ -9,7 +9,7 @@ lin add_V3 = mkV3 "dar" ku NoPrep ; -- lin alas_Interj = mkInterj "" ; -- lin already_Adv = mkA "" ; lin animal_N = mkN "xayawaan" ; --- lin answer_V2S = mkV2 "" ; +lin answer_V2S = mkV2S "jawaab" ku ; -- lin apartment_N = mkN "" ; -- lin apple_N = mkN "" ; -- lin art_N = mkN "" ; @@ -252,7 +252,7 @@ lin name_N = mkN "magac" ; -- -- lin oil_N = mkN "" ; -- lin old_A = mkA "" ; --- lin open_V2 = mkV2 "" ; +lin open_V2 = mkV2 "fur" ; lin paint_V2A = mkV2A "rinjiyee" ; -- lin paper_N = mkN "" ; -- lin paris_PN = mkPN "Paris" ; diff --git a/src/somali/ParadigmsSom.gf b/src/somali/ParadigmsSom.gf index 075709608..76bfe1c37 100644 --- a/src/somali/ParadigmsSom.gf +++ b/src/somali/ParadigmsSom.gf @@ -95,6 +95,11 @@ oper mkVV : V -> VVForm -> VV ; -- VV out of an existing V } ; + mkV2S : overload { + mkV2S : Str -> V2S ; -- Predictable verb, no preposition. + mkV2S : Str -> Preposition -> V2S ; -- Predictable verb, preposition given as second argument. + mkV2S : V -> Preposition -> V2S -- Unpredictable verb, preposition. + } ; mkVA : Str -> VA = \s -> lin VA (regV s) ; @@ -107,8 +112,6 @@ oper = \s -> lin V2A (regV s ** {c2 = noPrep}) ; mkV2V : Str -> V2V = \s -> lin V2V (regV s ** {c2 = noPrep}) ; - mkV2S : Str -> V2S - = \s -> lin V2S (regV s ** {c2 = noPrep}) ; mkV2Q : Str -> V2Q = \s -> lin V2Q (regV s ** {c2 = noPrep}) ; @@ -248,6 +251,15 @@ oper in lin VV (dummyV ** {vvtype=b ; s = \\_ => "in"}) } ; + mkV2S = overload { + mkV2S : Str -> V2S -- Predictable verb, no preposition. + = \s -> lin V2S (regV s ** {c2 = noPrep}) ; + mkV2S : Str -> Preposition -> V2S -- Predictable verb, preposition given as second argument. + = \s,pr -> lin V2S (regV s ** {c2 = pr}) ; + mkV2S : V -> Preposition -> V2S -- Unpredictable verb, preposition. + = \v,pr -> lin V2S (v ** {c2 = pr}) + } ; + possPrep : N -> CatSom.Prep = \dhex -> emptyPrep ** { hoostiisa = \\agr => let qnt = PossPron (pronTable ! agr) ; diff --git a/src/somali/ParamSom.gf b/src/somali/ParamSom.gf index 531a3a35e..c64d5838b 100644 --- a/src/somali/ParamSom.gf +++ b/src/somali/ParamSom.gf @@ -261,6 +261,15 @@ oper Single _ => oneWay ! p1 ! p2 ; z => z } ; + combinePassive : Preposition -> PrepCombination = \p -> + case p of { + U => Loo ; + Ku => Lagu ; + Ka => Laga ; + La => Lala ; + _ => Passive + } ; + isPassive : {c2 : PrepCombination} -> Bool = \vp -> case vp.c2 of { Passive | Lagu | Laga | Loo | Lala => True ; diff --git a/src/somali/ResSom.gf b/src/somali/ResSom.gf index 32bb9d9cc..97b1f05c4 100644 --- a/src/somali/ResSom.gf +++ b/src/somali/ResSom.gf @@ -515,8 +515,10 @@ oper _ + ("i"|"e") => "ey" ; _ => "ay" } ; n : Str = case arag of { - _ + #v => "nn" ; -- n duplicates after vowel - _ => "n" } ; + _ + #v => "nn" ; -- n duplicates after vowel + _ + "r" => "r" ; -- Saeed p. 35: agreement marker n (1PL) + _ + "l" => "l" ; -- assimilates to stem final r or. + _ => "n" } ; an : Str = case qaado of { _ + "o" => "an" ; -- Allomorph for imperatives _ => "in" } ; @@ -769,11 +771,7 @@ oper passVP : VerbPhrase -> VerbPhrase = \vp -> vp ** { c2 = case vp.c2 of { - Single NoPrep => Passive ; - Single Ku => Lagu ; - Single Ka => Laga ; - Single U => Loo ; - Single La => Lala ; + Single p => combinePassive p ; _ => vp.c2 } } ; @@ -827,6 +825,7 @@ oper -- if free complement slots, introduce adv.np with insertComp Single NoPrep => insertCompLite (vp ** {c2 = Single adv.c2}) adv.np ** adv' ; Single p => insertCompLite (vp ** {c2 = combine p adv.c2}) adv.np ** adv' ; + Passive => insertCompLite (vp ** {c2 = combinePassive adv.c2}) adv.np ** adv' ; -- if complement slots are full, just insert strings. _ => vp ** adv'' diff --git a/src/somali/VerbSom.gf b/src/somali/VerbSom.gf index dc81f471e..4df5e0ca7 100644 --- a/src/somali/VerbSom.gf +++ b/src/somali/VerbSom.gf @@ -66,13 +66,17 @@ lin -- : V3 -> NP -> VPSlash ; -- give (it) to her Slash2V3, Slash3V3 = \v3 -> insertComp (useVc3 v3) ; + + -- : V2S -> S -> VPSlash ; -- answer (to him) that it is good + SlashV2S v2s s = + let vps = useVc v2s ; + subord = SubjS {s="in"} s ; + in vps ** {obj = {s = subord.berri ; a = P3_Prep}} ; + {- -- : V2V -> VP -> VPSlash ; -- beg (her) to go SlashV2V v2v vp = ; - -- : V2S -> S -> VPSlash ; -- answer (to him) that it is good - SlashV2S v2s s = ; - -- : V2Q -> QS -> VPSlash ; -- ask (him) who came SlashV2Q v2q qs = ; -} @@ -121,10 +125,9 @@ lin AdVVPSlash adv vps = vps ** { adv = adv.s ++ vps.adv } ; -} -- : VP -> Prep -> VPSlash ; -- live in (it) - -- NB. We need possibly a MissingArg kind of solution here too - -- VPSlashPrep vp prep = vp ** - -- { c2 = case vp.c2 of { NoPrep => prep.prep ; - -- x => x }} ; + VPSlashPrep vp prep = + let adv = prepNP prep emptyNP + in insertAdv vp adv ;