From 9a83e683a35e261d699422c747d84f1d77005c7e Mon Sep 17 00:00:00 2001 From: aarne Date: Tue, 7 Jun 2016 12:35:28 +0000 Subject: [PATCH] reflexive NP in Scandinavian; things to fix to decide whether agreement comes from the subject or from the possessed noun --- lib/src/danish/DiffDan.gf | 14 +++++++++++++ lib/src/norwegian/DiffNor.gf | 16 +++++++++++++++ lib/src/norwegian/StructuralNor.gf | 4 ++-- lib/src/scandinavian/DiffScand.gf | 2 ++ lib/src/scandinavian/ExtraScand.gf | 33 ++++++++++++++++++++++++++++++ lib/src/swedish/DiffSwe.gf | 19 +++++++++++++++++ lib/src/swedish/ExtraSweAbs.gf | 6 +++--- 7 files changed, 89 insertions(+), 5 deletions(-) diff --git a/lib/src/danish/DiffDan.gf b/lib/src/danish/DiffDan.gf index 16e143623..1ab3abdb4 100644 --- a/lib/src/danish/DiffDan.gf +++ b/lib/src/danish/DiffDan.gf @@ -84,4 +84,18 @@ instance DiffDan of DiffScand = open CommonScand, Prelude in { av_Prep = "af" ; + possPron : Number -> Person -> Number -> Gender -> Str = \sn,sb,on,og -> case of { + => "min" ; + => "mit" ; + => "mine" ; + => "din" ; + => "dit" ; + => "dine" ; + => "vores" ; + => "jeres" ; + <_,_,Sg,Utr> => "sin" ; + <_,_,Sg,Neutr> => "sit" ; + <_,_,Pl,_> => "sine" + } ; + } diff --git a/lib/src/norwegian/DiffNor.gf b/lib/src/norwegian/DiffNor.gf index e65c564db..f128411be 100644 --- a/lib/src/norwegian/DiffNor.gf +++ b/lib/src/norwegian/DiffNor.gf @@ -92,4 +92,20 @@ instance DiffNor of DiffScand = open CommonScand, Prelude in { hur_IAdv = {s = "hvor"} ; av_Prep = "av" ; + + possPron : Number -> Person -> Number -> Gender -> Str = \sn,sb,on,og -> case of { + => "min" ; + => "mit" ; + => "mine" ; + => "din" ; + => "dit" ; + => "dine" ; + => "vår" ; + => "vårt" ; + => "våre" ; + => "deres" ; + <_,_,Sg,Utr> => "sin" ; + <_,_,Sg,Neutr> => "sit" ; + <_,_,Pl,_> => "sine" + } ; } diff --git a/lib/src/norwegian/StructuralNor.gf b/lib/src/norwegian/StructuralNor.gf index a65cd9bb3..2e024ecb9 100644 --- a/lib/src/norwegian/StructuralNor.gf +++ b/lib/src/norwegian/StructuralNor.gf @@ -42,7 +42,7 @@ concrete StructuralNor of Structural = CatNor ** if_Subj = ss "hvis" ; in8front_Prep = ss "foran" ; i_Pron = - MorphoNor.mkNP "jeg" "meg" "min" "mit" "mine" Utr Sg P1 ; --- mi + MorphoNor.mkNP "jeg" "meg" "min" "mitt" "mine" Utr Sg P1 ; --- mi --- MorphoNor.mkNP "jeg" "meg" (variants {"min" ; "mi"}) "mit" "mine" Utr Sg P1 ; in_Prep = ss "i" ; it_Pron = MorphoNor.regNP "det" "dets" Neutr Sg ; @@ -118,7 +118,7 @@ concrete StructuralNor of Structural = CatNor ** with_Prep = ss "med" ; yes_Utt = ss ["ja"] ; youSg_Pron = - MorphoNor.mkNP "du" "deg" "din" "dit" "dine" Utr Sg P2 ; ---- + MorphoNor.mkNP "du" "deg" "din" "ditt" "dine" Utr Sg P2 ; ---- --- MorphoNor.mkNP "du" "deg" (variants {"din" ; "di"}) "dit" "dine" Utr Sg P2 ; ---- youPl_Pron = MorphoNor.mkNP "dere" "dere" "deres" "deres" "deres" Utr Pl P2 ; youPol_Pron = MorphoNor.mkNP "Dere" "Dere" "Deres" "Deres" "Deres" Utr Sg P2 ; --- wrong in refl diff --git a/lib/src/scandinavian/DiffScand.gf b/lib/src/scandinavian/DiffScand.gf index d55ff3632..00566a716 100644 --- a/lib/src/scandinavian/DiffScand.gf +++ b/lib/src/scandinavian/DiffScand.gf @@ -67,5 +67,7 @@ interface DiffScand = open CommonScand, Prelude in { hur_IAdv : {s : Str} ; av_Prep : Str ; + + possPron : Number -> Person -> Number -> Gender -> Str ; -- mina bilar: Sg, P1, Utr, Pl } diff --git a/lib/src/scandinavian/ExtraScand.gf b/lib/src/scandinavian/ExtraScand.gf index 4d3667021..0ca39a075 100644 --- a/lib/src/scandinavian/ExtraScand.gf +++ b/lib/src/scandinavian/ExtraScand.gf @@ -156,4 +156,37 @@ incomplete concrete ExtraScand of ExtraScandAbs = CatScand ** isMod = True } ; + + lincat + RNP = {s : Agr => Str ; isPron : Bool} ; ---- inherent Agr needed: han färgar sitt hår vitt. But also depends on subject + RNPList = {s1,s2 : Agr => Str} ; + + lin + ReflRNP vps rnp = + insertObjPron + (andB (notB vps.c2.hasPrep) rnp.isPron) + rnp.s + (insertObj (\\a => vps.c2.s ++ vps.n3 ! a) vps) ; + + ReflPron = {s = \\a => reflPron a ; isPron = True} ; ---- agr ?? + ReflPoss num cn = { + s = \\a => possPron a.n a.p num.n (ngen2gen cn.g) ++ num.s ! cn.g ++ cn.s ! num.n ! DDef Indef ! Nom ; + isPron = False + } ; + PredetRNP predet rnp = { + s = \\a => predet.s ! Utr ! Pl ++ predet.p ++ rnp.s ! a ; ---- agr needed here as well +---- s = \\a => predet.s ! np.a.g ! np.a.n ++ predet.p ++ np.s ! a ; +---- a = case pred.a of {PAg n => agrP3 np.a.g n ; _ => np.a} ; + isPron = False + } ; + + ConjRNP conj rpns = conjunctDistrTable Agr conj rpns ** {isPron = False} ; + + Base_rr_RNP x y = twoTable Agr x y ; + Base_nr_RNP x y = twoTable Agr {s = \\a => x.s ! NPAcc} y ; + Base_rn_RNP x y = twoTable Agr x {s = \\a => y.s ! NPAcc} ; + Cons_rr_RNP x xs = consrTable Agr comma x xs ; + Cons_nr_RNP x xs = consrTable Agr comma {s = \\a => x.s ! NPAcc} xs ; + + } diff --git a/lib/src/swedish/DiffSwe.gf b/lib/src/swedish/DiffSwe.gf index 136a92d91..bd9e5ae87 100644 --- a/lib/src/swedish/DiffSwe.gf +++ b/lib/src/swedish/DiffSwe.gf @@ -84,4 +84,23 @@ instance DiffSwe of DiffScand = open CommonScand, Prelude in { hur_IAdv = {s = "hur"} ; av_Prep = "av" ; + possPron : Number -> Person -> Number -> Gender -> Str = \sn,sb,on,og -> case of { + => "min" ; + => "mitt" ; + => "mina" ; + => "din" ; + => "ditt" ; + => "dina" ; + => "vår" ; + => "vårt" ; + => "våra" ; + => "er" ; + => "ert" ; + => "era" ; + <_,_,Sg,Utr> => "sin" ; + <_,_,Sg,Neutr> => "sitt" ; + <_,_,Pl,_> => "sina" + } ; + + } diff --git a/lib/src/swedish/ExtraSweAbs.gf b/lib/src/swedish/ExtraSweAbs.gf index 46829b911..6e664bb6f 100644 --- a/lib/src/swedish/ExtraSweAbs.gf +++ b/lib/src/swedish/ExtraSweAbs.gf @@ -4,7 +4,7 @@ abstract ExtraSweAbs = ExtraScandAbs -[FocAP] ** { flags coding=utf8; -cat ReflNP ; +cat ReflNP ; ---- should be merged with Extra.RNP AR 7/6/2016 PronAD ; -- relational pronouns which can act like adjectives and -- determiners. 'fler' PronAQ ; -- relational pronouns which can act like adjectives and @@ -44,8 +44,8 @@ fun it8utr_Pron : Pron ; this8denna_Quant : Quant ; - ReflCN : Num -> CN -> ReflNP ; - ReflSlash : VPSlash -> ReflNP -> VP ; + ReflCN : Num -> CN -> ReflNP ; ---- should be merged with Extra.RNP AR 7/6/2016 + ReflSlash : VPSlash -> ReflNP -> VP ; ---- should be merged with Extra.RNP AR 7/6/2016 SupCl : NP -> VP -> Pol -> S ; -- när jag sovit