From 4dba178d33e24578d892c167ce09170b0ebf64a8 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Mon, 30 Sep 2019 10:50:26 +0200 Subject: [PATCH 1/3] (Som) Add VPSlashPrep + fix bug in insertAdv --- src/somali/ParamSom.gf | 9 +++++++++ src/somali/ResSom.gf | 7 ++----- src/somali/VerbSom.gf | 7 +++---- 3 files changed, 14 insertions(+), 9 deletions(-) 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..01b3a6464 100644 --- a/src/somali/ResSom.gf +++ b/src/somali/ResSom.gf @@ -769,11 +769,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 +823,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..ed0940118 100644 --- a/src/somali/VerbSom.gf +++ b/src/somali/VerbSom.gf @@ -121,10 +121,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 ; From 0e4cedd144dcf89ba74c4e8002700f24cf500e41 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Mon, 30 Sep 2019 15:39:53 +0200 Subject: [PATCH 2/3] (Som) Add V2S --- src/somali/LexiconSom.gf | 2 +- src/somali/ParadigmsSom.gf | 16 ++++++++++++++-- src/somali/VerbSom.gf | 10 +++++++--- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/somali/LexiconSom.gf b/src/somali/LexiconSom.gf index 585b1fcc3..107f07f7c 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 "" ; 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/VerbSom.gf b/src/somali/VerbSom.gf index ed0940118..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 = ; -} From ba308dcf957ca349ece36c8106172cdd87eea73e Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Mon, 30 Sep 2019 15:40:09 +0200 Subject: [PATCH 3/3] (Som) More phonological assimilation rules --- src/somali/LexiconSom.gf | 2 +- src/somali/ResSom.gf | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/somali/LexiconSom.gf b/src/somali/LexiconSom.gf index 107f07f7c..d36ebd0d1 100644 --- a/src/somali/LexiconSom.gf +++ b/src/somali/LexiconSom.gf @@ -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/ResSom.gf b/src/somali/ResSom.gf index 01b3a6464..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" } ;