scandinavian agreement to object

This commit is contained in:
aarne
2008-06-24 12:00:40 +00:00
parent 9945a5b08e
commit c122bc52d8
5 changed files with 51 additions and 25 deletions

View File

@@ -10,13 +10,14 @@ incomplete concrete CatScand of Cat =
S = {s : Order => Str} ; S = {s : Order => Str} ;
QS = {s : QForm => Str} ; QS = {s : QForm => Str} ;
RS = {s : Agr => Str ; c : NPForm} ; RS = {s : Agr => Str ; c : NPForm} ;
SSlash = {s : Order => Str} ** {c2 : Complement} ; SSlash = {s : Order => Str ; n3 : Agr => Str ; c2 : Complement} ;
-- Sentence -- Sentence
Cl = {s : R.Tense => Anteriority => Polarity => Order => Str} ; Cl = {s : R.Tense => Anteriority => Polarity => Order => Str} ;
ClSlash = { ClSlash = {
s : R.Tense => Anteriority => Polarity => Order => Str ; s : R.Tense => Anteriority => Polarity => Order => Str ;
n3 : Agr => Str ;
c2 : Complement c2 : Complement
} ; } ;
Imp = {s : Polarity => Number => Str} ; Imp = {s : Polarity => Number => Str} ;
@@ -47,7 +48,10 @@ incomplete concrete CatScand of Cat =
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
} ; } ;
VPSlash = CommonScand.VP ** {c2 : Complement} ; VPSlash = CommonScand.VP ** {
n3 : Agr => Str ; -- object-control complement
c2 : Complement
} ;
Comp = {s : AFormPos => Str} ; Comp = {s : AFormPos => Str} ;

View File

@@ -29,7 +29,8 @@ incomplete concrete QuestionScand of Question =
QuestSlash ip slash = { QuestSlash ip slash = {
s = \\t,a,p => s = \\t,a,p =>
let 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 who = slash.c2.s ++ ip.s ! accusative --- stranding in ExtScand
in table { in table {
QDir => who ++ cls ! Inv ; QDir => who ++ cls ! Inv ;

View File

@@ -29,8 +29,14 @@ incomplete concrete RelativeScand of Relative =
RelSlash rp slash = { RelSlash rp slash = {
s = \\t,a,p,ag => s = \\t,a,p,ag =>
let
agr = case rp.a of {
RNoAg => ag ;
RAg agg => agg
}
in
slash.c2.s ++ rp.s ! ag.gn ! RPrep slash.c2.hasPrep ++ slash.c2.s ++ rp.s ! ag.gn ! RPrep slash.c2.hasPrep ++
slash.s ! t ! a ! p ! Sub ; slash.s ! t ! a ! p ! Sub ++ slash.n3 ! agr ;
c = NPAcc c = NPAcc
} ; } ;

View File

@@ -21,20 +21,21 @@ incomplete concrete SentenceScand of Sentence =
mkClause mkClause
(np.s ! nominative) np.a (np.s ! nominative) np.a
vp ** vp **
{c2 = vp.c2} ; {n3 = vp.n3 ; c2 = vp.c2} ;
AdvSlash slash adv = { AdvSlash slash adv = {
s = \\t,a,b,o => slash.s ! t ! a ! b ! o ++ adv.s ; s = \\t,a,b,o => slash.s ! t ! a ! b ! o ++ adv.s ;
n3 = slash.n3 ;
c2 = slash.c2 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 = SlashVS np vs slash =
mkClause mkClause
(np.s ! nominative) np.a (np.s ! nominative) np.a
(insertObj (\\_ => conjThat ++ slash.s ! Sub) (predV vs)) ** (insertObj (\\_ => conjThat ++ slash.s ! Sub) (predV vs)) **
{c2 = slash.c2} ; {n3 = slash.n3 ; c2 = slash.c2} ;
EmbedS s = {s = conjThat ++ s.s ! Sub} ; EmbedS s = {s = conjThat ++ s.s ! Sub} ;
EmbedQS qs = {s = qs.s ! QIndir} ; EmbedQS qs = {s = qs.s ! QIndir} ;
@@ -52,6 +53,7 @@ incomplete concrete SentenceScand of Sentence =
} ; } ;
UseSlash t a p cl = { UseSlash t a p cl = {
s = \\o => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! o ; s = \\o => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! o ;
n3 = cl.n3 ;
c2 = cl.c2 c2 = cl.c2
} ; } ;

View File

@@ -5,36 +5,49 @@ incomplete concrete VerbScand of Verb = CatScand ** open CommonScand, ResScand i
lin lin
UseV = predV ; UseV = predV ;
SlashV2a v = predV v ** {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) ** {c2 = v.c3} ; insertObj (\\_ => v.c2.s ++ np.s ! accusative) (predV v) **
Slash3V3 v np = {n3 = \\_ => [] ; c2 = v.c3} ; -- to preserve the order of args
insertObj (\\_ => v.c3.s ++ np.s ! accusative) (predV v) ** {c2 = v.c2} ; 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) ; ComplVV v vp = insertObj (\\a => v.c2.s ++ infVP vp a) (predV v) ;
ComplVS v s = insertObj (\\_ => conjThat ++ s.s ! Sub) (predV v) ; ComplVS v s = insertObj (\\_ => conjThat ++ s.s ! Sub) (predV v) ;
ComplVQ v q = insertObj (\\_ => q.s ! QIndir) (predV v) ; ComplVQ v q = insertObj (\\_ => q.s ! QIndir) (predV v) ;
ComplVA v ap = insertObj (\\a => ap.s ! agrAdj a.gn DIndef) (predV v) ; ComplVA v ap = insertObj (\\a => ap.s ! agrAdj a.gn DIndef) (predV v) ;
SlashV2V v vp = SlashV2V v vp = predV v ** {
insertObj (\\a => v.c3.s ++ infVP vp a) (predV v) ** {c2 = v.c2} ; n3 = \\a => v.c3.s ++ infVP vp a ;
SlashV2S v s = c2 = v.c2
insertObj (\\_ => conjThat ++ s.s ! Sub) (predV v) ** {c2 = v.c2} ; } ;
SlashV2Q v q = SlashV2S v s = predV v ** {
insertObj (\\_ => q.s ! QIndir) (predV v) ** {c2 = v.c2} ; n3 = \\_ => conjThat ++ s.s ! Sub ;
SlashV2A v ap = c2 = v.c2
insertObj } ;
(\\a => ap.s ! agrAdj a.gn DIndef) (predV v) ** {c2 = v.c2} ; ---- agr to obj 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 = 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 = 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)
** {c2 = v.c2} ; ** {n3 = vp.n3 ; c2 = v.c2} ;
UseComp comp = insertObj (\\a => comp.s ! agrAdj a.gn DIndef) (predV verbBe) ; 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 ; 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 = PassV2 v =
insertObj insertObj