From a80ec22a1c914dd0135bc25c2b2d32992b7df9fa Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Wed, 28 Aug 2019 14:14:26 +0200 Subject: [PATCH 1/4] (Som) Fix bug in DetCN --- src/somali/NounSom.gf | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/somali/NounSom.gf b/src/somali/NounSom.gf index 22491a598..7e4b11daa 100644 --- a/src/somali/NounSom.gf +++ b/src/somali/NounSom.gf @@ -23,12 +23,11 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in { -- If cn has modifier, Nom ending attaches to the modifier <_,Nom,True,_,_> => {nf=Def det.n ; c=Abs} ; - -- Definite - <_,_,False,Definite,n> => {nf=Def n ; c=c} ; + -- a Det with st=Indefinite uses Indef forms + <_,_,_,Indefinite,n> => {nf=Indef n ; c=c} ; - <_,_,False,Indefinite,n> => {nf=Indef n ; c=c} ; - - _ => {nf=Def det.n ; c=c} -- TODO check + -- All other determiners use the definite stem + _ => {nf=Def det.n ; c=c} } ; art = gda2da cn.gda ! det.n ; num = case det.isNum of {True => Sg ; _ => det.n} ; From 0847e5f2fab3c88126254f520c34afdf515c27d3 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Wed, 28 Aug 2019 14:16:48 +0200 Subject: [PATCH 2/4] (Som) Fix word order+add negative form for rel.cls --- src/somali/CatSom.gf | 2 +- src/somali/NounSom.gf | 2 +- src/somali/ParamSom.gf | 9 ++++++ src/somali/RelativeSom.gf | 3 +- src/somali/ResSom.gf | 54 +++++++++++++++++++++++++---------- src/somali/unittest/cl.gftest | 4 +-- 6 files changed, 54 insertions(+), 20 deletions(-) diff --git a/src/somali/CatSom.gf b/src/somali/CatSom.gf index d180619da..e23c9ca0b 100644 --- a/src/somali/CatSom.gf +++ b/src/somali/CatSom.gf @@ -123,7 +123,7 @@ concrete CatSom of Cat = CommonX - [Adv] ** open ResSom, Prelude in { linref -- Cl = linCl ; - VP = linVP VInf ; + VP = infVP ; CN = linCN ; Prep = \prep -> prep.s ! P3_Prep ++ prep.sii ++ prep.dhex ++ prep.miscAdv ! Sg3 Masc ; S = \s -> linBaseCl (s.s ! False) ; diff --git a/src/somali/NounSom.gf b/src/somali/NounSom.gf index 7e4b11daa..bc680e617 100644 --- a/src/somali/NounSom.gf +++ b/src/somali/NounSom.gf @@ -256,7 +256,7 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in { mod = \\st,n,c => --what to do with subject case if there's both adj and RS? cn.mod ! st ! n ! Abs ++ andConj st cn.hasMod - ++ rs.s ! st ! gennum cn n ! c ; + ++ rs.s ! st ! gennum cn Sg ! c ; -- gennum cn Sg, because plural form is only for 1st person plural hasMod = True ; } ; diff --git a/src/somali/ParamSom.gf b/src/somali/ParamSom.gf index b80a8f196..30be8f82b 100644 --- a/src/somali/ParamSom.gf +++ b/src/somali/ParamSom.gf @@ -288,6 +288,7 @@ param 1/2SG/3SG M/2PL/3PL suga (VRel MascSg) 3 SG F sugta (VRel FemSg) 1PL sugna (VRel PlInv) -} + | VRelNeg -- Saeed p. 211 have: lahayn, be: ahayni | VNegCond GenNum ; VAgr = @@ -315,6 +316,14 @@ oper Pl1 _ => Pl1_ ; Pl2 => Pl2_ ; Pl3 => Pl3_ } ; + isNeg : VForm -> Bool = \vf -> case vf of { + VNegPast _ => True ; + VNegCond _ => True ; + VRelNeg => True ; + VImp _ Neg => True ; + VPres _ _ Neg => True ; + _ => False + } ; -------------------------------------------------------------------------------- -- Clauses diff --git a/src/somali/RelativeSom.gf b/src/somali/RelativeSom.gf index 9581a0771..795c7346e 100644 --- a/src/somali/RelativeSom.gf +++ b/src/somali/RelativeSom.gf @@ -18,7 +18,8 @@ lin rclSubord = mergeRCl (cls.s ! True) ; rclStatement = mergeRCl (cls.s ! False) ; in rp.s ++ case of { - => linVP (VRel g) vp ; -- reduced present only in absolutive + => linVP (VRel g) Subord vp ; -- reduced present only in absolutive + <_,Abs,Pres,Simul,Neg> => linVP VRelNeg Subord vp ; -- special form for have and be <_,Nom,Pres,Simul,Pos> => rclStatement.s ! t ! a ! p ; -- the usual forms, not subordinate _ => rclSubord.s ! t ! a ! p } -- the rest is Subord because of negation. } ; diff --git a/src/somali/ResSom.gf b/src/somali/ResSom.gf index a3449b6ae..e65792270 100644 --- a/src/somali/ResSom.gf +++ b/src/somali/ResSom.gf @@ -561,7 +561,8 @@ oper VInf => arki ; VRel SgMasc => qaat + "a" ; VRel SgFem => arag + t + "a" ; - VRel PlInv => arag + "na" + VRel PlInv => arag + "na" ; + VRelNeg => qaat + "o" -- TODO check } ; sii, dhex = [] ; @@ -630,8 +631,8 @@ oper VNegCond SgMasc => "ahaadeen" ; -- 1SG/3 SG M/3PL VNegCond SgFem => "ahaateen" ; -- 2SG/3 SG F/2PL VNegCond PlInv => "ahaanneen" ; -- 1PL - --VRelShort => "ah" ; - VRel _ => "ah" ; -- TODO find right forms + VRel _ => "ah" ; -- All persons: see Nilsson p. 78. TODO check Saeed p. 103 + VRelNeg => "ahayni" ; -- Saeed VInf => "ahaan" ; VImp Sg pol => if_then_Pol pol "ahaw" "ahaanin" ; VImp Pl pol => if_then_Pol pol "ahaada" "ahaanina" ; @@ -649,10 +650,19 @@ oper VPres _ Pl1_ Pos => "leenahay" ; VPres _ Pl2_ Pos => "leedihiin" ; VPres _ Pl3_ Pos => "leeyihiin" ; + + VPres _ Sg1_Sg3Masc Neg => "lihi" ; + VPres _ Sg2_Sg3Fem Neg => "lihid" ; + VPres _ Pl1_ Neg => "lihin" ; + VPres _ Pl2_ Neg => "lihidin" ; + VPres _ Pl3_ Neg => "laha" ; + + VNegPast _ => "lahayn" ; + VPast asp agr => "l" + copula.s ! VPast asp agr ; VNegCond agr => "l" + copula.s ! VNegCond agr ; --- VRelShort => "leh" ; - VRel _ => "leh" ; -- TODO find right forms + VRel _ => "leh" ; -- All persons: see Nilsson p. 78 + VRelNeg => "lahayn" ; x => hold_V.s ! x } } ; @@ -839,7 +849,7 @@ oper Statement => case of { => {p1 = "waa" ; p2 = []} ; _ => stmarkerNoContr ! subj.a ! p }} ; - in (wordOrder subjnoun subjpron stm obj pred vp) ; + in wordOrder subjnoun subjpron stm obj pred vp cltyp ; } where { vp : VerbPhrase = case isPassive vps of { True => complSlash (insertComp vps np) ; @@ -847,13 +857,23 @@ oper subj : NounPhrase = case isPassive vps of {True => impersNP ; _ => np} } ; - wordOrder : (sn,sp : Str) -> (stm,obj : {p1,p2 : Str}) -> {fin,inf : Str} -> VerbPhrase -> BaseCl = - \subjnoun,subjpron,stm,obj,pred,vp -> { + wordOrder : (sn,sp : Str) -> (stm,obj : {p1,p2 : Str}) -> {fin,inf : Str} -> VerbPhrase -> ClType -> BaseCl = + \subjnoun,subjpron,stm,obj,pred,vp,cltyp -> { + {- Saeed p. 210-211: "The relative clause resembles a main clause in syntax + except that the tendency for verb final order is much stronger. [..] Certain + elements such as subject clitic pronouns, and the negative word aan 'not' are + attracted to the head nominal and thus move away from the verbal group." + -} beforeSTM = vp.berri -- AdV ++ subjnoun -- subject if it's a noun - ++ obj.p1 ; -- object if it's a noun - stm = stm.p1 ; -- sentence type marker - afterSTM = stm.p2 -- possible subj. pronoun + ++ case cltyp of { + Subord => [] ; + _ => obj.p1 } ; -- noun object if it's a statement + stm = stm.p1 ; -- sentence type marker; empty if subordinate and positive + afterSTM = stm.p2 -- possible subj. pronoun + ++ case cltyp of { + Subord => obj.p1 ; -- noun object if it's subordinate clause + _ => [] } ++ obj.p2 -- object if it's a pronoun ++ vp.sii -- restricted set of particles ++ vp.dhex -- restricted set of nouns/adverbials @@ -903,7 +923,7 @@ oper _ => vfStatement t ant p agr vp } ; -- TODO other relative forms - infVP : VerbPhrase -> Str = linVP VInf ; + infVP : VerbPhrase -> Str = linVP VInf Statement ; stmarkerContr : Agreement => Polarity => Str = \\a,b => let stm = if_then_Pol b "w" "m" @@ -926,11 +946,15 @@ oper -- linrefs oper - linVP : VForm -> VerbPhrase -> Str = \vf,vp -> + linVP : VForm -> ClType -> VerbPhrase -> Str = \vf,cltyp,vp -> let vp' = complSlash vp ; inf = {inf = vp.s ! vf ; fin=[]} ; - wo = wordOrder [] [] {p1,p2=[]} (vp'.comp ! pagr2agr vp.obj2.a) inf vp' ; - in wo.beforeSTM ++ wo.afterSTM ; + stm = case of { + => {p1 = "aan" ; p2 = []} ; + _ => {p1,p2 = []} + } ; + wo = wordOrder [] [] stm (vp'.comp ! pagr2agr vp.obj2.a) inf vp' cltyp ; + in wo.beforeSTM ++ wo.stm ++ wo.afterSTM ; linCN : CNoun -> Str = \cn -> cn.s ! Indef Sg ++ cn.mod ! Indefinite ! Sg ! Abs ; linAdv : Adverb -> Str = \adv -> diff --git a/src/somali/unittest/cl.gftest b/src/somali/unittest/cl.gftest index 5fe3feb66..ec23ae2b7 100644 --- a/src/somali/unittest/cl.gftest +++ b/src/somali/unittest/cl.gftest @@ -14,7 +14,7 @@ LangSom: niman BIND ka buugaag BIND ta iibsada Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant DefArt NumPl) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a buy_V2) (DetCN (DetQuant DefArt NumPl) (UseN book_N)))))))) NoVoc -- LangEng: the men that don't buy the books -LangSom: niman BIND ka buugaag BIND ta aan iibsado +LangSom: niman BIND ka aan buugaag BIND ta iibsado Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant DefArt NumPl) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PNeg (RelVP IdRP (ComplSlash (SlashV2a buy_V2) (DetCN (DetQuant DefArt NumPl) (UseN book_N)))))))) NoVoc @@ -23,7 +23,7 @@ LangSom: niman BIND ka buugaag BIND ta iibsadaa waa kuwan Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumPl) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a buy_V2) (DetCN (DetQuant DefArt NumPl) (UseN book_N))))))) (UseComp (CompNP (DetNP (DetQuant this_Quant NumPl))))))) NoVoc -- LangEng: the men that don't buy the books are these -LangSom: niman BIND ka buugaag BIND ta aan iibsado waa kuwan +LangSom: niman BIND ka aan buugaag BIND ta iibsado waa kuwan Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumPl) (RelCN (UseN man_N) (UseRCl (TTAnt TPres ASimul) PNeg (RelVP IdRP (ComplSlash (SlashV2a buy_V2) (DetCN (DetQuant DefArt NumPl) (UseN book_N))))))) (UseComp (CompNP (DetNP (DetQuant this_Quant NumPl))))))) NoVoc From 8f5a45aefb7b39df0a017472f027062e7a42ce87 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Wed, 28 Aug 2019 14:17:11 +0200 Subject: [PATCH 3/4] (Som) Lexicon + new unit tests --- src/somali/LexiconSom.gf | 2 +- src/somali/unittest/cl.gftest | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/somali/LexiconSom.gf b/src/somali/LexiconSom.gf index fbee1a844..353b6977f 100644 --- a/src/somali/LexiconSom.gf +++ b/src/somali/LexiconSom.gf @@ -312,7 +312,7 @@ lin see_V2 = mkV2 "ark" ; -- lin send_V3 = mkV3 "" ; -- lin sew_V = mkV "" ; -- lin sharp_A = mkA "" ; --- lin sheep_N = mkN "" ; +lin sheep_N = mkN "lax" fem ; -- lin ship_N = mkN "" ; -- lin shirt_N = mkN "" ; -- lin shoe_N = mkN "" ; diff --git a/src/somali/unittest/cl.gftest b/src/somali/unittest/cl.gftest index ec23ae2b7..0374a01f5 100644 --- a/src/somali/unittest/cl.gftest +++ b/src/somali/unittest/cl.gftest @@ -1,4 +1,5 @@ -- Restrictive relative clauses (RelCN) +-- Saeed p. 213 -- LangEng: the books that the men buy LangSom: buugaag BIND ta niman BIND ku iibsadaan @@ -45,6 +46,22 @@ Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQ LangSom: naag BIND ta aad ku bartay Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant DefArt NumSg) (RelCN (UseN woman_N) (UseRCl (TTAnt TPast ASimul) PPos (RelSlash IdRP (SlashVP (UsePron youSg_Pron) (SlashV2a teach_V2))))))) NoVoc +-- Combine with passive +-- LangEng: the woman that was taught +LangSom: naag BIND ta lagu baray +Lang: PhrUtt NoPConj (UttNP (DetCN (DetQuant DefArt NumSg) (RelCN (UseN woman_N) (UseRCl (TTAnt TPast ASimul) PPos (RelVP IdRP (PassV2 teach_V2)))))) NoVoc + + +-- Negative forms +-- LangEng: sheep that aren't black don't see you +LangSom: lax aan madow aha ku BIND ma arkaan +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PNeg (PredVP (DetCN (DetQuant IndefArt NumPl) (RelCN (UseN sheep_N) (UseRCl (TTAnt TPres ASimul) PNeg (RelVP IdRP (UseComp (CompAP (PositA black_A))))))) (ComplSlash (SlashV2a see_V2) (UsePron youPol_Pron))))) NoVoc + +-- LangEng: you don't see sheep that aren't black +LangSom: laxo aan madow ahayni ma aragto +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PNeg (PredVP (UsePron youPol_Pron) (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant IndefArt NumPl) (RelCN (UseN sheep_N) (UseRCl (TTAnt TPres ASimul) PNeg (RelVP IdRP (UseComp (CompAP (PositA black_A))))))))))) NoVoc + + -- Appositive relative clauses (RelNP) -- LangEng: he , that the men see From 259b75753e3f540fb3a823c43294d7206d626d5c Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Wed, 28 Aug 2019 16:01:31 +0200 Subject: [PATCH 4/4] (Som) Add more variants of VV --- src/somali/CatSom.gf | 5 +++-- src/somali/IdiomSom.gf | 2 +- src/somali/ParadigmsSom.gf | 22 ++++++++++++++++++++++ src/somali/ResSom.gf | 24 +++++++++++++++--------- src/somali/StructuralSom.gf | 8 ++++---- src/somali/VerbSom.gf | 16 ++++++++++++---- src/somali/unittest/vp.gftest | 8 ++++++++ 7 files changed, 65 insertions(+), 20 deletions(-) diff --git a/src/somali/CatSom.gf b/src/somali/CatSom.gf index e23c9ca0b..cf3668c25 100644 --- a/src/somali/CatSom.gf +++ b/src/somali/CatSom.gf @@ -98,7 +98,6 @@ concrete CatSom of Cat = CommonX - [Adv] ** open ResSom, Prelude in { -- additional lexicon modules. V, - VV, -- verb-phrase-complement verb e.g. "want" -- TODO: VPs that have sentential complement use waxa as stm? see Nilsson p. 68 VS, -- sentence-complement verb e.g. "claim" -- TODO: eventually different lincats VQ, -- question-complement verb e.g. "wonder" @@ -106,7 +105,9 @@ concrete CatSom of Cat = CommonX - [Adv] ** open ResSom, Prelude in { V2V, -- verb with NP and V complement e.g. "cause" V2S, -- verb with NP and S complement e.g. "tell" V2Q, -- verb with NP and Q complement e.g. "ask" - V2A = ResSom.Verb ; -- verb with NP and AP complement e.g. "paint" + V2A = ResSom.Verb ; -- verb with NP and AP complement e.g. "paint" + + VV = ResSom.VV ; -- verb-phrase-complement verb e.g. "want" V2 = ResSom.Verb2 ; V3 = ResSom.Verb3 ; diff --git a/src/somali/IdiomSom.gf b/src/somali/IdiomSom.gf index db6b84759..01f7948fe 100644 --- a/src/somali/IdiomSom.gf +++ b/src/somali/IdiomSom.gf @@ -40,7 +40,7 @@ concrete IdiomSom of Idiom = CatSom ** open Prelude, ResSom, VerbSom in { } ; - {- TODO: Saeed p. 92 optative + {- TODO: Saeed p. 92 and 207, optative -- : VP -> Utt ; -- let's go ImpPl1 vp = { } ; diff --git a/src/somali/ParadigmsSom.gf b/src/somali/ParadigmsSom.gf index bb7891e57..c02489964 100644 --- a/src/somali/ParadigmsSom.gf +++ b/src/somali/ParadigmsSom.gf @@ -32,6 +32,11 @@ oper u : Preposition ; noPrep : Preposition ; + -- TODO: add subjunctive too! + VVForm : Type ; -- Argument to give to mkVV + infinitive : VVForm ; -- Takes its complement in infinitive + waa_in : VVForm ; -- No explicit verb, just uses "waa in" construction + --2 Nouns @@ -85,6 +90,11 @@ oper mkV3 : V -> (_,_ : Preposition) -> V2 ; -- Already constructed verb with preposition } ; + mkVV : overload { + mkVV : (kar : Str) -> VV ; -- VV that takes its complement in infinitive. + mkVV : VVForm -> VV ; -- VV such as "waa in" + } ; + -- TODO: actual constructors -- mkVA : Str -> VA = \s -> lin VA (mkVerb s) ; -- @@ -161,6 +171,10 @@ oper la = ResSom.La ; u = ResSom.U ; noPrep = ResSom.NoPrep ; + + VVForm = Bool ; + infinitive = False ; + waa_in = True ; ------------------------ mkN = overload { @@ -217,6 +231,14 @@ oper mkV3 : V -> (_,_ : Preposition) -> V2 = \v,p,q -> lin V3 (v ** {c2 = p ; c3 = q}) ; } ; + mkVV = overload { + mkVV : (kar : Str) -> VV -- VV that takes its complement in infinitive. + = \kar -> lin VV ({isVS=False} ** mkV kar) ; + mkVV : VVForm -> VV -- VV such as "waa in" + = \b -> let dummyV : V = mkV "in" + in lin VV (dummyV ** {isVS=b ; s = \\_ => "in"}) + } ; + possPrep : N -> CatSom.Prep = \dhex -> emptyPrep ** { miscAdv = \\agr => let qnt = PossPron (pronTable ! agr) ; diff --git a/src/somali/ResSom.gf b/src/somali/ResSom.gf index e65792270..201401e6f 100644 --- a/src/somali/ResSom.gf +++ b/src/somali/ResSom.gf @@ -471,6 +471,8 @@ oper Verb2 : Type = Verb ** {c2 : Preposition} ; Verb3 : Type = Verb2 ** {c3 : Preposition} ; + VV : Type = Verb ** {isVS : Bool} ; + -- Saeed page 79: -- "… the reference form is the imperative singular form -- since it corresponds to the form of the basic root." @@ -701,7 +703,7 @@ oper c2 : PrepCombination ; -- Prepositions can combine together and with object pronoun. obj2 : NPLite ; -- {s : Str ; a : PrepAgr} secObj : Str ; -- if two overt pronoun objects - vComp : Str ; -- VV complement + vComp : {pr,pst : Str} -- VV complement } ; VPSlash : Type = VerbPhrase ; @@ -709,7 +711,8 @@ oper useV : Verb -> VerbPhrase = \v -> v ** { comp = \\_ => <[],[]> ; pred = case v.isCopula of {True => Copula ; _ => NoPred} ; - vComp,berri,miscAdv,refl = [] ; + vComp = {pr,pst = []} ; + berri,miscAdv,refl = [] ; c2 = Single NoPrep ; obj2 = {s = [] ; a = P3_Prep} ; secObj = [] @@ -849,16 +852,18 @@ oper Statement => case of { => {p1 = "waa" ; p2 = []} ; _ => stmarkerNoContr ! subj.a ! p }} ; - in wordOrder subjnoun subjpron stm obj pred vp cltyp ; + in wordOrder subjnoun stm obj pred vp cltyp ; } where { vp : VerbPhrase = case isPassive vps of { True => complSlash (insertComp vps np) ; _ => complSlash vps } ; - subj : NounPhrase = case isPassive vps of {True => impersNP ; _ => np} + subj : NounPhrase = case isPassive vps of { + True => impersNP ; + _ => np } } ; - wordOrder : (sn,sp : Str) -> (stm,obj : {p1,p2 : Str}) -> {fin,inf : Str} -> VerbPhrase -> ClType -> BaseCl = - \subjnoun,subjpron,stm,obj,pred,vp,cltyp -> { + wordOrder : (sn : Str) -> (stm,obj : {p1,p2 : Str}) -> {fin,inf : Str} -> VerbPhrase -> ClType -> BaseCl = + \subjnoun,stm,obj,pred,vp,cltyp -> { {- Saeed p. 210-211: "The relative clause resembles a main clause in syntax except that the tendency for verb final order is much stronger. [..] Certain elements such as subject clitic pronouns, and the negative word aan 'not' are @@ -870,7 +875,8 @@ oper Subord => [] ; _ => obj.p1 } ; -- noun object if it's a statement stm = stm.p1 ; -- sentence type marker; empty if subordinate and positive - afterSTM = stm.p2 -- possible subj. pronoun + afterSTM = vp.vComp.pr -- "waa in" construction + ++ stm.p2 -- possible subj. pronoun ++ case cltyp of { Subord => obj.p1 ; -- noun object if it's subordinate clause _ => [] } @@ -878,7 +884,7 @@ oper ++ vp.sii -- restricted set of particles ++ vp.dhex -- restricted set of nouns/adverbials ++ vp.secObj -- "second object" - ++ vp.vComp -- VV complement + ++ vp.vComp.pst -- VV complement ++ pred.inf -- potential infinitive/participle ++ pred.fin -- the verb inflected ++ vp.miscAdv } ; ---- NB. Only used if there are several adverbs. @@ -953,7 +959,7 @@ oper => {p1 = "aan" ; p2 = []} ; _ => {p1,p2 = []} } ; - wo = wordOrder [] [] stm (vp'.comp ! pagr2agr vp.obj2.a) inf vp' cltyp ; + wo = wordOrder [] stm (vp'.comp ! pagr2agr vp.obj2.a) inf vp' cltyp ; in wo.beforeSTM ++ wo.stm ++ wo.afterSTM ; linCN : CNoun -> Str = \cn -> cn.s ! Indef Sg ++ cn.mod ! Indefinite ! Sg ! Abs ; diff --git a/src/somali/StructuralSom.gf b/src/somali/StructuralSom.gf index 62f295036..2f7d043d5 100644 --- a/src/somali/StructuralSom.gf +++ b/src/somali/StructuralSom.gf @@ -176,11 +176,11 @@ lin yes_Utt = ss "haa" ; ------- -- Verb -lin have_V2 = mkV2 have_V noPrep ; +lin have_V2 = mkV2 have_V noPrep ; -- TODO: check if {sii = "l" ++ BIND ; isCopula=True} makes sense for present tense negative lin can8know_VV = can_VV ; -- can (capacity) -lin can_VV = mkV "kar" ; -- can (possibility) -{-lin must_VV = mkV "" ; -lin want_VV = mkV "" ; +lin can_VV = mkVV "kar" ; -- can (possibility) +lin must_VV = mkVV waa_in ; +{-lin want_VV = mkV "" ; ------ diff --git a/src/somali/VerbSom.gf b/src/somali/VerbSom.gf index e8238be48..e8d8bece3 100644 --- a/src/somali/VerbSom.gf +++ b/src/somali/VerbSom.gf @@ -15,10 +15,18 @@ lin ReflVP = ResSom.insertRefl ; -- : VV -> VP -> VP ; - ComplVV vv vp = vp ** { -- check Saeed p. 169 - s = vv.s ; - vComp = vp.vComp ++ vp.s ! VInf ; - pred = NoPred ; + ComplVV vv vp = let vc = vp.vComp in case vv.isVS of { + True => vp ** { + vComp = vc ** {pr = vv.s ! VInf} ; + obj2 = vp.obj2 ** {s = []} ; -- word order hack to avoid more parameters: + miscAdv = vp.miscAdv ++ vp.obj2.s -- dump it all to miscAdv + } ; + + False => vp ** { + s = vv.s ; -- check Saeed p. 169 + vComp = vc ** {pst = vc.pst ++ vp.s ! VInf} ; + pred = NoPred ; + } } ; -- : VS -> S -> VP ; diff --git a/src/somali/unittest/vp.gftest b/src/somali/unittest/vp.gftest index 3425f89d8..77bfa7b0a 100644 --- a/src/somali/unittest/vp.gftest +++ b/src/somali/unittest/vp.gftest @@ -70,6 +70,14 @@ Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (GenericCl (ComplVV LangSom: in uu imanayo waa aynu ogaannay Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPast ASimul) PPos (PredVP (UsePron we_Pron) (ComplVS know_VS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron he_Pron) (ProgrVP (UseV come_V)))))))) NoVoc +-- LangEng: you must see mother of the cat +LangSom: waa in aad aragtaa bisad BIND da hooya BIND deed +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron youPol_Pron) (ComplVV must_VV (ComplSlash (SlashV2a see_V2) (MassNP (ComplN2 mother_N2 (DetCN (DetQuant DefArt NumSg) (UseN cat_N))))))))) NoVoc + +-- LangEng: the mother of the cat must be seen +LangSom: waa in la arkaa bisad BIND da hooya BIND deed +Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (GenericCl (ComplVV must_VV (ComplSlash (SlashV2a see_V2) (MassNP (ComplN2 mother_N2 (DetCN (DetQuant DefArt NumSg) (UseN cat_N))))))))) NoVoc + -------------------------------------------------------------------------------- -- Adverbials