1
0
forked from GitHub/gf-core

added participles to Scandinavian VP

This commit is contained in:
aarne
2014-09-25 17:00:59 +00:00
parent 2cf55a0631
commit 591b56a7e2
7 changed files with 42 additions and 56 deletions

View File

@@ -43,6 +43,7 @@ incomplete concrete CatScand of Cat =
fin : Str ; -- V1 har ---s1
inf : Str -- V2 sagt ---s4
} ;
sp : PartForm => Str ;
a1 : Polarity => Agr => Str ; -- A1 inte ---s3
n2 : Agr => Str ; -- N2 dig ---s5
a2 : Str ; -- A2 idag ---s6

View File

@@ -63,7 +63,13 @@ param
VPForm =
VPFinite STense Anteriority
| VPImperat
| VPInfinit Anteriority ;
| VPInfinit Anteriority
;
PartForm =
PartPret AFormPos Case
| PartPres Number Species Case
;
VType = VAct | VPass | VRefl ;
@@ -274,6 +280,7 @@ oper
fin : Str ; -- V1 har ---s1
inf : Str -- V2 sagt ---s4
} ;
sp : PartForm => Str ; -- present or past participle
a1 : Polarity => Agr => Str ; -- A1 inte ---s3 själv/själva/självt
n2 : Agr => Str ; -- N2 dig ---s5
a2 : Str ; -- A2 idag ---s6
@@ -283,65 +290,35 @@ oper
} ;
insertObj : (Agr => Str) -> VP -> VP = \obj,vp -> {
s = vp.s ;
a1 = vp.a1 ;
insertObj : (Agr => Str) -> VP -> VP = \obj,vp -> vp ** {
n2 = \\a => obj ! a ++ vp.n2 ! a ;
a2 = vp.a2 ;
ext = vp.ext ;
en2 = True ;
ea2 = vp.ea2 ;
eext = vp.eext
} ;
insertObjPost : (Agr => Str) -> VP -> VP = \obj,vp -> {
s = vp.s ;
a1 = vp.a1 ;
insertObjPost : (Agr => Str) -> VP -> VP = \obj,vp -> vp ** {
n2 = \\a => vp.n2 ! a ++ obj ! a ;
a2 = vp.a2 ;
ext = vp.ext ;
en2 = True ;
ea2 = vp.ea2 ;
eext = vp.eext
} ;
insertAdv : Str -> VP -> VP = \adv,vp -> {
s = vp.s ;
a1 = vp.a1 ;
n2 = vp.n2 ;
insertAdv : Str -> VP -> VP = \adv,vp -> vp ** {
a2 = vp.a2 ++ adv ;
ext = vp.ext ;
en2 = vp.en2 ;
ea2 = True ;
eext = vp.eext
} ;
insertExt : Str -> VP -> VP = \ext,vp -> {
s = vp.s ;
a1 = vp.a1 ;
n2 = vp.n2 ;
a2 = vp.a2 ;
insertExt : Str -> VP -> VP = \ext,vp -> vp ** {
ext = vp.ext ++ ext ;
en2 = vp.en2 ;
ea2 = vp.ea2 ;
eext = True ;
} ;
insertAdV : Str -> VP -> VP = \adv -> insertAdVAgr (\\_ => adv) ;
insertAdVAgr : (Agr => Str) -> VP -> VP = \adv,vp -> {
s = vp.s ;
insertAdVAgr : (Agr => Str) -> VP -> VP = \adv,vp ->vp ** {
a1 = \\b,a => vp.a1 ! b ! a ++ adv ! a ;
n2 = vp.n2 ;
a2 = vp.a2 ;
ext = vp.ext ;
en2 = vp.en2 ;
ea2 = vp.ea2 ;
eext = vp.eext
} ;
passiveVP : VP -> VP = \vp -> {
s = \\_ => vp.s ! Pass ; -- forms the s-passive
sp = vp.sp ;
a1 = vp.a1 ;
n2 = vp.n2 ;
a2 = vp.a2 ;

View File

@@ -66,6 +66,10 @@ interface ResScand = DiffScand ** open CommonScand, Prelude in {
VPInfinit Anter => vf [] (ha ++ vsup d) ; --# notpresent
VPInfinit Simul => vf [] (vinf d)
} ;
sp = table {
PartPret a c => verb.s ! (VI (VPtPret a c)) ;
PartPres n s c => verb.s ! (VI (VPtPres n s c))
} ;
a1 : Polarity => Agr => Str = \\p,a => negation ! p ;
n2 : Agr => Str = \\a => case verb.vtype of {
VRefl => reflPron a ;

View File

@@ -44,10 +44,10 @@ lin
{s = \\ag,rc => t.s ++ p.s ++ vilket ++ cl.s ! t.t ! t.a ! p.p ! Sub } ;
AdvFocVP adv vp = {s = \\v,vpf => {fin = adv.s ++ (vp.s ! v ! vpf).fin ;
inf = (vp.s ! v ! vpf).inf};
a1 = vp.a1 ; n2 = vp.n2 ; a2 = vp.a2 ; ext = vp.ext ;
en2 = vp.en2 ; ea2 = vp.ea2; eext = vp.eext } ;
AdvFocVP adv vp = vp ** {
s = \\v,vpf => {fin = adv.s ++ (vp.s ! v ! vpf).fin ;
inf = (vp.s ! v ! vpf).inf}
} ;
PredetAdvF adv = {s = \\_,_ => adv.s ; p = [] ; a = PNoAg} ;
QuantPronAQ x =

View File

@@ -2,6 +2,9 @@
concrete DictionarySwe of Dictionary = CatSwe ** open ParadigmsSwe, (I = IrregSwe), (C = CommonScand), (R = ResSwe), (L = LexiconSwe), (M = MakeStructuralSwe), (S = SyntaxSwe), Prelude in {
oper adjAdv : A -> Adv = \a -> S.mkAdv a ;
flags
coding = utf8;
@@ -61167,6 +61170,7 @@ lin unification_N = mkN "enande" ; -- status=guess
lin unifilar_A = variants {} ; -- status=guess
lin unifoliate_A = variants {} ; -- status=guess
lin uniform_A = mkA "uniform" ; -- SaldoWN
lin uniformly_Adv = adjAdv uniform_A ;
lin uniform_N = mkN "uniform" "uniformer" ; -- SaldoWN
lin uniformed_A = compoundA (regA "uniformerad"); -- status=guess
lin uniformity_N = mkN "uniformitet" "uniformiteter" ; -- comment=4

View File

@@ -96,26 +96,26 @@ fun
{-
-- changes from ParseEngAbs
ComplBareVS -> ComplVS -- as variant
SlashBareV2S -> SlashV2S -- as variant
ComplSlashPartLast -> ComplSlash -- as variant
ComplBareVS --> ComplVS -- as variant
SlashBareV2S --> SlashV2S -- as variant
ComplSlashPartLast --> ComplSlash -- as variant
CompoundCN Sg/Pl -> CompoundCN -- as variants
DashCN -> CompoundCN -- as variant
CompoundCN Sg/Pl --> CompoundCN -- as variants
DashCN --> CompoundCN -- as variant
GerundN -> GerundCN -- special case: now CN
-> GerundNP -- an NP version without determiner
-> GerundAdv -- an Adv version without determiner or preposition
GerundN --> GerundCN -- special case: now CN
--> GerundNP -- an NP version without determiner
--> GerundAdv -- an Adv version without determiner or preposition
GerundAP -> PresPartAP -- special case: now with a VP argument
GerundAP --> PresPartAP -- special case: now with a VP argument
PastPartAP -> PastPartAP -- now with VPSlash argument
-> PastPartAgentAP -- VPSlash + by NP
PastPartAP --> PastPartAP -- now with VPSlash argument
--> PastPartAgentAP -- VPSlash + by NP
OrdCompar -> UseComparA -- the only use in PTB reduces to this standard RGL function
OrdCompar --> UseComparA -- the only use in PTB reduces to this standard RGL function
PredVPosv -> PredFrontVS, PredFrontVQ -- restricted to the special case actually occurring in PTB
PredVPovs -> -- inversion treated as variant: I am here, said she
PredVPosv --> PredFrontVS, PredFrontVQ -- restricted to the special case actually occurring in PTB
PredVPovs --> -- inversion treated as variant: I am here, said she
-}

View File

@@ -53,7 +53,7 @@ lin
co = v.s ! VI (VPtPres Sg Indef Nom) ;
} ;
GerundAP v = {
PresPartAP vp = {
s = \\_ => v.s ! VI (VPtPres Sg Indef Nom) ;
isPre = True
} ;