mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-24 03:52:50 -06:00
worked with Scandinavian VP to get the word order with neg+pron right: jag älskar inte din mamma vs. jag älskar dig inte vs. jag har inte älskat dig
This commit is contained in:
@@ -341,7 +341,7 @@ oper
|
|||||||
|
|
||||||
makeNP : Str -> Str -> Number -> Gender -> NP ;
|
makeNP : Str -> Str -> Number -> Gender -> NP ;
|
||||||
makeNP x y n g =
|
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 = <>} ;
|
lock_NP = <>} ;
|
||||||
|
|
||||||
mk3A = mk3ADeg ;
|
mk3A = mk3ADeg ;
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ concrete ExtraNor of ExtraNorAbs = ExtraScandNor ** open CommonScand, ResNor, Pr
|
|||||||
lin
|
lin
|
||||||
PossNPPron np pro = {
|
PossNPPron np pro = {
|
||||||
s = \\c => np.s ! NPNom ++ pro.s ! NPPoss (gennumAgr np.a) (caseNP c) ;
|
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
|
TFutKommer = {s = []} ** {t = SFutKommer} ; --# notpresent
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ oper
|
|||||||
|
|
||||||
makeNP : Str -> Str -> Number -> Gender -> NP ;
|
makeNP : Str -> Str -> Number -> Gender -> NP ;
|
||||||
makeNP x y n g =
|
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 = <>} ;
|
lock_NP = <>} ;
|
||||||
|
|
||||||
mk3A = mk3ADeg ; ---- (mkAdject a b c [] []) ** {isComp = False ; lock_A = <>} ;
|
mk3A = mk3ADeg ; ---- (mkAdject a b c [] []) ** {isComp = False ; lock_A = <>} ;
|
||||||
|
|||||||
@@ -41,11 +41,14 @@ incomplete concrete CatScand of Cat =
|
|||||||
VP = {
|
VP = {
|
||||||
s : Voice => VPForm => {
|
s : Voice => VPForm => {
|
||||||
fin : Str ; -- V1 har ---s1
|
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 ;
|
sp : PartForm => Str ;
|
||||||
a1 : Polarity => Agr => Str ; -- A1 inte ---s3
|
n1 : Agr => Str ; -- N2 dig ---s5
|
||||||
n2 : Agr => Str ; -- N2 dig ---s5
|
n2 : Agr => Str ; -- N2 den där mannen ---s5
|
||||||
a2 : Str ; -- A2 idag ---s6
|
a2 : Str ; -- A2 idag ---s6
|
||||||
ext : Str ; -- S-Ext att hon går ---s7
|
ext : Str ; -- S-Ext att hon går ---s7
|
||||||
en2,ea2,eext : Bool -- indicate if the field exists
|
en2,ea2,eext : Bool -- indicate if the field exists
|
||||||
@@ -69,7 +72,8 @@ incomplete concrete CatScand of Cat =
|
|||||||
-- as $Quant$.
|
-- as $Quant$.
|
||||||
|
|
||||||
CN = {s : Number => DetSpecies => Case => Str ; g : NGender ; isMod : Bool} ;
|
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} ;
|
Det = {s,sp : Bool => NGender => Str ; n : Number ; det : DetSpecies} ;
|
||||||
Quant = {s,sp : Number => Bool => Bool => NGender => Str ; det : DetSpecies} ;
|
Quant = {s,sp : Number => Bool => Bool => NGender => Str ; det : DetSpecies} ;
|
||||||
Predet = {s : Gender => Number => Str ; p : Str ; a : PredetAgr} ;
|
Predet = {s : Gender => Number => Str ; p : Str ; a : PredetAgr} ;
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
-- Used in $DiffScand.predV$.
|
-- Used in $ResScand.predV$.
|
||||||
|
|
||||||
vFin : STense -> Voice -> VForm = \t,v -> case t of {
|
vFin : STense -> Voice -> VForm = \t,v -> case t of {
|
||||||
SPres => VF (VPres v)
|
SPres => VF (VPres v)
|
||||||
@@ -276,9 +276,9 @@ oper
|
|||||||
detForms : (x1,x2,x3 : Str) -> Gender => Number => Str = \den,det,de ->
|
detForms : (x1,x2,x3 : Str) -> Gender => Number => Str = \den,det,de ->
|
||||||
\\g,n => gennumForms den det de ! gennum g n ;
|
\\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 ->
|
\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$.
|
-- For $Verb$.
|
||||||
@@ -286,11 +286,14 @@ oper
|
|||||||
VP = {
|
VP = {
|
||||||
s : Voice => VPForm => {
|
s : Voice => VPForm => {
|
||||||
fin : Str ; -- V1 har ---s1
|
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
|
sp : PartForm => Str ; -- present or past participle
|
||||||
a1 : Polarity => Agr => Str ; -- A1 inte ---s3 själv/själva/självt
|
n1 : Agr => Str ; -- N1 sig/dig ---s5
|
||||||
n2 : Agr => Str ; -- N2 dig ---s5
|
n2 : Agr => Str ; -- N2 den här mannen ---s5
|
||||||
a2 : Str ; -- A2 idag ---s6
|
a2 : Str ; -- A2 idag ---s6
|
||||||
ext : Str ; -- S-Ext att hon går ---s7
|
ext : Str ; -- S-Ext att hon går ---s7
|
||||||
--- ea1,ev2, --- these depend on params of v and a1
|
--- ea1,ev2, --- these depend on params of v and a1
|
||||||
@@ -298,11 +301,14 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
insertObj : (Agr => Str) -> VP -> VP = \obj,vp -> vp ** {
|
insertObjPron : Bool -> (Agr => Str) -> VP -> VP = \isPron,obj,vp -> vp ** {
|
||||||
n2 = \\a => obj ! a ++ vp.n2 ! a ;
|
n1 = \\a => if_then_Str isPron (obj ! a ++ vp.n2 ! a) [] ;
|
||||||
en2 = True ;
|
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 ** {
|
insertObjPost : (Agr => Str) -> VP -> VP = \obj,vp -> vp ** {
|
||||||
n2 = \\a => vp.n2 ! a ++ obj ! a ;
|
n2 = \\a => vp.n2 ! a ++ obj ! a ;
|
||||||
en2 = True ;
|
en2 = True ;
|
||||||
@@ -324,27 +330,23 @@ oper
|
|||||||
a1 = \\b,a => vp.a1 ! b ! a ++ adv ! a ;
|
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
|
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 ;
|
infVP : VP -> Agr -> Str = \vp,a -> infVPPlus vp a Simul Pos ;
|
||||||
|
|
||||||
infVPPlus : VP -> Agr -> Anteriority -> Polarity -> Str = \vp,a,ant,pol ->
|
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
|
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 ->
|
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
|
let negs = (vp.s ! Act ! VPInfinit Simul).a1 ! pol ! a
|
||||||
partVPPlusPost : VP -> PartForm -> Agr -> Polarity -> Str = \vp,pf,a,pol ->
|
in negs.p1 ++ negs.p2 ++ vp.n1 ! a ++ vp.n2 ! a ++ vp.a2 ++ vp.ext ++ vp.sp ! pf ; -- verb final: i sängen liggande
|
||||||
vp.a1 ! pol ! a ++ vp.sp ! pf ++ vp.n2 ! a ++ vp.a2 ++ vp.ext ; -- verb first: liggande i sängen
|
|
||||||
|
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$.
|
-- For $Sentence$.
|
||||||
@@ -357,14 +359,21 @@ oper
|
|||||||
s = \\t,a,b,o =>
|
s = \\t,a,b,o =>
|
||||||
let
|
let
|
||||||
verb = vp.s ! Act ! VPFinite t a ;
|
verb = vp.s ! Act ! VPFinite t a ;
|
||||||
neg = vp.a1 ! b ! agr ;
|
neg = verb.a1 ! b ! agr ;
|
||||||
compl = vp.n2 ! agr ++ vp.a2 ++ vp.ext
|
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
|
in
|
||||||
case o of {
|
case o of {
|
||||||
Main => subj ++ verb.fin ++ neg ++ verb.inf ++ compl ;
|
Main => subj ++ verb.fin ++ pronneg ;
|
||||||
Inv => verb.fin ++ subj ++ neg ++ verb.inf ++ compl ;
|
Inv => verb.fin ++ subj ++ pronneg ;
|
||||||
Sub => subj ++ neg ++ verb.fin ++ verb.inf ++ compl
|
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
|
||||||
@@ -13,7 +13,8 @@ incomplete concrete ConjunctionScand of Conjunction =
|
|||||||
ConjAdv conj ss = conjunctDistrSS conj ss ;
|
ConjAdv conj ss = conjunctDistrSS conj ss ;
|
||||||
|
|
||||||
ConjNP conj ss = conjunctDistrTable NPForm 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 ** {
|
ConjAP conj ss = conjunctDistrTable AFormPos conj ss ** {
|
||||||
|
|||||||
@@ -77,13 +77,14 @@ incomplete concrete ExtraScand of ExtraScandAbs = CatScand **
|
|||||||
MkVPS t p vp = {
|
MkVPS t p vp = {
|
||||||
s = \\o,a =>
|
s = \\o,a =>
|
||||||
let
|
let
|
||||||
neg = vp.a1 ! p.p ! a ;
|
verb = vp.s ! Act ! VPFinite t.t t.a ;
|
||||||
verb = vp.s ! Act ! VPFinite t.t t.a ;
|
neg = verb.a1 ! p.p ! a ;
|
||||||
compl = verb.inf ++ vp.n2 ! a ++ vp.a2 ++ vp.ext ;
|
compl = vp.n2 ! a ++ vp.a2 ++ vp.ext ;
|
||||||
|
pron = vp.n1 ! a
|
||||||
in t.s ++ p.s ++ case o of {
|
in t.s ++ p.s ++ case o of {
|
||||||
Main => verb.fin ++ neg ++ compl ;
|
Main => verb.fin ++ neg.p1 ++ verb.inf ++ pron ++ neg.p2 ++ compl ;
|
||||||
Inv => verb.fin ++ neg ++ compl ; ----
|
Inv => verb.fin ++ neg.p1 ++ verb.inf ++ pron ++ neg.p2 ++ compl ; ----
|
||||||
Sub => neg ++ verb.fin ++ compl
|
Sub => neg.p1 ++ neg.p2 ++ verb.fin ++ verb.inf ++ pron ++ compl
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ incomplete concrete MarkupScand of Markup = CatScand, MarkHTMLX ** open ResScand
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
MarkupCN m cn = {s = \\n,d,c => appMark m (cn.s ! n ! d ! c) ; g = cn.g ; isMod = cn.isMod} ;
|
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} ;
|
MarkupAP m ap = {s = \\a => appMark m (ap.s ! a) ; isPre = ap.isPre} ;
|
||||||
MarkupAdv m adv = {s = appMark m adv.s} ;
|
MarkupAdv m adv = {s = appMark m adv.s} ;
|
||||||
MarkupS m s = {s = \\o => appMark m (s.s ! o)} ;
|
MarkupS m s = {s = \\o => appMark m (s.s ! o)} ;
|
||||||
|
|||||||
@@ -20,34 +20,40 @@ incomplete concrete NounScand of Noun =
|
|||||||
in {
|
in {
|
||||||
s = \\c => det.s ! m ! g ++
|
s = \\c => det.s ! m ! g ++
|
||||||
cn.s ! det.n ! dd ! caseNP c ;
|
cn.s ! det.n ! dd ! caseNP c ;
|
||||||
a = agrP3 (ngen2gen g) det.n
|
a = agrP3 (ngen2gen g) det.n ;
|
||||||
|
isPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UsePN pn = {
|
UsePN pn = {
|
||||||
s = \\c => pn.s ! caseNP c ;
|
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 = {
|
PredetNP pred np = {
|
||||||
s = \\c => pred.s ! np.a.g ! np.a.n ++ pred.p ++ np.s ! c ;
|
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 = {
|
PPartNP np v2 = {
|
||||||
s = \\c => np.s ! c ++ v2.s ! (VI (VPtPret (agrAdjNP np.a DIndef) Nom)) ;
|
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 = {
|
AdvNP np adv = {
|
||||||
s = \\c => np.s ! c ++ adv.s ;
|
s = \\c => np.s ! c ++ adv.s ;
|
||||||
a = np.a
|
a = np.a ;
|
||||||
|
isPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ExtAdvNP np adv = {
|
ExtAdvNP np adv = {
|
||||||
s = \\c => np.s ! c ++ embedInCommas adv.s ;
|
s = \\c => np.s ! c ++ embedInCommas adv.s ;
|
||||||
a = np.a
|
a = np.a ;
|
||||||
|
isPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetQuantOrd quant num ord = {
|
DetQuantOrd quant num ord = {
|
||||||
@@ -84,7 +90,8 @@ incomplete concrete NounScand of Noun =
|
|||||||
m = True ; ---- is this needed for other than Art?
|
m = True ; ---- is this needed for other than Art?
|
||||||
in {
|
in {
|
||||||
s = \\c => det.sp ! m ! g ; ---- case of det!
|
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 = {
|
PossPron p = {
|
||||||
@@ -141,7 +148,8 @@ incomplete concrete NounScand of Noun =
|
|||||||
|
|
||||||
MassNP cn = {
|
MassNP cn = {
|
||||||
s = \\c => cn.s ! Sg ! DIndef ! caseNP c ;
|
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 -> {
|
UseN, UseN2 = \noun -> {
|
||||||
@@ -200,7 +208,7 @@ incomplete concrete NounScand of Noun =
|
|||||||
RelNP np rs = {
|
RelNP np rs = {
|
||||||
s = \\c => np.s ! c ++ "," ++ rs.s ! np.a ! RNom ;
|
s = \\c => np.s ! c ++ "," ++ rs.s ! np.a ! RNom ;
|
||||||
a = np.a ;
|
a = np.a ;
|
||||||
isMod = np.isMod
|
isPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
AdvCN cn sc = let g = cn.g in {
|
AdvCN cn sc = let g = cn.g in {
|
||||||
@@ -238,7 +246,8 @@ incomplete concrete NounScand of Noun =
|
|||||||
m = True ; ---- see DetNP above
|
m = True ; ---- see DetNP above
|
||||||
in {
|
in {
|
||||||
s = \\c => det.sp ! m ! ng ++ av_Prep ++ np.s ! NPAcc ;
|
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 = {
|
AdjDAP det ap = {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
incomplete concrete QuestionScand of Question =
|
incomplete concrete QuestionScand of Question =
|
||||||
CatScand ** open CommonScand, ResScand in {
|
CatScand ** open CommonScand, ResScand, Prelude in {
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
|
|||||||
@@ -37,44 +37,49 @@ interface ResScand = DiffScand ** open CommonScand, Prelude in {
|
|||||||
True => verbBe.s ;
|
True => verbBe.s ;
|
||||||
_ => verbHave.s
|
_ => verbHave.s
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
har : STense -> Str = \t -> auxv ! vFin t Act ;
|
har : STense -> Str = \t -> auxv ! vFin t Act ;
|
||||||
ha : Str = auxv ! VI (VInfin Act) ;
|
ha : Str = auxv ! VI (VInfin Act) ;
|
||||||
|
|
||||||
vf : Str -> Str -> {fin,inf : Str} = \fin,inf -> {
|
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
|
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 => <negation ! p, []> ;
|
||||||
|
False => <[], negation ! p>
|
||||||
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
s = \\d => table {
|
s = \\d => table {
|
||||||
VPFinite t Simul => case t of {
|
VPFinite t Simul => case t of {
|
||||||
-- SPres | SPast => vf (vfin d t) [] ; -- the general rule
|
-- SPres | SPast => vf (vfin d t) [] ; -- the general rule
|
||||||
SPast => vf (vfin d t) [] ; --# notpresent
|
SPast => vf False (vfin d t) [] ; --# notpresent
|
||||||
SFut => vf auxFut (vinf d) ; --# notpresent
|
SFut => vf True auxFut (vinf d) ; --# notpresent
|
||||||
SFutKommer => vf auxFutKommer (auxFutPart ++ infMark ++ vinf d) ; --# notpresent
|
SFutKommer => vf True auxFutKommer (auxFutPart ++ infMark ++ vinf d) ; --# notpresent
|
||||||
SCond => vf auxCond (vinf d) ; --# notpresent
|
SCond => vf True auxCond (vinf d) ; --# notpresent
|
||||||
SPres => vf (vfin d t) []
|
SPres => vf False (vfin d t) []
|
||||||
} ;
|
} ;
|
||||||
VPFinite t Anter => case t of { --# notpresent
|
VPFinite t Anter => case t of { --# notpresent
|
||||||
SPres | SPast => vf (har t) (vsup d) ; --# notpresent
|
SPres | SPast => vf True (har t) (vsup d) ; --# notpresent
|
||||||
SFut => vf auxFut (ha ++ vsup d) ; --# notpresent
|
SFut => vf True auxFut (ha ++ vsup d) ; --# notpresent
|
||||||
SFutKommer => vf auxFutKommer (auxFutPart ++ infMark ++ ha ++ vsup d) ; --# notpresent
|
SFutKommer => vf True auxFutKommer (auxFutPart ++ infMark ++ ha ++ vsup d) ; --# notpresent
|
||||||
SCond => vf auxCond (ha ++ vsup d) --# notpresent
|
SCond => vf True auxCond (ha ++ vsup d) --# notpresent
|
||||||
} ; --# notpresent
|
} ; --# notpresent
|
||||||
VPImperat => vf (verb.s ! VF (VImper (diath d))) [] ;
|
VPImperat => vf False (verb.s ! VF (VImper (diath d))) [] ;
|
||||||
VPInfinit Anter => vf [] (ha ++ vsup d) ; --# notpresent
|
VPInfinit Anter => vf True [] (ha ++ vsup d) ; --# notpresent
|
||||||
VPInfinit Simul => vf [] (vinf d)
|
VPInfinit Simul => vf True [] (vinf d)
|
||||||
} ;
|
} ;
|
||||||
sp = table {
|
sp = table {
|
||||||
PartPret a c => verb.s ! (VI (VPtPret a c)) ;
|
PartPret a c => verb.s ! (VI (VPtPret a c)) ;
|
||||||
PartPres n s c => verb.s ! (VI (VPtPres n s c))
|
PartPres n s c => verb.s ! (VI (VPtPres n s c))
|
||||||
} ;
|
} ;
|
||||||
a1 : Polarity => Agr => Str = \\p,a => negation ! p ;
|
n1 : Agr => Str = \\a => case verb.vtype of {
|
||||||
n2 : Agr => Str = \\a => case verb.vtype of {
|
VRefl => reflPron a ;
|
||||||
VRefl => reflPron a ;
|
_ => []
|
||||||
_ => []
|
} ;
|
||||||
} ;
|
n2 : Agr => Str = \\a => [] ;
|
||||||
a2 : Str = [] ;
|
a2 : Str = [] ;
|
||||||
ext : Str = [] ;
|
ext : Str = [] ;
|
||||||
en2,ea2,eext : Bool = False -- indicate if the field exists
|
en2,ea2,eext : Bool = False -- indicate if the field exists
|
||||||
|
|||||||
@@ -13,8 +13,10 @@ incomplete concrete SentenceScand of Sentence =
|
|||||||
let
|
let
|
||||||
agr = {g = Utr ; n = n ; p = P2} ;
|
agr = {g = Utr ; n = n ; p = P2} ;
|
||||||
verb = vp.s ! Act ! VPImperat ;
|
verb = vp.s ! Act ! VPImperat ;
|
||||||
|
neg = verb.a1 ! pol ! agr ;
|
||||||
|
pron = vp.n1 ! agr
|
||||||
in
|
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 =
|
SlashVP np vp =
|
||||||
|
|||||||
@@ -8,15 +8,18 @@ lin
|
|||||||
NumPN i = {s = \\c => i.s!neutrum ; g = Neutr} ; --- c
|
NumPN i = {s = \\c => i.s!neutrum ; g = Neutr} ; --- c
|
||||||
CNIntNP cn i = {
|
CNIntNP cn i = {
|
||||||
s = \\c => (cn.s ! Sg ! DIndef ! Nom ++ i.s) ;
|
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 {
|
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 ;
|
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 = {
|
CNNumNP cn i = {
|
||||||
s = \\c => (cn.s ! Sg ! DIndef ! Nom ++ i.s ! neutrum) ;
|
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} ;
|
SymbS sy = {s = \\_ => sy.s} ;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ incomplete concrete VerbScand of Verb = CatScand ** open CommonScand, ResScand,
|
|||||||
SlashV2a v = predV v ** {n3 = \\_ => [] ; c2 = v.c2} ;
|
SlashV2a v = predV v ** {n3 = \\_ => [] ; c2 = v.c2} ;
|
||||||
|
|
||||||
Slash2V3 v np =
|
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
|
{n3 = \\_ => [] ; c2 = v.c3} ; -- to preserve the order of args
|
||||||
Slash3V3 v np = predV v ** {
|
Slash3V3 v np = predV v ** {
|
||||||
n3 = \\_ => v.c3.s ++ np.s ! accusative ;
|
n3 = \\_ => v.c3.s ++ np.s ! accusative ;
|
||||||
@@ -37,19 +37,20 @@ incomplete concrete VerbScand of Verb = CatScand ** open CommonScand, ResScand,
|
|||||||
c2 = v.c2
|
c2 = v.c2
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ComplSlash vp np =
|
ComplSlash vp np =
|
||||||
insertObjPost
|
insertObjPost (\\_ => vp.n3 ! np.a)
|
||||||
(\\_ => vp.c2.s ++ np.s ! accusative ++ vp.n3 ! np.a) vp ;
|
(insertObjPron (andB np.isPron (notB vp.c2.hasPrep)) (\\_ => vp.c2.s ++ np.s ! accusative)
|
||||||
|
vp) ;
|
||||||
|
|
||||||
SlashVV v vp =
|
SlashVV v vp =
|
||||||
insertObj (\\a => v.c2.s ++ infVP vp a) (predV v) ** {n3 = vp.n3 ; c2 = vp.c2} ;
|
insertObj (\\a => v.c2.s ++ infVP vp a) (predV v) ** {n3 = vp.n3 ; c2 = vp.c2} ;
|
||||||
|
|
||||||
SlashV2VNP v np vp =
|
SlashV2VNP v np vp =
|
||||||
insertObj
|
insertObj
|
||||||
(\\a => v.c2.s ++ np.s ! accusative ++ v.c3.s ++ infVP vp a) (predV v)
|
(\\a => v.c2.s ++ np.s ! accusative ++ v.c3.s ++ infVP vp a) (predV v)
|
||||||
** {n3 = vp.n3 ; c2 = v.c2} ;
|
** {n3 = vp.n3 ; c2 = v.c2} ;
|
||||||
|
|
||||||
UseComp comp = insertObj
|
UseComp comp = insertObj
|
||||||
comp.s (predV verbBe) ;
|
comp.s (predV verbBe) ;
|
||||||
|
|
||||||
CompAP ap = {s = \\a => ap.s ! agrAdjNP a DIndef} ;
|
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 vp adv = insertAdv adv.s vp ;
|
||||||
AdVVP adv vp = 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}} ;
|
VPSlashPrep vp prep = vp ** {n3 = \\_ => [] ; c2 = {s = prep.s ; hasPrep = True}} ;
|
||||||
|
|
||||||
PassV2 v =
|
PassV2 v =
|
||||||
insertObj
|
insertObj
|
||||||
(\\a => v.s ! VI (VPtPret (agrAdjNP a DIndef) Nom))
|
(\\a => v.s ! VI (VPtPret (agrAdjNP a DIndef) Nom))
|
||||||
(predV verbBecome) ;
|
(predV verbBecome) ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
--# -path=.:../scandinavian:../abstract:../common:prelude
|
--# -path=.:../scandinavian:../abstract:../common:prelude
|
||||||
concrete ExtraSwe of ExtraSweAbs = ExtraScandSwe - [FocAdv] ,
|
concrete ExtraSwe of ExtraSweAbs = ExtraScandSwe - [FocAdv] **
|
||||||
ParadigmsSwe - [nominative] **
|
|
||||||
open CommonScand, ResSwe, ParamX, VerbSwe, Prelude, DiffSwe, StructuralSwe, MorphoSwe,
|
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 ;
|
flags coding=utf8 ;
|
||||||
lincat
|
lincat
|
||||||
@@ -25,7 +24,8 @@ lin
|
|||||||
m = True ; ---- is this needed for other than Art?
|
m = True ; ---- is this needed for other than Art?
|
||||||
in lin NP {
|
in lin NP {
|
||||||
s = \\c => det.sp ! m ! g;
|
s = \\c => det.sp ! m ! g;
|
||||||
a = agrP3 (ngen2gen g) num
|
a = agrP3 (ngen2gen g) num ;
|
||||||
|
isPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
@@ -46,7 +46,9 @@ lin
|
|||||||
|
|
||||||
AdvFocVP adv vp = vp ** {
|
AdvFocVP adv vp = vp ** {
|
||||||
s = \\v,vpf => {fin = adv.s ++ (vp.s ! v ! vpf).fin ;
|
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} ;
|
PredetAdvF adv = {s = \\_,_ => adv.s ; p = [] ; a = PNoAg} ;
|
||||||
|
|
||||||
@@ -91,12 +93,13 @@ lin
|
|||||||
<_ ,Anter> => (vp.s ! Act ! VPFinite SPast Anter).inf --# notpresent
|
<_ ,Anter> => (vp.s ! Act ! VPFinite SPast Anter).inf --# notpresent
|
||||||
};
|
};
|
||||||
verb = mkClause subj agr (predV do_V) ;
|
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
|
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
|
lin
|
||||||
FocAP ap np =
|
FocAP ap np =
|
||||||
@@ -113,10 +116,14 @@ lin
|
|||||||
let vps = vp.s ! Act ! VPInfinit Simul ;
|
let vps = vp.s ! Act ! VPInfinit Simul ;
|
||||||
vvp = UseV vv ;
|
vvp = UseV vv ;
|
||||||
vvs = vvp.s ! Act ! VPFinite t a ;
|
vvs = vvp.s ! Act ! VPFinite t a ;
|
||||||
always = vp.a1 ! Pos ! np.a ++ vvp.a1 ! Pos ! np.a ;
|
vpsneg = vps.a1 ! Pos ! np.a ;
|
||||||
already = vp.a2 ++ vvp.a2 in
|
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
|
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
|
SupCl np vp pol = let sub = np.s ! nominative ; --# notpresent
|
||||||
verb = (vp.s ! Act ! VPFinite SPres Anter).inf ; --# notpresent
|
verb = (vp.s ! Act ! VPFinite SPres Anter) ; --# notpresent
|
||||||
neg = vp.a1 ! pol.p ! np.a ++ pol.s ; --# notpresent
|
neg = verb.a1 ! pol.p ! np.a ; --# notpresent
|
||||||
compl = vp.n2 ! np.a ++ vp.a2 ++ vp.ext in --# 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
|
PassV2Be v = insertObj
|
||||||
(\\a => v.s ! VI (VPtPret (agrAdjNP a DIndef) Nom))
|
(\\a => v.s ! VI (VPtPret (agrAdjNP a DIndef) Nom))
|
||||||
@@ -181,7 +188,8 @@ lin
|
|||||||
dd = DDef Indef ;
|
dd = DDef Indef ;
|
||||||
in lin NP {
|
in lin NP {
|
||||||
s = \\c => cn.s ! num.n ! dd ! caseNP c ++ num.s ! g ;
|
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 ;
|
ReflSlash vp np = let vp_l = lin VPSlash vp ;
|
||||||
@@ -210,7 +218,7 @@ lin
|
|||||||
this_NP : Str -> Gender -> Number -> NP =
|
this_NP : Str -> Gender -> Number -> NP =
|
||||||
\denna,g,n -> lin NP {s = table {NPPoss gn c => denna+"s";
|
\denna,g,n -> lin NP {s = table {NPPoss gn c => denna+"s";
|
||||||
_ => denna};
|
_ => denna};
|
||||||
a = agrP3 g n};
|
a = agrP3 g n ; isPron = False} ;
|
||||||
|
|
||||||
getPronoun : Person -> ParadigmsSwe.Number -> Pron =
|
getPronoun : Person -> ParadigmsSwe.Number -> Pron =
|
||||||
\p,n -> case <p,n> of {
|
\p,n -> case <p,n> of {
|
||||||
@@ -225,10 +233,10 @@ lin
|
|||||||
----------------- Predeterminers,Quantifiers,Determiners
|
----------------- Predeterminers,Quantifiers,Determiners
|
||||||
|
|
||||||
lin
|
lin
|
||||||
bara_AdvFoc = mkAdv "bara" ;
|
bara_AdvFoc = P.mkAdv "bara" ;
|
||||||
|
|
||||||
sadana_PronAQ = mkA "sådan" ;
|
sadana_PronAQ = P.mkA "sådan" ;
|
||||||
fler_PronAD = mkA "flera" "flera" "flera" "fler" "flest" ;
|
fler_PronAD = P.mkA "flera" "flera" "flera" "fler" "flest" ;
|
||||||
|
|
||||||
hela_Predet = {s = \\_,_ => "hela" ; p = [] ; a = PNoAg} ;
|
hela_Predet = {s = \\_,_ => "hela" ; p = [] ; a = PNoAg} ;
|
||||||
samma_Predet = {s = \\_,_ => "samma" ; p = [] ; a = PNoAg} ;
|
samma_Predet = {s = \\_,_ => "samma" ; p = [] ; a = PNoAg} ;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ concrete IdiomSwe of Idiom = CatSwe **
|
|||||||
(insertObj (\\_ => ad.s ++ s.s ! Sub) (predV verbBe)) ;
|
(insertObj (\\_ => ad.s ++ s.s ! Sub) (predV verbBe)) ;
|
||||||
|
|
||||||
ExistNP np =
|
ExistNP np =
|
||||||
mkClause "det" (agrP3 neutr Sg) (insertObj
|
mkClause "det" (agrP3 neutr Sg) (insertObj
|
||||||
(\\_ => np.s ! accusative) (predV (depV finna_V))) ;
|
(\\_ => np.s ! accusative) (predV (depV finna_V))) ;
|
||||||
|
|
||||||
ExistIP ip = {
|
ExistIP ip = {
|
||||||
@@ -35,7 +35,7 @@ concrete IdiomSwe of Idiom = CatSwe **
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
ExistNPAdv np adv =
|
ExistNPAdv np adv =
|
||||||
mkClause "det" (agrP3 neutr Sg) (insertObj
|
mkClause "det" (agrP3 neutr Sg) (insertObj
|
||||||
(\\_ => np.s ! accusative ++ adv.s) (predV (depV finna_V))) ;
|
(\\_ => np.s ! accusative ++ adv.s) (predV (depV finna_V))) ;
|
||||||
|
|
||||||
ExistIPAdv ip adv = {
|
ExistIPAdv ip adv = {
|
||||||
@@ -59,14 +59,15 @@ concrete IdiomSwe of Idiom = CatSwe **
|
|||||||
SelfAdVVP vp = insertAdVAgr (\\a => sjalv a.g a.n) vp ;
|
SelfAdVVP vp = insertAdVAgr (\\a => sjalv a.g a.n) vp ;
|
||||||
SelfNP np = {
|
SelfNP np = {
|
||||||
s = \\c => np.s ! c ++ sjalv np.a.g np.a.n ;
|
s = \\c => np.s ! c ++ sjalv np.a.g np.a.n ;
|
||||||
a = np.a
|
a = np.a ;
|
||||||
|
isPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
sjalv : Gender -> Number -> Str = \g,n -> case <g,n> of {
|
sjalv : Gender -> Number -> Str = \g,n -> case <g,n> of {
|
||||||
<Utr,Sg> => "själv" ;
|
<Utr,Sg> => "själv" ;
|
||||||
<Neutr,Sg> => "självt" ;
|
<Neutr,Sg> => "självt" ;
|
||||||
_ => "själva"
|
_ => "själva"
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -528,7 +528,7 @@ oper
|
|||||||
regGenPN n g = {s = \\c => mkCase c n ; g = g} ** {lock_PN = <>} ;
|
regGenPN n g = {s = \\c => mkCase c n ; g = g} ** {lock_PN = <>} ;
|
||||||
nounPN n = {s = n.s ! singular ! Indef ; g = n.g ; lock_PN = <>} ;
|
nounPN n = {s = n.s ! singular ! Indef ; g = n.g ; lock_PN = <>} ;
|
||||||
makeNP x y n g =
|
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 = <>} ;
|
lock_NP = <>} ;
|
||||||
|
|
||||||
mkA = overload {
|
mkA = overload {
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ lin
|
|||||||
|
|
||||||
GerundNP vp = { -- infinitive: att dricka öl, att vara glad
|
GerundNP vp = { -- infinitive: att dricka öl, att vara glad
|
||||||
s = \\_ => "att" ++ infVP vp {g = Utr ; n = Sg ; p = P3} ;
|
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 = {
|
GerundAdv vp = {
|
||||||
@@ -98,7 +99,8 @@ lin
|
|||||||
|
|
||||||
UseQuantPN q pn = {
|
UseQuantPN q pn = {
|
||||||
s = \\c => q.s ! Sg ! True ! False ! pn.g ++ pn.s ! caseNP c ;
|
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 ** {
|
SlashV2V v ant p vp = predV v ** {
|
||||||
@@ -135,7 +137,8 @@ lin
|
|||||||
|
|
||||||
ApposNP np1 np2 = {
|
ApposNP np1 np2 = {
|
||||||
s = \\c => np1.s ! c ++ comma ++ np2.s ! NPNom ;
|
s = \\c => np1.s ! c ++ comma ++ np2.s ! NPNom ;
|
||||||
a = np1.a
|
a = np1.a ;
|
||||||
|
isPron = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
AdAdV = cc2 ;
|
AdAdV = cc2 ;
|
||||||
|
|||||||
Reference in New Issue
Block a user