From 264806fbbdcdd66f0045f314161391c9f0c09c92 Mon Sep 17 00:00:00 2001 From: aarne Date: Sun, 5 Jun 2016 16:40:46 +0000 Subject: [PATCH] enabled emptyRP in Scandinavian by distinguishing between RNom and RAcc ; this also made it possible to use der as the Danish RNom form --- lib/src/abstract/Extra.gf | 4 +++- lib/src/danish/DiffDan.gf | 3 ++- lib/src/norwegian/DiffNor.gf | 2 +- lib/src/scandinavian/CommonScand.gf | 2 +- lib/src/scandinavian/ExtraScand.gf | 8 ++++++++ lib/src/scandinavian/ExtraScandAbs.gf | 4 +++- lib/src/scandinavian/RelativeScand.gf | 2 +- lib/src/swedish/DiffSwe.gf | 2 +- lib/src/translator/TranslateSwe.gf | 3 +++ 9 files changed, 23 insertions(+), 7 deletions(-) diff --git a/lib/src/abstract/Extra.gf b/lib/src/abstract/Extra.gf index f2e3db404..885c9bf62 100644 --- a/lib/src/abstract/Extra.gf +++ b/lib/src/abstract/Extra.gf @@ -12,10 +12,12 @@ abstract Extra = Cat ** { GenRP : Num -> CN -> RP ; -- whose car CompBareCN : CN -> Comp ; -- (est) professeur + PiedPipingRelSlash : RP -> ClSlash -> RCl ; -- in which he lives StrandRelSlash : RP -> ClSlash -> RCl ; -- that he lives in EmptyRelSlash : ClSlash -> RCl ; -- he lives in StrandQuestSlash : IP -> ClSlash -> QCl ; -- whom does John live with - + PiedPipingQuestSlash : IP -> ClSlash -> QCl ; -- with whom does John live + -- $VP$ conjunction, which has different fragments implemented in -- different languages - never a full $VP$, though. diff --git a/lib/src/danish/DiffDan.gf b/lib/src/danish/DiffDan.gf index 8d2ba40f9..16e143623 100644 --- a/lib/src/danish/DiffDan.gf +++ b/lib/src/danish/DiffDan.gf @@ -64,7 +64,8 @@ instance DiffDan of DiffScand = open CommonScand, Prelude in { } ; relPron : Gender => Number => RCase => Str = \\g,n,c => case c of { - RNom | RPrep False => "som" ; + RNom => "der" ; --- could be som as well + RAcc | RPrep False => "som" ; RGen => "hvis" ; RPrep _ => gennumForms "hvilken" "hvilket" "hvilke" ! gennum g n } ; diff --git a/lib/src/norwegian/DiffNor.gf b/lib/src/norwegian/DiffNor.gf index de4829b5d..e65c564db 100644 --- a/lib/src/norwegian/DiffNor.gf +++ b/lib/src/norwegian/DiffNor.gf @@ -74,7 +74,7 @@ instance DiffNor of DiffScand = open CommonScand, Prelude in { } ; relPron : Gender => Number => RCase => Str = \\g,n,c => case c of { - RNom | RPrep False => "som" ; + RNom | RAcc | RPrep False => "som" ; RGen => "hvis" ; RPrep _ => gennumForms "hvilken" "hvilket" "hvilke" ! gennum g n } ; diff --git a/lib/src/scandinavian/CommonScand.gf b/lib/src/scandinavian/CommonScand.gf index 5e88c4f32..9ef3964e6 100644 --- a/lib/src/scandinavian/CommonScand.gf +++ b/lib/src/scandinavian/CommonScand.gf @@ -75,7 +75,7 @@ param NPForm = NPNom | NPAcc | NPPoss GenNum Case ; - RCase = RNom | RGen | RPrep Bool ; + RCase = RNom | RAcc | RGen | RPrep Bool ; RAgr = RNoAg | RAg Gender Number Person ; diff --git a/lib/src/scandinavian/ExtraScand.gf b/lib/src/scandinavian/ExtraScand.gf index 6159cf673..6801558e9 100644 --- a/lib/src/scandinavian/ExtraScand.gf +++ b/lib/src/scandinavian/ExtraScand.gf @@ -16,6 +16,14 @@ incomplete concrete ExtraScand of ExtraScandAbs = CatScand ** } } ; + emptyRP = { + s = \\g,n => table { + RAcc => [] ; + c => relPron ! g ! n ! c + } ; + a = RNoAg + } ; + PiedPipingRelSlash rp slash = { s = \\t,a,p,ag,_ => let diff --git a/lib/src/scandinavian/ExtraScandAbs.gf b/lib/src/scandinavian/ExtraScandAbs.gf index 573095986..8efb81217 100644 --- a/lib/src/scandinavian/ExtraScandAbs.gf +++ b/lib/src/scandinavian/ExtraScandAbs.gf @@ -1,5 +1,7 @@ abstract ExtraScandAbs = Extra ** { - fun --# notpresent + fun TFutKommer : Tense ; --# notpresent + emptyRP : RP ; -- empty RP in Acc position: "kvinnan jag såg" + } diff --git a/lib/src/scandinavian/RelativeScand.gf b/lib/src/scandinavian/RelativeScand.gf index 3dbf9bc49..31869f26e 100644 --- a/lib/src/scandinavian/RelativeScand.gf +++ b/lib/src/scandinavian/RelativeScand.gf @@ -31,7 +31,7 @@ incomplete concrete RelativeScand of Relative = RelSlash rp slash = { s = \\t,a,p,ag,_ => - rp.s ! ag.g ! ag.n ! RNom ++ slash.s ! t ! a ! p ! Sub ++ slash.c2.s ; + rp.s ! ag.g ! ag.n ! RAcc ++ slash.s ! t ! a ! p ! Sub ++ slash.c2.s ; c = NPAcc } ; diff --git a/lib/src/swedish/DiffSwe.gf b/lib/src/swedish/DiffSwe.gf index 78931194e..136a92d91 100644 --- a/lib/src/swedish/DiffSwe.gf +++ b/lib/src/swedish/DiffSwe.gf @@ -66,7 +66,7 @@ instance DiffSwe of DiffScand = open CommonScand, Prelude in { } ; relPron : Gender => Number => RCase => Str = \\g,n,c => case c of { - RNom | RPrep False => "som" ; + RNom | RAcc | RPrep False => "som" ; RGen => "vars" ; RPrep True => gennumForms "vilken" "vilket" "vilka" ! gennum g n } ; diff --git a/lib/src/translator/TranslateSwe.gf b/lib/src/translator/TranslateSwe.gf index 6062e4027..c040314b0 100644 --- a/lib/src/translator/TranslateSwe.gf +++ b/lib/src/translator/TranslateSwe.gf @@ -21,6 +21,7 @@ concrete TranslateSwe of Translate = ], RelativeSwe - [ RelSlash -- replaced by RelSlash | PiedPipingRelSlash + ,IdRP -- replaced by IdRP | emptyRP ], IdiomSwe, ConstructionSwe, @@ -49,6 +50,8 @@ lin | {s = \\n,d,c => np.s ! NPPoss (gennum (ngen2gen cn.g) n) Nom ++ cn.s ! n ! DDef Indef ! c ; g = cn.g ; isMod = True} ---- overgenerating ; + IdRP = G.IdRP | E.emptyRP ; + RelSlash rp cls = G.RelSlash rp cls | E.PiedPipingRelSlash rp cls ; QuestSlash ip cls = G.QuestSlash ip cls | E.PiedPipingQuestSlash ip cls ;