mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 03:32:51 -06:00
PassAgentVPSlash for Eng, Swe, Fin, Fre
This commit is contained in:
@@ -74,6 +74,11 @@ abstract Extra = Cat ** {
|
|||||||
|
|
||||||
PassVPSlash : VPSlash -> VP ; -- be forced to sleep
|
PassVPSlash : VPSlash -> VP ; -- be forced to sleep
|
||||||
|
|
||||||
|
-- the form with an agent may result in a different linearization
|
||||||
|
-- from an adverbial modification by an agent phrase.
|
||||||
|
|
||||||
|
PassAgentVPSlash : VPSlash -> NP -> VP ; -- be begged by her to go
|
||||||
|
|
||||||
-- publishing of the document
|
-- publishing of the document
|
||||||
|
|
||||||
NominalizeVPSlashNP : VPSlash -> NP -> NP ;
|
NominalizeVPSlashNP : VPSlash -> NP -> NP ;
|
||||||
|
|||||||
@@ -149,7 +149,8 @@ concrete ExtraEng of ExtraEngAbs = CatEng **
|
|||||||
lin
|
lin
|
||||||
UncNeg = {s = [] ; p = CNeg False} ;
|
UncNeg = {s = [] ; p = CNeg False} ;
|
||||||
|
|
||||||
PassVPSlash vps =
|
oper passVPSlash : VPSlash -> Str -> ResEng.VP =
|
||||||
|
\vps,ag ->
|
||||||
let
|
let
|
||||||
be = predAux auxBe ;
|
be = predAux auxBe ;
|
||||||
ppt = vps.ptp
|
ppt = vps.ptp
|
||||||
@@ -160,10 +161,14 @@ lin
|
|||||||
ptp = be.ptp ;
|
ptp = be.ptp ;
|
||||||
inf = be.inf ;
|
inf = be.inf ;
|
||||||
ad = \\_ => [] ;
|
ad = \\_ => [] ;
|
||||||
s2 = \\a => vps.ad ! a ++ ppt ++ vps.p ++ vps.s2 ! a ++ vps.c2 ; ---- order
|
s2 = \\a => vps.ad ! a ++ ppt ++ vps.p ++ ag ++ vps.s2 ! a ++ vps.c2 ; ---- place of agent
|
||||||
ext = vps.ext
|
ext = vps.ext
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
PassVPSlash vps = passVPSlash vps [] ;
|
||||||
|
PassAgentVPSlash vps np = passVPSlash vps ("by" ++ np.s ! NPAcc) ;
|
||||||
|
|
||||||
--- AR 7/3/2013
|
--- AR 7/3/2013
|
||||||
ComplSlashPartLast vps np = case vps.gapInMiddle of {
|
ComplSlashPartLast vps np = case vps.gapInMiddle of {
|
||||||
_ => insertObjPartLast (\\_ => vps.c2 ++ np.s ! NPAcc) vps ---
|
_ => insertObjPartLast (\\_ => vps.c2 ++ np.s ! NPAcc) vps ---
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
--# -coding=latin1
|
--# -coding=latin1
|
||||||
|
|
||||||
concrete ExtraFin of ExtraFinAbs = CatFin **
|
concrete ExtraFin of ExtraFinAbs = CatFin **
|
||||||
open ResFin, MorphoFin, Coordination, Prelude, NounFin, StructuralFin, StemFin, (R = ParamX) in {
|
open ResFin, MorphoFin, Coordination, Prelude, NounFin, VerbFin, StructuralFin, StemFin, (R = ParamX) in {
|
||||||
|
|
||||||
lin
|
lin
|
||||||
GenNP np = {
|
GenNP np = {
|
||||||
@@ -231,4 +231,32 @@ concrete ExtraFin of ExtraFinAbs = CatFin **
|
|||||||
kohan_Part = mkPart "kohan" "köhän" ;
|
kohan_Part = mkPart "kohan" "köhän" ;
|
||||||
pahan_Part = mkPart "pahan" "pähän" ;
|
pahan_Part = mkPart "pahan" "pähän" ;
|
||||||
|
|
||||||
|
PassVPSlash vp = {
|
||||||
|
s = \\vif,ant,pol,agr => case vif of {
|
||||||
|
VIFin t => vp.s ! VIPass t ! ant ! pol ! agr ;
|
||||||
|
_ => vp.s ! vif ! ant ! pol ! agr
|
||||||
|
} ;
|
||||||
|
s2 = vp.s2 ;
|
||||||
|
adv = vp.adv ;
|
||||||
|
ext = vp.ext ;
|
||||||
|
h = vp.h ;
|
||||||
|
isNeg = vp.isNeg ;
|
||||||
|
sc = case vp.c2.c of {NPCase Nom => NPAcc ; c => c}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
---- uses inversion of active: Guernican maalasi Picasso. TODO: use the agent participle
|
||||||
|
---- TODO maybe squeeze s2 between the fin and inf (but this is subtle)
|
||||||
|
---- sinua olen rakastanut minä -> sinua olen minä rakastanus
|
||||||
|
|
||||||
|
PassAgentVPSlash vp np = {
|
||||||
|
s = \\vif,ant,pol,agr => vp.s ! vif ! ant ! pol ! np.a ; -- only agr changes
|
||||||
|
s2 = \\b,p,a => np.s ! NPCase Nom ++ vp.s2 ! b ! p ! a ;
|
||||||
|
adv = vp.adv ;
|
||||||
|
ext = vp.ext ;
|
||||||
|
h = vp.h ;
|
||||||
|
isNeg = vp.isNeg ;
|
||||||
|
sc = vp.c2.c -- advantage: works for all V2 verbs, need not be transitive
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
--# -coding=latin1
|
--# -coding=latin1
|
||||||
abstract ExtraFinAbs = Extra [
|
abstract ExtraFinAbs = Extra [
|
||||||
GenNP,GenIP,GenRP,
|
GenNP,GenIP,GenRP,
|
||||||
|
PassVPSlash, PassAgentVPSlash,
|
||||||
VPI,ListVPI,BaseVPI,ConsVPI,MkVPI,ComplVPIVV,ConjVPI,
|
VPI,ListVPI,BaseVPI,ConsVPI,MkVPI,ComplVPIVV,ConjVPI,
|
||||||
VPS,ListVPS,BaseVPS,ConsVPS,ConjVPS,MkVPS,PredVPS,ConjVPS,Tense,Temp,Pol,S,
|
VPS,ListVPS,BaseVPS,ConsVPS,ConjVPS,MkVPS,PredVPS,ConjVPS,Tense,Temp,Pol,S,
|
||||||
VV,VP,Conj,NP,Quant,IAdv,IComp,ICompAP,IAdvAdv,Adv,AP, Pron, RP, ProDrop] ** {
|
VV,VP,Conj,NP,Quant,IAdv,IComp,ICompAP,IAdvAdv,Adv,AP, Pron, RP, ProDrop] ** {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ concrete ParseFin of ParseEngAbs =
|
|||||||
QuestionFin,
|
QuestionFin,
|
||||||
RelativeFin,
|
RelativeFin,
|
||||||
IdiomFin [NP, VP, Tense, Cl, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP]
|
IdiomFin [NP, VP, Tense, Cl, ProgrVP, ExistNP, SelfAdvVP, SelfAdVVP, SelfNP]
|
||||||
, ExtraFin [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash, Voc, RP, GenRP,
|
, ExtraFin [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash, Voc, RP, GenRP, PassVPSlash, PassAgentVPSlash,
|
||||||
Temp, Tense, Pol, Conj, VPS, ListVPS, S, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS,
|
Temp, Tense, Pol, Conj, VPS, ListVPS, S, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS,
|
||||||
VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV]
|
VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV]
|
||||||
, DictEngFin
|
, DictEngFin
|
||||||
@@ -55,21 +55,6 @@ lin
|
|||||||
h = cn.h
|
h = cn.h
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
PassVPSlash = passVPSlash ;
|
|
||||||
|
|
||||||
oper
|
|
||||||
passVPSlash : VPSlash -> ResFin.VP = \vp -> lin VP {
|
|
||||||
s = \\vif,ant,pol,agr => case vif of {
|
|
||||||
VIFin t => vp.s ! VIPass t ! ant ! pol ! agr ;
|
|
||||||
_ => vp.s ! vif ! ant ! pol ! agr
|
|
||||||
} ;
|
|
||||||
s2 = vp.s2 ;
|
|
||||||
adv = vp.adv ;
|
|
||||||
ext = vp.ext ;
|
|
||||||
h = vp.h ;
|
|
||||||
isNeg = vp.isNeg ;
|
|
||||||
sc = case vp.c2.c of {NPCase Nom => NPAcc ; c => c}
|
|
||||||
} ;
|
|
||||||
|
|
||||||
lin
|
lin
|
||||||
DashCN noun1 noun2 = {
|
DashCN noun1 noun2 = {
|
||||||
|
|||||||
@@ -77,4 +77,8 @@ concrete ExtraFre of ExtraFreAbs = ExtraRomanceFre **
|
|||||||
ExistsNP np =
|
ExistsNP np =
|
||||||
mkClause "il" True False np.a (insertComplement (\\_ => (np.s ! Nom).ton) (predV (regV "exister"))) ;
|
mkClause "il" True False np.a (insertComplement (\\_ => (np.s ! Nom).ton) (predV (regV "exister"))) ;
|
||||||
|
|
||||||
|
|
||||||
|
PassAgentVPSlash vps np = passVPSlash
|
||||||
|
vps ("par" ++ (np.s ! Acc).ton) ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,4 +46,5 @@ abstract ExtraFreAbs = ExtraRomanceAbs - [ProDrop] ** {
|
|||||||
|
|
||||||
PNegNe : Pol ;
|
PNegNe : Pol ;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ concrete ParseFre of ParseEngAbs =
|
|||||||
QuestionFre,
|
QuestionFre,
|
||||||
RelativeFre,
|
RelativeFre,
|
||||||
IdiomFre [NP, VP, Tense, Cl, ProgrVP, ExistNP],
|
IdiomFre [NP, VP, Tense, Cl, ProgrVP, ExistNP],
|
||||||
ExtraFre [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash,
|
ExtraFre [NP, Quant, VPSlash, VP, Tense, GenNP, PassVPSlash, PassAgentVPSlash,
|
||||||
Temp, Pol, Conj, VPS, ListVPS, S, Num, CN, RP, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS, GenRP,
|
Temp, Pol, Conj, VPS, ListVPS, S, Num, CN, RP, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS, GenRP,
|
||||||
VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
|
VPI, VPIForm, VPIInf, VPIPresPart, ListVPI, VV, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
|
||||||
ClSlash, RCl, EmptyRelSlash],
|
ClSlash, RCl, EmptyRelSlash],
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ incomplete concrete ExtraRomance of ExtraRomanceAbs = CatRomance **
|
|||||||
CommonRomance,
|
CommonRomance,
|
||||||
Coordination,
|
Coordination,
|
||||||
ResRomance,
|
ResRomance,
|
||||||
|
(G = Grammar),
|
||||||
Prelude in {
|
Prelude in {
|
||||||
|
|
||||||
lin TPasseSimple = {s = []} ** {t = RPasse} ; --# notpresent
|
lin TPasseSimple = {s = []} ** {t = RPasse} ; --# notpresent
|
||||||
@@ -75,19 +76,24 @@ incomplete concrete ExtraRomance of ExtraRomanceAbs = CatRomance **
|
|||||||
hasClit = False
|
hasClit = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
PassVPSlash vps =
|
PassVPSlash vps = passVPSlash vps [] ;
|
||||||
|
---- PassAgentVPSlash vps np = passVPSlash
|
||||||
|
---- vps (let by = <Grammar.by8agent_Prep : Prep> in by.s ++ (np.s ! by.c).ton) ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
passVPSlash : VPSlash -> Str -> ResRomance.VP = \vps, ag ->
|
||||||
let auxvp = predV auxPassive
|
let auxvp = predV auxPassive
|
||||||
in
|
in
|
||||||
insertComplement (\\a => let agr = complAgr a in vps.s.s ! VPart agr.g agr.n) {
|
insertComplement (\\a => let agr = complAgr a in vps.s.s ! VPart agr.g agr.n) {
|
||||||
s = auxvp.s ;
|
s = auxvp.s ;
|
||||||
agr = auxvp.agr ;
|
agr = auxvp.agr ;
|
||||||
neg = vps.neg ;
|
neg = vps.neg ;
|
||||||
clit1 = vps.clit1 ;
|
clit1 = vps.clit1 ;
|
||||||
clit2 = vps.clit2 ;
|
clit2 = vps.clit2 ;
|
||||||
clit3 = vps.clit3 ;
|
clit3 = vps.clit3 ;
|
||||||
isNeg = vps.isNeg ;
|
isNeg = vps.isNeg ;
|
||||||
comp = vps.comp ;
|
comp = \\a => vps.comp ! a ++ ag ;
|
||||||
ext = vps.ext
|
ext = vps.ext
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
abstract ExtraRomanceAbs = Cat, Extra[
|
abstract ExtraRomanceAbs = Cat, Extra[
|
||||||
VPI,ListVPI,BaseVPI,ConsVPI,MkVPI,ComplVPIVV,ConjVPI,
|
VPI,ListVPI,BaseVPI,ConsVPI,MkVPI,ComplVPIVV,ConjVPI,
|
||||||
VPS,ListVPS,BaseVPS,ConsVPS,ConjVPS,MkVPS,PredVPS,
|
VPS,ListVPS,BaseVPS,ConsVPS,ConjVPS,MkVPS,PredVPS,
|
||||||
PassVPSlash,ExistsNP,
|
PassVPSlash, PassAgentVPSlash, ---- how to get type of by8agent_Prep; lin moved to indiv. languages
|
||||||
|
ExistsNP,
|
||||||
Temp,Pol,S,NP,VPSlash,Cl,
|
Temp,Pol,S,NP,VPSlash,Cl,
|
||||||
VV,VP,Conj,Pron,ProDrop,CompIQuant,IQuant,IComp,PrepCN,CN,Prep,Adv] ** {
|
VV,VP,Conj,Pron,ProDrop,CompIQuant,IQuant,IComp,PrepCN,CN,Prep,Adv] ** {
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
concrete ExtraSwe of ExtraSweAbs = ExtraScandSwe - [FocAdv] ,
|
concrete ExtraSwe of ExtraSweAbs = ExtraScandSwe - [FocAdv] ,
|
||||||
ParadigmsSwe - [nominative] **
|
ParadigmsSwe - [nominative] **
|
||||||
open CommonScand, ResSwe, ParamX, VerbSwe, Prelude, DiffSwe, StructuralSwe, MorphoSwe,
|
open CommonScand, ResSwe, ParamX, VerbSwe, Prelude, DiffSwe, StructuralSwe, MorphoSwe,
|
||||||
NounSwe, Coordination, AdjectiveSwe, SentenceSwe, RelativeSwe in {
|
NounSwe, Coordination, AdjectiveSwe, SentenceSwe, AdverbSwe, RelativeSwe in {
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
ReflNP = NP ;
|
ReflNP = NP ;
|
||||||
@@ -30,8 +30,11 @@ lin
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
--TODO: fix this; just wrote something that it compiles and doesn't give [PassVPSlash] when parsing text
|
--TODO: fix this; just wrote something that it compiles and doesn't give [PassVPSlash] when parsing text
|
||||||
|
--looks OK now AR 5/12/2013
|
||||||
PassVPSlash vps =
|
PassVPSlash vps =
|
||||||
insertObj (\\a => vps.c2.s ++ vps.n3 ! a) (passiveVP vps) ;
|
insertObj (\\a => vps.c2.s ++ vps.n3 ! a) (passiveVP vps) ;
|
||||||
|
PassAgentVPSlash vps np =
|
||||||
|
insertObjPost (\\a => vps.c2.s ++ vps.n3 ! a) (insertObj (\\_ => (PrepNP by8agent_Prep np).s) (passiveVP vps)) ;
|
||||||
|
|
||||||
|
|
||||||
RelVS s rvs = {s = \\o => s.s ! o ++ comma ++ rvs.s ! agrP3 Neutr Sg ! RPrep True} ;
|
RelVS s rvs = {s = \\o => s.s ! o ++ comma ++ rvs.s ! agrP3 Neutr Sg ! RPrep True} ;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ lin
|
|||||||
beautiful_A = mk3A "vacker" "vackert" "vackra" ;
|
beautiful_A = mk3A "vacker" "vackert" "vackra" ;
|
||||||
become_VA = mkVA (mkV "bli" "blir""bli" "blev" "blivit" "bliven" "blivande") ;
|
become_VA = mkVA (mkV "bli" "blir""bli" "blev" "blivit" "bliven" "blivande") ;
|
||||||
beer_N = regGenN "öl" neutrum ;
|
beer_N = regGenN "öl" neutrum ;
|
||||||
beg_V2V = mkV2V (mkV "be" "ber""be" "bad" "bett" "bedd") noPrep (mkPrep "att") ;
|
beg_V2V = mkV2V (mkV "be" "ber""be" "bad" "bett" "bedd") ;
|
||||||
big_A = irregA "stor" "större" "störst";
|
big_A = irregA "stor" "större" "störst";
|
||||||
bike_N = mk2N "cykel" "cyklar" ;
|
bike_N = mk2N "cykel" "cyklar" ;
|
||||||
bird_N = mk2N "fågel" "fåglar" ;
|
bird_N = mk2N "fågel" "fåglar" ;
|
||||||
|
|||||||
Reference in New Issue
Block a user