From c122bc52d84b702c1c61f709f42e07bd59561b72 Mon Sep 17 00:00:00 2001 From: aarne Date: Tue, 24 Jun 2008 12:00:40 +0000 Subject: [PATCH] scandinavian agreement to object --- lib/resource-1.4/scandinavian/CatScand.gf | 8 +++- .../scandinavian/QuestionScand.gf | 3 +- .../scandinavian/RelativeScand.gf | 10 +++- .../scandinavian/SentenceScand.gf | 8 ++-- lib/resource-1.4/scandinavian/VerbScand.gf | 47 ++++++++++++------- 5 files changed, 51 insertions(+), 25 deletions(-) diff --git a/lib/resource-1.4/scandinavian/CatScand.gf b/lib/resource-1.4/scandinavian/CatScand.gf index 02467884b..536f6aa55 100644 --- a/lib/resource-1.4/scandinavian/CatScand.gf +++ b/lib/resource-1.4/scandinavian/CatScand.gf @@ -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} ; diff --git a/lib/resource-1.4/scandinavian/QuestionScand.gf b/lib/resource-1.4/scandinavian/QuestionScand.gf index 57b9d44d3..f053e71cc 100644 --- a/lib/resource-1.4/scandinavian/QuestionScand.gf +++ b/lib/resource-1.4/scandinavian/QuestionScand.gf @@ -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 ; diff --git a/lib/resource-1.4/scandinavian/RelativeScand.gf b/lib/resource-1.4/scandinavian/RelativeScand.gf index 3ea27ff60..c5c0abc17 100644 --- a/lib/resource-1.4/scandinavian/RelativeScand.gf +++ b/lib/resource-1.4/scandinavian/RelativeScand.gf @@ -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 } ; diff --git a/lib/resource-1.4/scandinavian/SentenceScand.gf b/lib/resource-1.4/scandinavian/SentenceScand.gf index 4dc69fec5..e845b2a79 100644 --- a/lib/resource-1.4/scandinavian/SentenceScand.gf +++ b/lib/resource-1.4/scandinavian/SentenceScand.gf @@ -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 } ; diff --git a/lib/resource-1.4/scandinavian/VerbScand.gf b/lib/resource-1.4/scandinavian/VerbScand.gf index 82a39e154..5ec40157c 100644 --- a/lib/resource-1.4/scandinavian/VerbScand.gf +++ b/lib/resource-1.4/scandinavian/VerbScand.gf @@ -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