diff --git a/lib/src/danish/ParadigmsDan.gf b/lib/src/danish/ParadigmsDan.gf index 28b4bd293..682a3a8db 100644 --- a/lib/src/danish/ParadigmsDan.gf +++ b/lib/src/danish/ParadigmsDan.gf @@ -341,7 +341,7 @@ oper makeNP : Str -> Str -> Number -> Gender -> NP ; makeNP x y n g = - {s = table {NPPoss _ _ => x ; _ => y} ; a = agrP3 g n ; + {s = table {NPPoss _ _ => x ; _ => y} ; a = agrP3 g n ; isPron = False ; lock_NP = <>} ; mk3A = mk3ADeg ; diff --git a/lib/src/norwegian/ExtraNor.gf b/lib/src/norwegian/ExtraNor.gf index bdc8361eb..a00f41240 100644 --- a/lib/src/norwegian/ExtraNor.gf +++ b/lib/src/norwegian/ExtraNor.gf @@ -3,7 +3,8 @@ concrete ExtraNor of ExtraNorAbs = ExtraScandNor ** open CommonScand, ResNor, Pr lin PossNPPron np pro = { s = \\c => np.s ! NPNom ++ pro.s ! NPPoss (gennumAgr np.a) (caseNP c) ; - a = np.a + a = np.a ; + isPron = False ; } ; TFutKommer = {s = []} ** {t = SFutKommer} ; --# notpresent diff --git a/lib/src/norwegian/ParadigmsNor.gf b/lib/src/norwegian/ParadigmsNor.gf index 56d131c77..899f9035a 100644 --- a/lib/src/norwegian/ParadigmsNor.gf +++ b/lib/src/norwegian/ParadigmsNor.gf @@ -326,7 +326,7 @@ oper makeNP : Str -> Str -> Number -> Gender -> NP ; makeNP x y n g = - {s = table {NPPoss _ _ => x ; _ => y} ; a = agrP3 (ngen2gen g) n ; + {s = table {NPPoss _ _ => x ; _ => y} ; a = agrP3 (ngen2gen g) n ; isPron = False ; lock_NP = <>} ; mk3A = mk3ADeg ; ---- (mkAdject a b c [] []) ** {isComp = False ; lock_A = <>} ; diff --git a/lib/src/scandinavian/CatScand.gf b/lib/src/scandinavian/CatScand.gf index 0e50038f6..949256c8e 100644 --- a/lib/src/scandinavian/CatScand.gf +++ b/lib/src/scandinavian/CatScand.gf @@ -41,11 +41,14 @@ incomplete concrete CatScand of Cat = VP = { s : Voice => VPForm => { fin : Str ; -- V1 har ---s1 - inf : Str -- V2 sagt ---s4 + inf : Str ; -- V2 sagt ---s4 + a1 : Polarity => Agr => Str * Str ; -- A1 inte ---s3 själv/själva/självt + -- p1: with infinite "jag har inte älskat dig", + -- p2: without infinite "jag älskar dig inte" } ; sp : PartForm => Str ; - a1 : Polarity => Agr => Str ; -- A1 inte ---s3 - n2 : Agr => Str ; -- N2 dig ---s5 + n1 : Agr => Str ; -- N2 dig ---s5 + n2 : Agr => Str ; -- N2 den där mannen ---s5 a2 : Str ; -- A2 idag ---s6 ext : Str ; -- S-Ext att hon går ---s7 en2,ea2,eext : Bool -- indicate if the field exists @@ -69,7 +72,8 @@ incomplete concrete CatScand of Cat = -- as $Quant$. CN = {s : Number => DetSpecies => Case => Str ; g : NGender ; isMod : Bool} ; - NP,Pron = {s : NPForm => Str ; a : Agr} ; + NP = {s : NPForm => Str ; a : Agr ; isPron : Bool} ; + Pron = {s : NPForm => Str ; a : Agr} ; Det = {s,sp : Bool => NGender => Str ; n : Number ; det : DetSpecies} ; Quant = {s,sp : Number => Bool => Bool => NGender => Str ; det : DetSpecies} ; Predet = {s : Gender => Number => Str ; p : Str ; a : PredetAgr} ; diff --git a/lib/src/scandinavian/CommonScand.gf b/lib/src/scandinavian/CommonScand.gf index 08bd20d33..0ed6c3f1c 100644 --- a/lib/src/scandinavian/CommonScand.gf +++ b/lib/src/scandinavian/CommonScand.gf @@ -145,7 +145,7 @@ oper } ; --- Used in $DiffScand.predV$. +-- Used in $ResScand.predV$. vFin : STense -> Voice -> VForm = \t,v -> case t of { SPres => VF (VPres v) @@ -276,9 +276,9 @@ oper detForms : (x1,x2,x3 : Str) -> Gender => Number => Str = \den,det,de -> \\g,n => gennumForms den det de ! gennum g n ; - regNP : Str -> Str -> Gender -> Number -> {s : NPForm => Str ; a : Agr} = + regNP : Str -> Str -> Gender -> Number -> {s : NPForm => Str ; a : Agr ; isPron : Bool} = \det,dess,g,n -> - mkNP det det dess dess dess g n P3 ; + mkNP det det dess dess dess g n P3 ** {isPron = False} ; -- For $Verb$. @@ -286,11 +286,14 @@ oper VP = { s : Voice => VPForm => { fin : Str ; -- V1 har ---s1 - inf : Str -- V2 sagt ---s4 + inf : Str ; -- V2 sagt ---s4 + a1 : Polarity => Agr => Str * Str ; -- A1 inte ---s3 själv/själva/självt + -- p1: with infinite "jag har inte älskat dig", + -- p2: without infinite "jag älskar dig inte" } ; sp : PartForm => Str ; -- present or past participle - a1 : Polarity => Agr => Str ; -- A1 inte ---s3 själv/själva/självt - n2 : Agr => Str ; -- N2 dig ---s5 + n1 : Agr => Str ; -- N1 sig/dig ---s5 + n2 : Agr => Str ; -- N2 den här mannen ---s5 a2 : Str ; -- A2 idag ---s6 ext : Str ; -- S-Ext att hon går ---s7 --- ea1,ev2, --- these depend on params of v and a1 @@ -298,11 +301,14 @@ oper } ; - insertObj : (Agr => Str) -> VP -> VP = \obj,vp -> vp ** { - n2 = \\a => obj ! a ++ vp.n2 ! a ; - en2 = True ; + insertObjPron : Bool -> (Agr => Str) -> VP -> VP = \isPron,obj,vp -> vp ** { + n1 = \\a => if_then_Str isPron (obj ! a ++ vp.n2 ! a) [] ; + n2 = \\a => if_then_Str isPron [] (obj ! a ++ vp.n2 ! a) ; + en2 = notB isPron ; } ; - + + insertObj : (Agr => Str) -> VP -> VP = insertObjPron False ; + insertObjPost : (Agr => Str) -> VP -> VP = \obj,vp -> vp ** { n2 = \\a => vp.n2 ! a ++ obj ! a ; en2 = True ; @@ -324,27 +330,23 @@ oper a1 = \\b,a => vp.a1 ! b ! a ++ adv ! a ; } ; - passiveVP : VP -> VP = \vp -> { + passiveVP : VP -> VP = \vp -> vp ** { s = \\_ => vp.s ! Pass ; -- forms the s-passive - sp = vp.sp ; - a1 = vp.a1 ; - n2 = vp.n2 ; - a2 = vp.a2 ; - ext = vp.ext ; - en2 = vp.en2 ; - ea2 = vp.ea2 ; - eext = vp.eext } ; infVP : VP -> Agr -> Str = \vp,a -> infVPPlus vp a Simul Pos ; - infVPPlus : VP -> Agr -> Anteriority -> Polarity -> Str = \vp,a,ant,pol -> - vp.a1 ! pol ! a ++ (vp.s ! Act ! VPInfinit ant).inf ++ vp.n2 ! a ++ vp.a2 ++ vp.ext ; --- a1 + infVPPlus : VP -> Agr -> Anteriority -> Polarity -> Str = \vp,a,ant,pol -> + let negs = (vp.s ! Act ! VPInfinit Simul).a1 ! pol ! a + in negs.p1 ++ negs.p2 ++ (vp.s ! Act ! VPInfinit ant).inf ++ vp.n1 ! a ++ vp.n2 ! a ++ vp.a2 ++ vp.ext ; --- a1 partVPPlus : VP -> PartForm -> Agr -> Polarity -> Str = \vp,pf,a,pol -> - vp.a1 ! pol ! a ++ vp.n2 ! a ++ vp.a2 ++ vp.ext ++ vp.sp ! pf ; -- verb final: i sängen liggande - partVPPlusPost : VP -> PartForm -> Agr -> Polarity -> Str = \vp,pf,a,pol -> - vp.a1 ! pol ! a ++ vp.sp ! pf ++ vp.n2 ! a ++ vp.a2 ++ vp.ext ; -- verb first: liggande i sängen + let negs = (vp.s ! Act ! VPInfinit Simul).a1 ! pol ! a + in negs.p1 ++ negs.p2 ++ vp.n1 ! a ++ vp.n2 ! a ++ vp.a2 ++ vp.ext ++ vp.sp ! pf ; -- verb final: i sängen liggande + + partVPPlusPost : VP -> PartForm -> Agr -> Polarity -> Str = \vp,pf,a,pol -> + let negs = (vp.s ! Act ! VPInfinit Simul).a1 ! pol ! a + in negs.p1 ++ negs.p2 ++ vp.sp ! pf ++ vp.n1 ! a ++ vp.n2 ! a ++ vp.a2 ++ vp.ext ; -- verb first: liggande i sängen -- For $Sentence$. @@ -357,14 +359,21 @@ oper s = \\t,a,b,o => let verb = vp.s ! Act ! VPFinite t a ; - neg = vp.a1 ! b ! agr ; - compl = vp.n2 ! agr ++ vp.a2 ++ vp.ext + neg = verb.a1 ! b ! agr ; + pron = vp.n1 ! agr ; + compl = vp.n2 ! agr ++ vp.a2 ++ vp.ext ; + pronneg = neg.p1 ++ verb.inf ++ pron ++ neg.p2 ++ compl ; -- jag älskar dig inte in case o of { - Main => subj ++ verb.fin ++ neg ++ verb.inf ++ compl ; - Inv => verb.fin ++ subj ++ neg ++ verb.inf ++ compl ; - Sub => subj ++ neg ++ verb.fin ++ verb.inf ++ compl + Main => subj ++ verb.fin ++ pronneg ; + Inv => verb.fin ++ subj ++ pronneg ; + Sub => subj ++ neg.p1 ++ neg.p2 ++ verb.fin ++ verb.inf ++ pron ++ compl } } ; } + +-- har inte älskat dig +-- älskar dig inte +-- har jag inte älskat dig +-- älskar jag dig inte \ No newline at end of file diff --git a/lib/src/scandinavian/ConjunctionScand.gf b/lib/src/scandinavian/ConjunctionScand.gf index 3df83e0e7..82610b668 100644 --- a/lib/src/scandinavian/ConjunctionScand.gf +++ b/lib/src/scandinavian/ConjunctionScand.gf @@ -13,7 +13,8 @@ incomplete concrete ConjunctionScand of Conjunction = ConjAdv conj ss = conjunctDistrSS conj ss ; ConjNP conj ss = conjunctDistrTable NPForm conj ss ** { - a = {g = ss.a.g ; n = conjNumber conj.n ss.a.n ; p = ss.a.p} + a = {g = ss.a.g ; n = conjNumber conj.n ss.a.n ; p = ss.a.p} ; + isPron = False } ; ConjAP conj ss = conjunctDistrTable AFormPos conj ss ** { diff --git a/lib/src/scandinavian/ExtraScand.gf b/lib/src/scandinavian/ExtraScand.gf index c6906ac99..c1c10b16c 100644 --- a/lib/src/scandinavian/ExtraScand.gf +++ b/lib/src/scandinavian/ExtraScand.gf @@ -77,13 +77,14 @@ incomplete concrete ExtraScand of ExtraScandAbs = CatScand ** MkVPS t p vp = { s = \\o,a => let - neg = vp.a1 ! p.p ! a ; - verb = vp.s ! Act ! VPFinite t.t t.a ; - compl = verb.inf ++ vp.n2 ! a ++ vp.a2 ++ vp.ext ; + verb = vp.s ! Act ! VPFinite t.t t.a ; + neg = verb.a1 ! p.p ! a ; + compl = vp.n2 ! a ++ vp.a2 ++ vp.ext ; + pron = vp.n1 ! a in t.s ++ p.s ++ case o of { - Main => verb.fin ++ neg ++ compl ; - Inv => verb.fin ++ neg ++ compl ; ---- - Sub => neg ++ verb.fin ++ compl + Main => verb.fin ++ neg.p1 ++ verb.inf ++ pron ++ neg.p2 ++ compl ; + Inv => verb.fin ++ neg.p1 ++ verb.inf ++ pron ++ neg.p2 ++ compl ; ---- + Sub => neg.p1 ++ neg.p2 ++ verb.fin ++ verb.inf ++ pron ++ compl } } ; diff --git a/lib/src/scandinavian/MarkupScand.gf b/lib/src/scandinavian/MarkupScand.gf index 1372444e5..7c71607bf 100644 --- a/lib/src/scandinavian/MarkupScand.gf +++ b/lib/src/scandinavian/MarkupScand.gf @@ -2,7 +2,7 @@ incomplete concrete MarkupScand of Markup = CatScand, MarkHTMLX ** open ResScand lin MarkupCN m cn = {s = \\n,d,c => appMark m (cn.s ! n ! d ! c) ; g = cn.g ; isMod = cn.isMod} ; - MarkupNP m np = {s = \\c => appMark m (np.s ! c) ; a = np.a} ; + MarkupNP m np = {s = \\c => appMark m (np.s ! c) ; a = np.a ; isPron = np.isPron} ; MarkupAP m ap = {s = \\a => appMark m (ap.s ! a) ; isPre = ap.isPre} ; MarkupAdv m adv = {s = appMark m adv.s} ; MarkupS m s = {s = \\o => appMark m (s.s ! o)} ; diff --git a/lib/src/scandinavian/NounScand.gf b/lib/src/scandinavian/NounScand.gf index 93ed4cbc3..51dd56806 100644 --- a/lib/src/scandinavian/NounScand.gf +++ b/lib/src/scandinavian/NounScand.gf @@ -20,34 +20,40 @@ incomplete concrete NounScand of Noun = in { s = \\c => det.s ! m ! g ++ cn.s ! det.n ! dd ! caseNP c ; - a = agrP3 (ngen2gen g) det.n + a = agrP3 (ngen2gen g) det.n ; + isPron = False } ; UsePN pn = { s = \\c => pn.s ! caseNP c ; - a = agrP3 pn.g Sg + a = agrP3 pn.g Sg ; + isPron = False } ; - UsePron p = p ; + UsePron p = p ** {isPron = True} ; PredetNP pred np = { s = \\c => pred.s ! np.a.g ! np.a.n ++ pred.p ++ np.s ! c ; - a = case pred.a of {PAg n => agrP3 np.a.g n ; _ => np.a} + a = case pred.a of {PAg n => agrP3 np.a.g n ; _ => np.a} ; + isPron = False } ; PPartNP np v2 = { s = \\c => np.s ! c ++ v2.s ! (VI (VPtPret (agrAdjNP np.a DIndef) Nom)) ; - a = np.a + a = np.a ; + isPron = False } ; AdvNP np adv = { s = \\c => np.s ! c ++ adv.s ; - a = np.a + a = np.a ; + isPron = False } ; ExtAdvNP np adv = { s = \\c => np.s ! c ++ embedInCommas adv.s ; - a = np.a + a = np.a ; + isPron = False } ; DetQuantOrd quant num ord = { @@ -84,7 +90,8 @@ incomplete concrete NounScand of Noun = m = True ; ---- is this needed for other than Art? in { s = \\c => det.sp ! m ! g ; ---- case of det! - a = agrP3 (ngen2gen g) det.n + a = agrP3 (ngen2gen g) det.n ; + isPron = False } ; PossPron p = { @@ -141,7 +148,8 @@ incomplete concrete NounScand of Noun = MassNP cn = { s = \\c => cn.s ! Sg ! DIndef ! caseNP c ; - a = agrP3 (ngen2gen cn.g) Sg + a = agrP3 (ngen2gen cn.g) Sg ; + isPron = False } ; UseN, UseN2 = \noun -> { @@ -200,7 +208,7 @@ incomplete concrete NounScand of Noun = RelNP np rs = { s = \\c => np.s ! c ++ "," ++ rs.s ! np.a ! RNom ; a = np.a ; - isMod = np.isMod + isPron = False } ; AdvCN cn sc = let g = cn.g in { @@ -238,7 +246,8 @@ incomplete concrete NounScand of Noun = m = True ; ---- see DetNP above in { s = \\c => det.sp ! m ! ng ++ av_Prep ++ np.s ! NPAcc ; - a = agrP3 g det.n + a = agrP3 g det.n ; + isPron = False } ; AdjDAP det ap = { diff --git a/lib/src/scandinavian/QuestionScand.gf b/lib/src/scandinavian/QuestionScand.gf index 03b31ebfa..cba96013a 100644 --- a/lib/src/scandinavian/QuestionScand.gf +++ b/lib/src/scandinavian/QuestionScand.gf @@ -1,5 +1,5 @@ incomplete concrete QuestionScand of Question = - CatScand ** open CommonScand, ResScand in { + CatScand ** open CommonScand, ResScand, Prelude in { flags optimize=all_subs ; diff --git a/lib/src/scandinavian/ResScand.gf b/lib/src/scandinavian/ResScand.gf index de791a473..062d92773 100644 --- a/lib/src/scandinavian/ResScand.gf +++ b/lib/src/scandinavian/ResScand.gf @@ -37,44 +37,49 @@ interface ResScand = DiffScand ** open CommonScand, Prelude in { True => verbBe.s ; _ => verbHave.s } ; - + har : STense -> Str = \t -> auxv ! vFin t Act ; ha : Str = auxv ! VI (VInfin Act) ; - vf : Str -> Str -> {fin,inf : Str} = \fin,inf -> { - fin = fin ; inf = inf ++ verb.part --- not always right after the verb: hon ser (inte) vacker ut ; spotta ut snusen + vf : Bool -> Str -> Str -> {fin,inf : Str ; a1 : Polarity => Agr => Str * Str} = \hasInf, fin,inf -> { + fin = fin ; + inf = inf ++ verb.part ; --- not always right after the verb: hon ser (inte) vacker ut ; spotta ut snusen + a1 : Polarity => Agr => Str*Str = \\p,a => case hasInf of { + True => ; + False => <[], negation ! p> + } } ; in { s = \\d => table { VPFinite t Simul => case t of { -- SPres | SPast => vf (vfin d t) [] ; -- the general rule - SPast => vf (vfin d t) [] ; --# notpresent - SFut => vf auxFut (vinf d) ; --# notpresent - SFutKommer => vf auxFutKommer (auxFutPart ++ infMark ++ vinf d) ; --# notpresent - SCond => vf auxCond (vinf d) ; --# notpresent - SPres => vf (vfin d t) [] + SPast => vf False (vfin d t) [] ; --# notpresent + SFut => vf True auxFut (vinf d) ; --# notpresent + SFutKommer => vf True auxFutKommer (auxFutPart ++ infMark ++ vinf d) ; --# notpresent + SCond => vf True auxCond (vinf d) ; --# notpresent + SPres => vf False (vfin d t) [] } ; VPFinite t Anter => case t of { --# notpresent - SPres | SPast => vf (har t) (vsup d) ; --# notpresent - SFut => vf auxFut (ha ++ vsup d) ; --# notpresent - SFutKommer => vf auxFutKommer (auxFutPart ++ infMark ++ ha ++ vsup d) ; --# notpresent - SCond => vf auxCond (ha ++ vsup d) --# notpresent + SPres | SPast => vf True (har t) (vsup d) ; --# notpresent + SFut => vf True auxFut (ha ++ vsup d) ; --# notpresent + SFutKommer => vf True auxFutKommer (auxFutPart ++ infMark ++ ha ++ vsup d) ; --# notpresent + SCond => vf True auxCond (ha ++ vsup d) --# notpresent } ; --# notpresent - VPImperat => vf (verb.s ! VF (VImper (diath d))) [] ; - VPInfinit Anter => vf [] (ha ++ vsup d) ; --# notpresent - VPInfinit Simul => vf [] (vinf d) + VPImperat => vf False (verb.s ! VF (VImper (diath d))) [] ; + VPInfinit Anter => vf True [] (ha ++ vsup d) ; --# notpresent + VPInfinit Simul => vf True [] (vinf d) } ; sp = table { PartPret a c => verb.s ! (VI (VPtPret a c)) ; PartPres n s c => verb.s ! (VI (VPtPres n s c)) } ; - a1 : Polarity => Agr => Str = \\p,a => negation ! p ; - n2 : Agr => Str = \\a => case verb.vtype of { - VRefl => reflPron a ; - _ => [] - } ; + n1 : Agr => Str = \\a => case verb.vtype of { + VRefl => reflPron a ; + _ => [] + } ; + n2 : Agr => Str = \\a => [] ; a2 : Str = [] ; ext : Str = [] ; en2,ea2,eext : Bool = False -- indicate if the field exists diff --git a/lib/src/scandinavian/SentenceScand.gf b/lib/src/scandinavian/SentenceScand.gf index 9cbb495b3..336e4baa3 100644 --- a/lib/src/scandinavian/SentenceScand.gf +++ b/lib/src/scandinavian/SentenceScand.gf @@ -13,8 +13,10 @@ incomplete concrete SentenceScand of Sentence = let agr = {g = Utr ; n = n ; p = P2} ; verb = vp.s ! Act ! VPImperat ; + neg = verb.a1 ! pol ! agr ; + pron = vp.n1 ! agr in - verb.fin ++ vp.a1 ! pol ! agr ++ verb.inf ++ vp.n2 ! agr ++ vp.a2 ++ vp.ext + verb.fin ++ neg.p1 ++ verb.inf ++ pron ++ neg.p2 ++ vp.n2 ! agr ++ vp.a2 ++ vp.ext } ; SlashVP np vp = diff --git a/lib/src/scandinavian/SymbolScand.gf b/lib/src/scandinavian/SymbolScand.gf index d27401f49..1997c6c8a 100644 --- a/lib/src/scandinavian/SymbolScand.gf +++ b/lib/src/scandinavian/SymbolScand.gf @@ -8,15 +8,18 @@ lin NumPN i = {s = \\c => i.s!neutrum ; g = Neutr} ; --- c CNIntNP cn i = { s = \\c => (cn.s ! Sg ! DIndef ! Nom ++ i.s) ; - a = agrP3 (ngen2gen cn.g) Sg + a = agrP3 (ngen2gen cn.g) Sg ; + isPron = False } ; CNSymbNP det cn xs = let g = cn.g in { s = \\c => det.s ! cn.isMod ! g ++ cn.s ! det.n ! det.det ! caseNP c ++ xs.s ; - a = agrP3 (ngen2gen g) det.n + a = agrP3 (ngen2gen g) det.n ; + isPron = False } ; CNNumNP cn i = { s = \\c => (cn.s ! Sg ! DIndef ! Nom ++ i.s ! neutrum) ; - a = agrP3 (ngen2gen cn.g) Sg + a = agrP3 (ngen2gen cn.g) Sg ; + isPron = False } ; SymbS sy = {s = \\_ => sy.s} ; diff --git a/lib/src/scandinavian/VerbScand.gf b/lib/src/scandinavian/VerbScand.gf index 0f0a8000a..4dfc95cc6 100644 --- a/lib/src/scandinavian/VerbScand.gf +++ b/lib/src/scandinavian/VerbScand.gf @@ -8,7 +8,7 @@ incomplete concrete VerbScand of Verb = CatScand ** open CommonScand, ResScand, SlashV2a v = predV v ** {n3 = \\_ => [] ; c2 = v.c2} ; Slash2V3 v np = - insertObj (\\_ => v.c2.s ++ np.s ! accusative) (predV v) ** + insertObjPron np.isPron (\\_ => v.c2.s ++ np.s ! accusative) (predV v) ** {n3 = \\_ => [] ; c2 = v.c3} ; -- to preserve the order of args Slash3V3 v np = predV v ** { n3 = \\_ => v.c3.s ++ np.s ! accusative ; @@ -37,19 +37,20 @@ incomplete concrete VerbScand of Verb = CatScand ** open CommonScand, ResScand, c2 = v.c2 } ; - ComplSlash vp np = - insertObjPost - (\\_ => vp.c2.s ++ np.s ! accusative ++ vp.n3 ! np.a) vp ; + ComplSlash vp np = + insertObjPost (\\_ => vp.n3 ! np.a) + (insertObjPron (andB np.isPron (notB vp.c2.hasPrep)) (\\_ => vp.c2.s ++ np.s ! accusative) + vp) ; SlashVV v vp = insertObj (\\a => v.c2.s ++ infVP vp a) (predV v) ** {n3 = vp.n3 ; c2 = vp.c2} ; SlashV2VNP v np vp = - insertObj + insertObj (\\a => v.c2.s ++ np.s ! accusative ++ v.c3.s ++ infVP vp a) (predV v) ** {n3 = vp.n3 ; c2 = v.c2} ; - UseComp comp = insertObj + UseComp comp = insertObj comp.s (predV verbBe) ; CompAP ap = {s = \\a => ap.s ! agrAdjNP a DIndef} ; @@ -59,12 +60,12 @@ incomplete concrete VerbScand of Verb = CatScand ** open CommonScand, ResScand, AdvVP vp adv = insertAdv adv.s vp ; AdVVP adv vp = insertAdV adv.s vp ; - ReflVP vp = insertObj (\\a => vp.c2.s ++ reflPron a ++ vp.n3 ! a) vp ; + ReflVP vp = insertObjPron (notB vp.c2.hasPrep) (\\a => reflPron a) (insertObj (\\a => vp.c2.s ++ vp.n3 ! a) vp) ; VPSlashPrep vp prep = vp ** {n3 = \\_ => [] ; c2 = {s = prep.s ; hasPrep = True}} ; PassV2 v = - insertObj + insertObj (\\a => v.s ! VI (VPtPret (agrAdjNP a DIndef) Nom)) (predV verbBecome) ; diff --git a/lib/src/swedish/ExtraSwe.gf b/lib/src/swedish/ExtraSwe.gf index bc5118e70..401145b0c 100644 --- a/lib/src/swedish/ExtraSwe.gf +++ b/lib/src/swedish/ExtraSwe.gf @@ -1,8 +1,7 @@ --# -path=.:../scandinavian:../abstract:../common:prelude -concrete ExtraSwe of ExtraSweAbs = ExtraScandSwe - [FocAdv] , - ParadigmsSwe - [nominative] ** +concrete ExtraSwe of ExtraSweAbs = ExtraScandSwe - [FocAdv] ** open CommonScand, ResSwe, ParamX, VerbSwe, Prelude, DiffSwe, StructuralSwe, MorphoSwe, - NounSwe, Coordination, AdjectiveSwe, SentenceSwe, AdverbSwe, RelativeSwe in { + NounSwe, Coordination, AdjectiveSwe, SentenceSwe, AdverbSwe, RelativeSwe, (P = ParadigmsSwe) in { flags coding=utf8 ; lincat @@ -25,7 +24,8 @@ lin m = True ; ---- is this needed for other than Art? in lin NP { s = \\c => det.sp ! m ! g; - a = agrP3 (ngen2gen g) num + a = agrP3 (ngen2gen g) num ; + isPron = False } ; lin @@ -46,7 +46,9 @@ lin AdvFocVP adv vp = vp ** { s = \\v,vpf => {fin = adv.s ++ (vp.s ! v ! vpf).fin ; - inf = (vp.s ! v ! vpf).inf} + inf = (vp.s ! v ! vpf).inf ; + a1 = (vp.s ! v ! vpf).a1 + } } ; PredetAdvF adv = {s = \\_,_ => adv.s ; p = [] ; a = PNoAg} ; @@ -91,12 +93,13 @@ lin <_ ,Anter> => (vp.s ! Act ! VPFinite SPast Anter).inf --# notpresent }; verb = mkClause subj agr (predV do_V) ; - comp = vp.n2 ! agr ++ vp.a2 ++ vp.ext + comp = vp.n1 ! agr ++ vp.n2 ! agr ++ vp.a2 ++ vp.ext ; + neg = vps.a1 ! Pos ! agr in - vf ++ comp ++ (verb.s ! t ! a ! p ! Inv) ++ vp.a1 ! Pos ! agr + vf ++ comp ++ (verb.s ! t ! a ! p ! Inv) ++ neg.p1 ++ neg.p2 ---- } ; - oper do_V : V = mkV "göra" "gör" "gör" "gjorde" "gjort" "gjord" ; + oper do_V : V = P.mkV "göra" "gör" "gör" "gjorde" "gjort" "gjord" ; lin FocAP ap np = @@ -113,10 +116,14 @@ lin let vps = vp.s ! Act ! VPInfinit Simul ; vvp = UseV vv ; vvs = vvp.s ! Act ! VPFinite t a ; - always = vp.a1 ! Pos ! np.a ++ vvp.a1 ! Pos ! np.a ; - already = vp.a2 ++ vvp.a2 in + vpsneg = vps.a1 ! Pos ! np.a ; + vvsneg = vvs.a1 ! Pos ! np.a ; + always = vpsneg.p1 ++ vpsneg.p2 ++ vvsneg.p1 ++ vvsneg.p2 ; + already = vp.a2 ++ vvp.a2 + in vps.inf ++ vp.n2 ! np.a ++ vvs.fin ++ np.s ! NPNom - ++ vv.c2.s ++ always ++ negation ! p ++ already ++ vvs.inf + ++ vv.c2.s ++ always ++ + negation ! p ++ already ++ vvs.inf }; @@ -155,13 +162,13 @@ lin SupCl np vp pol = let sub = np.s ! nominative ; --# notpresent - verb = (vp.s ! Act ! VPFinite SPres Anter).inf ; --# notpresent - neg = vp.a1 ! pol.p ! np.a ++ pol.s ; --# notpresent + verb = (vp.s ! Act ! VPFinite SPres Anter) ; --# notpresent + neg = verb.a1 ! pol.p ! np.a ; --# notpresent compl = vp.n2 ! np.a ++ vp.a2 ++ vp.ext in --# notpresent - {s = \\_ => sub ++ neg ++ verb ++ compl }; --# notpresent + {s = \\_ => neg.p1 ++ sub ++ neg.p2 ++ pol.s ++ verb.inf ++ compl }; --# notpresent - PassV2 v2 = predV (depV (lin V v2)); + PassV2 v2 = predV (P.depV (lin V v2)); PassV2Be v = insertObj (\\a => v.s ! VI (VPtPret (agrAdjNP a DIndef) Nom)) @@ -181,7 +188,8 @@ lin dd = DDef Indef ; in lin NP { s = \\c => cn.s ! num.n ! dd ! caseNP c ++ num.s ! g ; - a = agrP3 (ngen2gen g) num.n -- ? + a = agrP3 (ngen2gen g) num.n ; -- ? + isPron = False } ; ReflSlash vp np = let vp_l = lin VPSlash vp ; @@ -210,7 +218,7 @@ lin this_NP : Str -> Gender -> Number -> NP = \denna,g,n -> lin NP {s = table {NPPoss gn c => denna+"s"; _ => denna}; - a = agrP3 g n}; + a = agrP3 g n ; isPron = False} ; getPronoun : Person -> ParadigmsSwe.Number -> Pron = \p,n -> case of { @@ -225,10 +233,10 @@ lin ----------------- Predeterminers,Quantifiers,Determiners lin - bara_AdvFoc = mkAdv "bara" ; + bara_AdvFoc = P.mkAdv "bara" ; - sadana_PronAQ = mkA "sådan" ; - fler_PronAD = mkA "flera" "flera" "flera" "fler" "flest" ; + sadana_PronAQ = P.mkA "sådan" ; + fler_PronAD = P.mkA "flera" "flera" "flera" "fler" "flest" ; hela_Predet = {s = \\_,_ => "hela" ; p = [] ; a = PNoAg} ; samma_Predet = {s = \\_,_ => "samma" ; p = [] ; a = PNoAg} ; diff --git a/lib/src/swedish/IdiomSwe.gf b/lib/src/swedish/IdiomSwe.gf index 5aecba669..fffb4728f 100644 --- a/lib/src/swedish/IdiomSwe.gf +++ b/lib/src/swedish/IdiomSwe.gf @@ -19,7 +19,7 @@ concrete IdiomSwe of Idiom = CatSwe ** (insertObj (\\_ => ad.s ++ s.s ! Sub) (predV verbBe)) ; ExistNP np = - mkClause "det" (agrP3 neutr Sg) (insertObj + mkClause "det" (agrP3 neutr Sg) (insertObj (\\_ => np.s ! accusative) (predV (depV finna_V))) ; ExistIP ip = { @@ -35,7 +35,7 @@ concrete IdiomSwe of Idiom = CatSwe ** } ; ExistNPAdv np adv = - mkClause "det" (agrP3 neutr Sg) (insertObj + mkClause "det" (agrP3 neutr Sg) (insertObj (\\_ => np.s ! accusative ++ adv.s) (predV (depV finna_V))) ; ExistIPAdv ip adv = { @@ -59,14 +59,15 @@ concrete IdiomSwe of Idiom = CatSwe ** SelfAdVVP vp = insertAdVAgr (\\a => sjalv a.g a.n) vp ; SelfNP np = { s = \\c => np.s ! c ++ sjalv np.a.g np.a.n ; - a = np.a + a = np.a ; + isPron = False } ; oper sjalv : Gender -> Number -> Str = \g,n -> case of { => "själv" ; => "självt" ; - _ => "själva" + _ => "själva" } ; diff --git a/lib/src/swedish/ParadigmsSwe.gf b/lib/src/swedish/ParadigmsSwe.gf index 30427ae1e..711210341 100644 --- a/lib/src/swedish/ParadigmsSwe.gf +++ b/lib/src/swedish/ParadigmsSwe.gf @@ -528,7 +528,7 @@ oper regGenPN n g = {s = \\c => mkCase c n ; g = g} ** {lock_PN = <>} ; nounPN n = {s = n.s ! singular ! Indef ; g = n.g ; lock_PN = <>} ; makeNP x y n g = - {s = table {NPPoss _ _ => y ; _ => x} ; a = agrP3 g n ; p = P3 ; + {s = table {NPPoss _ _ => y ; _ => x} ; a = agrP3 g n ; p = P3 ; isPron = False ; lock_NP = <>} ; mkA = overload { diff --git a/lib/src/translator/ExtensionsSwe.gf b/lib/src/translator/ExtensionsSwe.gf index 5969637ce..7201b2dff 100644 --- a/lib/src/translator/ExtensionsSwe.gf +++ b/lib/src/translator/ExtensionsSwe.gf @@ -49,7 +49,8 @@ lin GerundNP vp = { -- infinitive: att dricka öl, att vara glad s = \\_ => "att" ++ infVP vp {g = Utr ; n = Sg ; p = P3} ; - a = {g = Neutr ; n = Sg ; p = P3} + a = {g = Neutr ; n = Sg ; p = P3} ; + isPron = False } ; GerundAdv vp = { @@ -98,7 +99,8 @@ lin UseQuantPN q pn = { s = \\c => q.s ! Sg ! True ! False ! pn.g ++ pn.s ! caseNP c ; - a = agrP3 pn.g Sg + a = agrP3 pn.g Sg ; + isPron = False } ; SlashV2V v ant p vp = predV v ** { @@ -135,7 +137,8 @@ lin ApposNP np1 np2 = { s = \\c => np1.s ! c ++ comma ++ np2.s ! NPNom ; - a = np1.a + a = np1.a ; + isPron = False } ; AdAdV = cc2 ;