forked from GitHub/gf-core
scandinavian agreement to object
This commit is contained in:
@@ -10,13 +10,14 @@ incomplete concrete CatScand of Cat =
|
||||
S = {s : Order => Str} ;
|
||||
QS = {s : QForm => Str} ;
|
||||
RS = {s : Agr => Str ; c : NPForm} ;
|
||||
SSlash = {s : Order => Str} ** {c2 : Complement} ;
|
||||
SSlash = {s : Order => Str ; n3 : Agr => Str ; c2 : Complement} ;
|
||||
|
||||
-- Sentence
|
||||
|
||||
Cl = {s : R.Tense => Anteriority => Polarity => Order => Str} ;
|
||||
ClSlash = {
|
||||
s : R.Tense => Anteriority => Polarity => Order => Str ;
|
||||
n3 : Agr => Str ;
|
||||
c2 : Complement
|
||||
} ;
|
||||
Imp = {s : Polarity => Number => Str} ;
|
||||
@@ -47,7 +48,10 @@ incomplete concrete CatScand of Cat =
|
||||
ext : Str ; -- S-Ext att hon går ---s7
|
||||
en2,ea2,eext : Bool -- indicate if the field exists
|
||||
} ;
|
||||
VPSlash = CommonScand.VP ** {c2 : Complement} ;
|
||||
VPSlash = CommonScand.VP ** {
|
||||
n3 : Agr => Str ; -- object-control complement
|
||||
c2 : Complement
|
||||
} ;
|
||||
Comp = {s : AFormPos => Str} ;
|
||||
|
||||
|
||||
|
||||
@@ -29,7 +29,8 @@ incomplete concrete QuestionScand of Question =
|
||||
QuestSlash ip slash = {
|
||||
s = \\t,a,p =>
|
||||
let
|
||||
cls = slash.s ! t ! a ! p ;
|
||||
agr = {gn = ip.gn ; p = P3} ;
|
||||
cls : Order => Str = \\o => slash.s ! t ! a ! p ! o ++ slash.n3 ! agr ;
|
||||
who = slash.c2.s ++ ip.s ! accusative --- stranding in ExtScand
|
||||
in table {
|
||||
QDir => who ++ cls ! Inv ;
|
||||
|
||||
@@ -29,8 +29,14 @@ incomplete concrete RelativeScand of Relative =
|
||||
|
||||
RelSlash rp slash = {
|
||||
s = \\t,a,p,ag =>
|
||||
slash.c2.s ++ rp.s ! ag.gn ! RPrep slash.c2.hasPrep ++
|
||||
slash.s ! t ! a ! p ! Sub ;
|
||||
let
|
||||
agr = case rp.a of {
|
||||
RNoAg => ag ;
|
||||
RAg agg => agg
|
||||
}
|
||||
in
|
||||
slash.c2.s ++ rp.s ! ag.gn ! RPrep slash.c2.hasPrep ++
|
||||
slash.s ! t ! a ! p ! Sub ++ slash.n3 ! agr ;
|
||||
c = NPAcc
|
||||
} ;
|
||||
|
||||
|
||||
@@ -21,20 +21,21 @@ incomplete concrete SentenceScand of Sentence =
|
||||
mkClause
|
||||
(np.s ! nominative) np.a
|
||||
vp **
|
||||
{c2 = vp.c2} ;
|
||||
{n3 = vp.n3 ; c2 = vp.c2} ;
|
||||
|
||||
AdvSlash slash adv = {
|
||||
s = \\t,a,b,o => slash.s ! t ! a ! b ! o ++ adv.s ;
|
||||
n3 = slash.n3 ;
|
||||
c2 = slash.c2
|
||||
} ;
|
||||
|
||||
SlashPrep cl prep = cl ** {c2 = {s = prep.s ; hasPrep = True}} ;
|
||||
SlashPrep cl prep = cl ** {n3 = \\_ => [] ; c2 = {s = prep.s ; hasPrep = True}} ;
|
||||
|
||||
SlashVS np vs slash =
|
||||
mkClause
|
||||
(np.s ! nominative) np.a
|
||||
(insertObj (\\_ => conjThat ++ slash.s ! Sub) (predV vs)) **
|
||||
{c2 = slash.c2} ;
|
||||
{n3 = slash.n3 ; c2 = slash.c2} ;
|
||||
|
||||
EmbedS s = {s = conjThat ++ s.s ! Sub} ;
|
||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||
@@ -52,6 +53,7 @@ incomplete concrete SentenceScand of Sentence =
|
||||
} ;
|
||||
UseSlash t a p cl = {
|
||||
s = \\o => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! o ;
|
||||
n3 = cl.n3 ;
|
||||
c2 = cl.c2
|
||||
} ;
|
||||
|
||||
|
||||
@@ -5,36 +5,49 @@ incomplete concrete VerbScand of Verb = CatScand ** open CommonScand, ResScand i
|
||||
lin
|
||||
UseV = predV ;
|
||||
|
||||
SlashV2a v = predV v ** {c2 = v.c2} ;
|
||||
SlashV2a v = predV v ** {n3 = \\_ => [] ; c2 = v.c2} ;
|
||||
|
||||
Slash2V3 v np =
|
||||
insertObj (\\_ => v.c2.s ++ np.s ! accusative) (predV v) ** {c2 = v.c3} ;
|
||||
Slash3V3 v np =
|
||||
insertObj (\\_ => v.c3.s ++ np.s ! accusative) (predV v) ** {c2 = v.c2} ;
|
||||
insertObj (\\_ => 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 ;
|
||||
c2 = v.c2
|
||||
} ;
|
||||
|
||||
ComplVV v vp = insertObj (\\a => v.c2.s ++ infVP vp a) (predV v) ;
|
||||
ComplVS v s = insertObj (\\_ => conjThat ++ s.s ! Sub) (predV v) ;
|
||||
ComplVQ v q = insertObj (\\_ => q.s ! QIndir) (predV v) ;
|
||||
ComplVA v ap = insertObj (\\a => ap.s ! agrAdj a.gn DIndef) (predV v) ;
|
||||
|
||||
SlashV2V v vp =
|
||||
insertObj (\\a => v.c3.s ++ infVP vp a) (predV v) ** {c2 = v.c2} ;
|
||||
SlashV2S v s =
|
||||
insertObj (\\_ => conjThat ++ s.s ! Sub) (predV v) ** {c2 = v.c2} ;
|
||||
SlashV2Q v q =
|
||||
insertObj (\\_ => q.s ! QIndir) (predV v) ** {c2 = v.c2} ;
|
||||
SlashV2A v ap =
|
||||
insertObj
|
||||
(\\a => ap.s ! agrAdj a.gn DIndef) (predV v) ** {c2 = v.c2} ; ---- agr to obj
|
||||
SlashV2V v vp = predV v ** {
|
||||
n3 = \\a => v.c3.s ++ infVP vp a ;
|
||||
c2 = v.c2
|
||||
} ;
|
||||
SlashV2S v s = predV v ** {
|
||||
n3 = \\_ => conjThat ++ s.s ! Sub ;
|
||||
c2 = v.c2
|
||||
} ;
|
||||
SlashV2Q v q = predV v ** {
|
||||
n3 = \\_ => q.s ! QIndir ;
|
||||
c2 = v.c2
|
||||
} ;
|
||||
SlashV2A v ap = predV v ** {
|
||||
n3 = \\a => ap.s ! agrAdj a.gn DIndef ;
|
||||
c2 = v.c2
|
||||
} ;
|
||||
|
||||
ComplSlash vp np = insertObj (\\_ => vp.c2.s ++ np.s ! accusative) vp ;
|
||||
ComplSlash vp np =
|
||||
insertObj
|
||||
(\\_ => vp.c2.s ++ np.s ! accusative ++ vp.n3 ! np.a) vp ;
|
||||
|
||||
SlashVV v vp =
|
||||
insertObj (\\a => v.c2.s ++ infVP vp a) (predV v) ** {c2 = vp.c2} ;
|
||||
insertObj (\\a => v.c2.s ++ infVP vp a) (predV v) ** {n3 = vp.n3 ; c2 = vp.c2} ;
|
||||
|
||||
SlashV2VNP v np vp =
|
||||
insertObj
|
||||
(\\a => v.c2.s ++ np.s ! accusative ++ v.c3.s ++ infVP vp a) (predV v)
|
||||
** {c2 = v.c2} ;
|
||||
** {n3 = vp.n3 ; c2 = v.c2} ;
|
||||
|
||||
UseComp comp = insertObj (\\a => comp.s ! agrAdj a.gn DIndef) (predV verbBe) ;
|
||||
|
||||
@@ -46,7 +59,7 @@ incomplete concrete VerbScand of Verb = CatScand ** open CommonScand, ResScand i
|
||||
AdVVP adv vp = insertAdV adv.s vp ;
|
||||
|
||||
|
||||
ReflVP vp = insertObj (\\a => vp.c2.s ++ reflPron a) vp ;
|
||||
ReflVP vp = insertObj (\\a => vp.c2.s ++ reflPron a ++ vp.n3 ! a) vp ;
|
||||
|
||||
PassV2 v =
|
||||
insertObj
|
||||
|
||||
Reference in New Issue
Block a user