diff --git a/src/somali/QuestionSom.gf b/src/somali/QuestionSom.gf index f1dd7f17a..b56078e56 100644 --- a/src/somali/QuestionSom.gf +++ b/src/somali/QuestionSom.gf @@ -88,12 +88,15 @@ concrete QuestionSom of Question = CatSom ** open -- : IAdv -> IComp ; CompIAdv iadv = { -- where (is it) - comp = \\_ => <[], iadv.s> ; + comp = \\_ => <[], []> ; + npcomp = iadv.s ; stm = Waa NoCopula ; } ; + -- : IP -> IComp ; CompIP ip = { -- who (is it) - comp = \\_ => <[], ip.s ! Abs> ; + comp = \\_ => <[], []> ; + npcomp = ip.s ! Abs ; stm = Waa NoCopula ; } ; diff --git a/src/somali/ResSom.gf b/src/somali/ResSom.gf index 2cf004fcf..7c1db7a67 100644 --- a/src/somali/ResSom.gf +++ b/src/somali/ResSom.gf @@ -727,6 +727,7 @@ oper Complement : Type = { comp : Agreement => {p1,p2 : Str} ; -- Agreement for AP complements + npcomp : Str ; stm : STM ; -- to choose right sentence type marker } ; @@ -743,6 +744,7 @@ oper useV : Verb -> VerbPhrase = \v -> v ** { comp = \\_ => <[],[]> ; + npcomp = [] ; stm = case v.isCopula of { -- can change into Waxa in ComplVV True => Waa Copula ; False => Waa NoPred @@ -860,6 +862,7 @@ oper secObj : Str ; c2 : PrepCombination ; -- NB. QuestIAdv can add more prepositions comp : {p1,p2 : Str} ; + npcomp : Str ; vComp : {inf,subcl,subjunc : Str} ; -- Still open @@ -993,6 +996,18 @@ oper PolarQuestion|WhQuestion => obj.p1 ; _ => [] } ; + -- Placement of NP complement varies depending on type of clause + statementNPComp = case cltyp of { + Statement => cl.npcomp ; + _ => [] } ; + subordNPComp = case cltyp of { + Subord => cl.npcomp ; + _ => [] } ; + questionNPComp = case cltyp of { + PolarQuestion|WhQuestion => cl.npcomp ; + _ => [] } ; + + -- Control whether to include subject pronoun and STM subjpron : Str = case of { => [] ; @@ -1000,7 +1015,7 @@ oper _ => [] } ; stm : Str = case of { => cl.stm ! cltyp ! p ; - <_,Neg> => cl.stm ! cltyp ! p ; -- negation overrides hasSTM=False + <_,Neg> => cl.stm ! cltyp ! p ; -- negation overrides hasSTM=False. To override the override, set STM to [] in the function that calls this. /IL _ => [] } in cl.berri -- AdV ++ cl.subj.noun -- subject if it's a noun @@ -1011,13 +1026,16 @@ oper ++ cl.vComp.subjunc -- "waa in" construction / ++ subjpron -- subject pronoun + ++ subordNPComp ++ subordNounObj -- noun object if it's subordinate clause: "timir aan /laf/ lahayn" (Saeed p. 210-211) ++ obj.p2 -- object if it's a pronoun + ++ statementNPComp ++ cl.sii -- restricted set of particles ++ cl.dhex -- restricted set of nouns/adverbials ++ cl.secObj -- "second object" ++ cl.vComp.inf -- VV complement, if it's infinitive ++ cl.pred ! cltyp ! t ! a ! p -- the inflecting verb + ++ questionNPComp ++ questionNounObj -- noun object if it's a question ++ cl.vComp.subcl -- VV complement, if it's subordinate clause ++ cl.miscAdv ---- NB. Only used if there are several adverbs, or for "waa in" construction. diff --git a/src/somali/VerbSom.gf b/src/somali/VerbSom.gf index 3208febc2..5aa5d38ae 100644 --- a/src/somali/VerbSom.gf +++ b/src/somali/VerbSom.gf @@ -141,24 +141,28 @@ lin -- : AP -> Comp ; CompAP ap = { comp = \\a => <[], ap.s ! AF (getNum a) Abs> ; + npcomp = [] ; stm = Waa Copula ; } ; -- : CN -> Comp ; CompCN cn = { - comp = \\a => <[], cn2str Sg Abs cn> ; + comp = \\a => <[], []> ; + npcomp = cn2str Sg Abs cn ; stm = Waa NoCopula ; } ; -- NP -> Comp ; CompNP np = { - comp = \\a => <[], np.s ! Abs> ; + comp = \\a => <[], []> ; + npcomp = np.s ! Abs ; stm = Waa NoCopula ; } ; -- : Adv -> Comp ; CompAdv adv = { comp = \\a => <[], linAdv adv> ; + npcomp = [] ; stm = Waa Copula ; } ;