diff --git a/src/somali/AdverbSom.gf b/src/somali/AdverbSom.gf index 0c3f5ad57..95bc1e986 100644 --- a/src/somali/AdverbSom.gf +++ b/src/somali/AdverbSom.gf @@ -31,8 +31,7 @@ lin -- Subordinate clauses can function as adverbs. -- : Subj -> S -> Adv ; - SubjS subj s = let subs = s.s ! True in - mkAdv (subs.beforeSTM ++ subj.s ++ subs.stm ++ subs.afterSTM) ; + SubjS subj s = mkAdv (s.s ! True) ; -- Comparison adverbs also work as numeral adverbs. diff --git a/src/somali/CatSom.gf b/src/somali/CatSom.gf index cf3668c25..1afc5038f 100644 --- a/src/somali/CatSom.gf +++ b/src/somali/CatSom.gf @@ -13,7 +13,7 @@ concrete CatSom of Cat = CommonX - [Adv] ** open ResSom, Prelude in { -- relative sentence. Tense and polarity fixed, -- but agreement may depend on the CN/NP it modifies. - Cl = ResSom.Clause ; + Cl = ResSom.ClSlash ; ClSlash = ResSom.ClSlash ; SSlash = ResSom.Sentence ; -- sentence missing NP; e.g. "she has looked at" Imp = SS ; -- imperative e.g. "look at this" @@ -127,5 +127,4 @@ linref 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/PhraseSom.gf b/src/somali/PhraseSom.gf index 846d7123a..f8ab38d74 100644 --- a/src/somali/PhraseSom.gf +++ b/src/somali/PhraseSom.gf @@ -3,7 +3,7 @@ concrete PhraseSom of Phrase = CatSom ** open Prelude, ResSom in { lin PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ; - UttS s = let basecl = s.s ! False in {s = linBaseCl basecl} ; + UttS s = {s = s.s ! False} ; UttQS qs = qs ; UttImpSg pol imp = diff --git a/src/somali/QuestionSom.gf b/src/somali/QuestionSom.gf index 45f2f3b96..e367585eb 100644 --- a/src/somali/QuestionSom.gf +++ b/src/somali/QuestionSom.gf @@ -6,17 +6,17 @@ concrete QuestionSom of Question = CatSom ** open lin -- : Cl -> QCl ; - QuestCl cl = mergeQCl (cl.s ! Question) ; + QuestCl = cl2qcl ; -- : IP -> VP -> QCl ; QuestVP ip vp = -- TODO: if we want to contract baa + subj. pronoun, change ResSom.predVP - let clRaw : ClLite = predVPlite ip vp ; - cl : ClLite = clRaw ** { + let clRaw : ClSlash = predVP ip vp ; + cl : ClSlash = clRaw ** { stm = \\clt,p => case of { - => "baa" ; + <_,Pos> => "baa" ; _ => clRaw.stm ! clt ! p } } - in wordOrderLite Statement cl ; + in cl2qcl cl ; -- : IP -> ClSlash -> QCl ; -- whom does John love --QuestSlash ip cls = ; diff --git a/src/somali/RelativeSom.gf b/src/somali/RelativeSom.gf index a28300afe..dd2665eec 100644 --- a/src/somali/RelativeSom.gf +++ b/src/somali/RelativeSom.gf @@ -14,19 +14,19 @@ lin them in manually in RelVP. -} RelVP rp vp = {s = \\gn,c,t,a,p => - let cls = predVPSlash impersNP vp ; - rclSubord = mergeRCl (cls.s ! True) ; - rclStatement = mergeRCl (cls.s ! False) ; + let cls = predVP impersNP vp ; + rclSubord = cl2rcl cls ; + rclStatement = cl2rclNom cls ; in rp.s ++ case of { => 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 + <_,Nom,Pres,Simul,Pos> => rclStatement.s ! t ! a ! p ; -- as nominative, use the usual forms, not subordinate _ => rclSubord.s ! t ! a ! p } -- the rest is Subord because of negation. } ; -- : RP -> ClSlash -> RCl ; -- whom John loves RelSlash rp cls = - let rcl = mergeQCl (cls.s ! True) -- in subordinate clause, STM is not included but subject pronoun is + let rcl = cl2relslash cls -- in subordinate clause, STM is not included but subject pronoun is in rcl ** {s = \\g,c,t,a,p => rp.s ++ rcl.s ! t ! a ! p} ; diff --git a/src/somali/ResSom.gf b/src/somali/ResSom.gf index b8138d021..c27d2c92c 100644 --- a/src/somali/ResSom.gf +++ b/src/somali/ResSom.gf @@ -328,7 +328,9 @@ oper defIQuant : Str -> Quant = \ee -> let quantRaw = defQuant ee ("k"+ee) ("t"+ee) ("kuw"+ee) False - in quantRaw ** {s = \\da,c => quantRaw.s ! da ! Abs} ; + in quantRaw ** { + s = \\da,c => quantRaw.s ! da ! Abs ; + sp = \\gn,c => quantRaw.sp ! gn ! Abs } ; gnTable : (m,f,p : Str) -> (GenNum => Str) = \m,f,p -> table {SgMasc => m ; SgFem => f ; _ => p} ; @@ -696,8 +698,8 @@ 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 : {subjunc : Str ; -- if it's "waa in" or subjunctive construction, there's "in" in there - inf : Str ; + vComp : {subjunc : Str ; -- "waa in" or subjunctive construction: "in" is placed here + inf : Str ; -- auxiliary VV with infinitive argument subcl : Agreement => Str} -- VV complement if it's a subordinate clause } ; @@ -801,9 +803,9 @@ oper {- After PredVP, we might still want to add more adverbs (QuestIAdv), but we're done with verb inflection. -} - ClLite : Type = BaseAdv ** { + ClSlash : Type = BaseAdv ** { -- Fixed in Cl - subj : {noun, pron : Str} ; -- noun and subject pronoun if applicable + subj : {noun, pron : Str ; isP3 : Bool} ; -- noun and subject pronoun if applicable obj2 : NPLite ; secObj : Str ; c2 : PrepCombination ; -- NB. QuestIAdv can add more prepositions @@ -811,52 +813,27 @@ oper vComp : {inf,subcl,subjunc : Str} ; -- Still open - pred : ClType => Tense => Anteriority => Polarity => {fin,inf : Str} ; + pred : ClType => Tense => Anteriority => Polarity => Str ; stm : ClType => Polarity => Str - {- If formed with PredVP: - Pos,Statement => waxa or waa depending on what STM was - Pos,Question => ma - Neg,Statement => ma - Neg,Question => ma aan or sow (TODO implement this) - Pos,Subord => [] - Neg,Subord => aan - Contrast QCl formed with QuestVP: - Pos => baa - Neg => ?? -} } ; --- Clause : Type = {s : Tense => Anteriority => Polarity => Str} ; - - BaseCl : Type = {beforeSTM, stm, afterSTM : Str} ; -- adverbs, subjects, all that comes before sentence type marker. Eventual Subj attaches to the part after STM. - Clause : Type = {s : ClType => Tense => Anteriority => Polarity => BaseCl} ; - ClSlash : Type = {s : Bool {-is subordinate-} => Tense => Anteriority => Polarity => BaseCl} ; - Sentence : Type = {s : Bool {-is subordinate-} => BaseCl} ; + Clause : Type = {s : Tense => Anteriority => Polarity => Str} ; + QClause = Clause ; RClause : Type = {s : GenNum => Case => Tense => Anteriority => Polarity => Str} ; - QClause : Type = {s : Tense => Anteriority => Polarity => Str} ; + Sentence : Type = {s : Bool {-is subordinate-} => Str} ; - mergeQCl : (Tense => Anteriority => Polarity => BaseCl) -> QClause = mergeSTM True ; - mergeRCl : (Tense => Anteriority => Polarity => BaseCl) -> QClause = mergeSTM False ; + predVPslash = predVP ; -- Cl and ClSlash are the same category - mergeSTM : Bool -> (Tense => Anteriority => Polarity => BaseCl) -> QClause = \includeSTM,bcl -> - {s = \\t,a,p => (bcl ! t ! a ! p).beforeSTM - ++ case of { - => [] ; - => "aan" ; -- include negation even if not including STM otherwise. - => (bcl ! t ! a ! p).stm - } - ++ (bcl ! t ! a ! p).afterSTM - } ; - - predVPlite : NounPhrase -> VerbPhrase -> ClLite = \np,vps -> vp ** { - subj = {noun = subjnoun ; pron = subjpron} ; + predVP : NounPhrase -> VerbPhrase -> ClSlash = \np,vps -> vp ** { + subj = {noun = subjnoun ; pron = subjpron ; isP3 = isP3 subj.a} ; pred = \\cltyp,t,a,p => let predRaw = vf cltyp t a p subj.a vp ; in case of { -- VP comes from CompNP/CompCN + P3 subject - => {fin,inf = []} ; + => [] ; <_, _, Pres, Waa (Copula|NoCopula), _> -- Comp* present tense + any subject - => {fin = presCopula ! {agr=subj.a ; pol=p} ; inf=[]} ; + => presCopula ! {agr=subj.a ; pol=p} ; _ => predRaw -- Any other verb } ; @@ -870,10 +847,6 @@ oper => [] ; => "aan" } ; - --c2 = vp.c2 ; - --obj2 = vp.obj2 ; - --secObj = vp.secObj ; - -- sii, dhex, berri, miscAdv = from VP comp = vp.comp ! subj.a ; vComp = vp.vComp ** { subcl = vp.vComp.subcl ! subj.a @@ -885,123 +858,75 @@ oper subj : NounPhrase = case isPassive vps of { True => impersNP ; _ => np } ; - subjnoun : Str = if_then_Str np.isPron np.empty (subj.s ! Nom) ; - subjpron : Str = if_then_Str np.isPron (subj.s ! Nom) np.empty ; + subjnoun : Str = case np.isPron of { + True => np.empty ; + False => subj.s ! Nom + } ; + subjpron : Str = case of { + + => np.empty ; + _ => (pronTable ! subj.a).s ! Nom + } } ; - -- just like complSlash but for ClLite - complCl : ClLite -> ClLite = \cl -> let np = cl.obj2 in cl ** { + -- just like complSlash but for Cl + complCl : ClSlash -> ClSlash = \cl -> let np = cl.obj2 in cl ** { comp = {p1 = np.s ++ cl.comp.p1 ; p2 = cl.comp.p2 ++ prepCombTable ! np.a ! cl.c2} } ; - predVPSlash : NounPhrase -> VPSlash -> ClSlash = \np,vps -> - let cl = predVP np vps in {s = table { - True => cl.s ! Subord ; - False => cl.s ! Statement } + -- RelVP: subject pronoun is never included + cl2rcl : ClSlash -> Clause = + let hasSubjPron : Bool = False ; + hasSTM : Bool = False ; + isRel : Bool = True ; + in wordOrder Subord isRel hasSubjPron hasSTM ; + + -- No subject pronoun, no STM, but use verb forms from Statement + cl2rclNom : ClSlash -> Clause = \cls -> + let hasSubjPron : Bool = False ; + hasSTM : Bool = False ; + isRel : Bool = True ; + in wordOrder Statement isRel hasSubjPron hasSTM cls ; + + -- RelSlash: subject pronoun is included if it's not 3rd person + -- TODO check this rule with more example sentences + cl2relslash : ClSlash -> Clause = + let hasSubjPron : Bool = True ; + hasSTM : Bool = False ; + isRel : Bool = True ; + in wordOrder Subord isRel hasSubjPron hasSTM ; + + -- Question clauses: subject pronoun not included, STM is + cl2qcl : ClSlash -> Clause = + let hasSubjPron : Bool = False ; + hasSTM : Bool = True ; + isRel : Bool = False ; + in wordOrder Question isRel hasSubjPron hasSTM ; + + -- Sentence: include subject pronoun and STM. + -- When subordinate, include "in". + cl2sentence : Bool -> ClSlash -> Clause = \isSubord,cls -> { + s = \\t,a,p => + let cltyp : ClType = case isSubord of { + True => Subord ; + False => Statement } ; + cl : ClSlash = case isSubord of { -- add "in" to the clause if used as subordinate + True => cls ** {vComp = cls.vComp ** {subjunc = "in"}} ; + False => cls } ; + sent = wordOrder cltyp False True True cl + in sent.s ! t ! a ! p } ; - predVP : NounPhrase -> VerbPhrase -> Clause = \np,vps -> { - s = \\cltyp,t,a,p => - let predRaw : {fin : Str ; inf : Str} = vf cltyp t a p subj.a vp ; - pred : {fin : Str ; inf : Str} = case of { - -- VP comes from CompNP/CompCN + P3 subject - => {fin,inf = []} ; - <_, _, Pres, Waa (Copula|NoCopula), _> -- Comp* present tense + any subject - => {fin = presCopula ! {agr=subj.a ; pol=p} ; inf=[]} ; - - _ => predRaw -- Any other verb - } ; - - subjnoun : Str = if_then_Str np.isPron np.empty (subj.s ! Nom) ; - subjpron : Str = if_then_Str np.isPron (subj.s ! Nom) np.empty ; - - obj : {p1,p2 : Str} = - let o : {p1,p2 : Str} = vp.comp ! subj.a ; - bind : Str = - case of { - => [] ; -- nothing to attach to the STM - _ => BIND } ; -- something to attach, use BIND - in case of { - -- object pronoun and prepositions contract with negation - => {p2 = [] ; p1 = o.p1 ++ o.p2 ++ bind} ; - _ => o - - } ; - - stm : {p1,p2 : Str} = case cltyp of { - Subord => {p1 = if_then_Pol p [] "aan" ; -- if we form a ClSlash, no sentence type marker; negation with aan (Saeed p. 210) - p2 = if_then_Pol p subjpron []} ; -- no subjpron in negation - - Question => {p1 = "ma" ; p2 = []} ; -- TODO find out how negative questions work - {- - The first type of negative question has the QM ma and the negative word áan 'noť. - These questions usually include clitic subject pronouns and the three elements - coalesce as follows: ma - aan 'not' + aan 'I' → miyaanan - he second type of negative question uses a distinct question word sow (show) which - is a marker of speaker uncertainty also found in potential sentences - (though with a distinct verbal inflection). This type of sentence has the negative - word ma 'not'; for example: - Sow Faarax ma ihid? - QM Farah not be:NEG - 'Are you not Farah?' - - -} - - Statement => case of { - -- no subjpron in predicative sentences: - => {p1 = "waa" ; p2 = []} ; -- "Axmed waa macallin" not "*Axmed waa uu macallin" - <_,Waxa,_> - => waxaNoContr ! subj.a ! p ; - _ => waaNoContr ! subj.a ! p } -- if we want wuu, waad etc. swap to stmarkerContr - } ; - in wordOrder subj.a 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 } - } ; - - wordOrder : Agreement -> (sn : Str) -> (stm,obj : {p1,p2 : Str}) -> {fin,inf : Str} -> VerbPhrase -> ClType -> BaseCl = - \agr,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 - attracted to the head nominal and thus move away from the verbal group." - -} - beforeSTM = vp.berri -- AdV - ++ subjnoun -- subject if it's a noun - ++ 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 = vp.vComp.subjunc -- "waa in" construction - ++ 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 - ++ vp.secObj -- "second object" - ++ vp.vComp.inf -- VV complement, if it's infinitive - ++ pred.inf -- potential infinitive/participle - ++ pred.fin -- the verb inflected - ++ vp.vComp.subcl ! agr -- VV complement, if it's subordinate clause - ++ vp.miscAdv } ; ---- NB. Only used if there are several adverbs, or for "waa in" construction. - ---- Primary places for adverbs are obj, sii or dhex. - - wordOrderLite : ClType -> ClLite -> QClause = \cltyp,cllite -> { + wordOrder : ClType -> (rel,sp,stm : Bool) -> ClSlash -> Clause = \cltyp,isRel,hasSubjPron,hasSTM,incomplCl -> { s = \\t,a,p => - let cl = complCl cllite ; + let -- Put all arguments in their right place + cl : ClSlash = complCl incomplCl ; + + -- Contractions bind : Str = case of { => [] ; -- nothing to attach to the STM _ => BIND } ; -- something to attach, use BIND @@ -1009,48 +934,65 @@ oper -- object pronoun and prepositions contract with negation => {p2 = [] ; p1 = cl.comp.p1 ++ cl.comp.p2 ++ bind} ; _ => cl.comp } ; - pred = cl.pred ! cltyp ! t ! a ! p in - cl.berri -- AdV + -- Placement of object noun varies depending on type of clause + statementNounObj = case cltyp of { + Statement => obj.p1 ; + _ => [] } ; + subordNounObj = case cltyp of { + Subord => obj.p1 ; + _ => [] } ; + questionNounObj = case cltyp of { + Question => obj.p1 ; + _ => [] } ; + + -- Control whether to include subject pronoun and STM + subjpron : Str = case of { + => [] ; + => cl.subj.pron ; + _ => [] } ; + stm : Str = case of { + => cl.stm ! cltyp ! p ; + <_,Neg> => cl.stm ! cltyp ! p ; -- negation overrides hasSTM=False + _ => [] } + in cl.berri -- AdV ++ cl.subj.noun -- subject if it's a noun - ++ case cltyp of { - Subord => [] ; - _ => obj.p1 } -- noun object if it's a statement + ++ statementNounObj -- noun object if it's a statement - ++ cl.stm ! cltyp ! p -- STM + ++ stm - ++ cl.vComp.subjunc -- "waa in" construction - ++ cl.subj.pron - ++ case cltyp of { - Subord => obj.p1 ; -- noun object if it's subordinate clause - _ => [] } + ++ cl.vComp.subjunc -- "waa in" construction / + ++ subjpron -- subject pronoun + + ++ subordNounObj -- noun object if it's subordinate clause: "timir aan /laf/ lahayn" (Saeed p. 210-211) ++ obj.p2 -- object if it's a pronoun ++ 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 - ++ pred.inf -- potential infinitive/participle - ++ pred.fin -- the verb inflected + ++ cl.pred ! cltyp ! t ! a ! p -- the inflecting verb + ++ 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. } ; ---- Primary places for adverbs are obj, sii or dhex. - + + VFun : Type = Tense -> Anteriority -> Polarity -> Agreement -> BaseVerb - -> {fin : Str ; inf : Str} ; + -> Str ; vf : ClType -> VFun = \clt -> case clt of { Subord => vfSubord ; _ => vfStatement } ; vfStatement : VFun = \t,ant,p,agr,vp -> case of { - => {fin = pastV have_V ; inf = vp.s ! VInf} ; - => {fin = condNegV vp ; inf = []} ; - => {fin = presV vp ; inf = [] } ; - => {fin = pastV vp ; inf = [] } ; - => {fin = presCopula ! agrPol ; inf = vp.s ! VInf } ; ---- just guessing - => {fin = pastV (cSug "jir") ; inf = vp.s ! VInf} ; - => {fin = presV (cSug "doon") ; inf = vp.s ! VInf} ; - => {fin = pastV (cSug "doon") ; inf = vp.s ! VInf} + => vp.s ! VInf ++ pastV have_V ; + => condNegV vp ; + => presV vp ; + => pastV vp ; + => vp.s ! VInf ++ presCopula ! agrPol ; ---- just guessing + => vp.s ! VInf ++ pastV (cSug "jir") ; + => vp.s ! VInf ++ presV (cSug "doon") ; + => vp.s ! VInf ++ pastV (cSug "doon") } where { agrPol : {agr:Agreement ; pol:Polarity} = {agr=agr; pol=p} ; @@ -1103,13 +1045,13 @@ oper oper linVP : VForm -> ClType -> VerbPhrase -> Str = \vf,cltyp,vp -> - let vp' = complSlash vp ; - inf = {inf = vp.s ! vf ; fin=[]} ; + let pred = vp.s ! vf ; + vp' = complSlash vp ; stm = case of { => {p1 = "aan" ; p2 = []} ; _ => {p1,p2 = []} } ; - wo = wordOrder (Sg3 Masc) [] stm (vp'.comp ! pagr2agr vp.obj2.a) inf vp' cltyp ; + wo = wordOrderOld (Sg3 Masc) [] stm (vp'.comp ! pagr2agr vp.obj2.a) pred vp' cltyp ; in wo.beforeSTM ++ wo.stm ++ wo.afterSTM ; linCN : CNoun -> Str = \cn -> cn.s ! Indef Sg ++ cn.mod ! Indefinite ! Sg ! Abs ; @@ -1122,4 +1064,32 @@ oper ++ adv.miscAdv ; linBaseCl : BaseCl -> Str = \b -> b.beforeSTM ++ b.stm ++ b.afterSTM ; + + -- TODO: deprecate eventually + BaseCl : Type = {beforeSTM, stm, afterSTM : Str} ; -- adverbs, subjects, all that comes before sentence type marker. Eventual Subj attaches to the part after STM. + + wordOrderOld : Agreement -> (sn : Str) -> (stm,obj : {p1,p2 : Str}) -> Str -> VerbPhrase -> ClType -> BaseCl = + \agr,subjnoun,stm,obj,pred,vp,cltyp -> { + beforeSTM = vp.berri -- AdV + ++ subjnoun -- subject if it's a noun + ++ 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 = vp.vComp.subjunc -- "waa in" construction + ++ 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 + ++ vp.secObj -- "second object" + ++ vp.vComp.inf -- VV complement, if it's infinitive + ++ pred -- the verb inflected + ++ vp.vComp.subcl ! agr -- VV complement, if it's subordinate clause + ++ vp.miscAdv } ; ---- NB. Only used if there are several adverbs, or for "waa in" construction. + } diff --git a/src/somali/SentenceSom.gf b/src/somali/SentenceSom.gf index 129fc9a6c..e09de077b 100644 --- a/src/somali/SentenceSom.gf +++ b/src/somali/SentenceSom.gf @@ -15,7 +15,7 @@ lin --2 Clauses missing object noun phrases -- : NP -> VPSlash -> ClSlash ; - SlashVP = predVPSlash ; + SlashVP = predVP ; {- -- : ClSlash -> Adv -> ClSlash ; -- (whom) he sees today AdvSlash cls adv = cls ** insertAdv adv cls ; @@ -27,9 +27,9 @@ lin -} -- : Temp -> Pol -> ClSlash -> SSlash ; -- (that) she had not seen - UseSlash t p cls = {s = \\b => - let sent = cls.s ! b ! t.t ! t.a ! p.p in - sent ** {beforeSTM = t.s ++ p.s ++ sent.beforeSTM} + UseSlash t p cls = { + s = \\isSubord => let cl = cl2sentence isSubord cls in + t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p } ; --2 Imperatives @@ -52,10 +52,9 @@ lin -} -- : Temp -> Pol -> Cl -> S ; - UseCl t p cl = {s = \\b => - let cltyp = if_then_else ClType b Subord Statement ; - sent = cl.s ! cltyp ! t.t ! t.a ! p.p in - sent ** {beforeSTM = t.s ++ p.s ++ sent.beforeSTM} ; + UseCl t p cls = { + s = \\isSubord => let cl = cl2sentence isSubord cls in + t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p } ; -- : Temp -> Pol -> QCl -> QS ; @@ -77,7 +76,8 @@ lin oper - advS : Adverb -> S -> S = \a,s -> s ** {s = \\b => let ss = s.s ! b in - ss ** {beforeSTM = linAdv a ++ ss.beforeSTM}} ; + advS : Adverb -> S -> S = \a,sent -> sent ** { + s = \\b => sent.s ! b ++ linAdv a + } ; } diff --git a/src/somali/VerbSom.gf b/src/somali/VerbSom.gf index 43631c24a..27e87b27f 100644 --- a/src/somali/VerbSom.gf +++ b/src/somali/VerbSom.gf @@ -27,9 +27,9 @@ lin vComp = vc ** { -- The whole previous VP becomes the subordinate clause subcl = \\agr => let subj = pronTable ! agr ; - cls = predVPSlash subj vp ; - rcl = mergeRCl (cls.s ! True) ; - in "in" ++ rcl.s ! Pres ! Simul ! Pos + cls = predVPslash subj vp ; + scl = cl2sentence True cls ; + in scl.s ! Pres ! Simul ! Pos } } ;