forked from GitHub/gf-rgl
@@ -3,33 +3,44 @@
|
|||||||
concrete ExtendPor of Extend =
|
concrete ExtendPor of Extend =
|
||||||
CatPor ** ExtendFunctor -
|
CatPor ** ExtendFunctor -
|
||||||
[
|
[
|
||||||
|
ApposNP,
|
||||||
BaseVPS,
|
BaseVPS,
|
||||||
|
ByVP,
|
||||||
|
CompBareCN,
|
||||||
|
ComplBareVS,
|
||||||
CompoundAP,
|
CompoundAP,
|
||||||
CompoundN,
|
CompoundN,
|
||||||
ConsVPS,
|
ConsVPS,
|
||||||
|
--EmptyRelSlash,
|
||||||
ExistsNP,
|
ExistsNP,
|
||||||
GenIP,
|
GenIP,
|
||||||
GenModIP,
|
GenModIP,
|
||||||
GenModNP,
|
GenModNP,
|
||||||
GenNP,
|
GenNP,
|
||||||
|
GerundAdv,
|
||||||
GerundCN,
|
GerundCN,
|
||||||
|
GerundNP,
|
||||||
IAdvAdv,
|
IAdvAdv,
|
||||||
ICompAP,
|
ICompAP,
|
||||||
iFem_Pron,
|
InOrderToVP,
|
||||||
ListVPS,
|
ListVPS,
|
||||||
PassVPSlash,
|
|
||||||
PassAgentVPSlash,
|
PassAgentVPSlash,
|
||||||
|
PassVPSlash,
|
||||||
PastPartAP,
|
PastPartAP,
|
||||||
PastPartAgentAP,
|
PastPartAgentAP,
|
||||||
|
PresPartAP,
|
||||||
ProDrop,
|
ProDrop,
|
||||||
theyFem_Pron,
|
PurposeVP,
|
||||||
VPS,
|
VPS,
|
||||||
|
iFem_Pron,
|
||||||
|
theyFem_Pron,
|
||||||
weFem_Pron,
|
weFem_Pron,
|
||||||
|
WithoutVP,
|
||||||
youFem_Pron,
|
youFem_Pron,
|
||||||
youPlFem_Pron,
|
youPlFem_Pron,
|
||||||
youPolFem_Pron,
|
youPolFem_Pron,
|
||||||
youPolPl_Pron,
|
youPolPlFem_Pron,
|
||||||
youPolPlFem_Pron
|
youPolPl_Pron
|
||||||
] -- don't forget to put the names of your own
|
] -- don't forget to put the names of your own
|
||||||
-- definitions here
|
-- definitions here
|
||||||
with
|
with
|
||||||
@@ -55,8 +66,19 @@ concrete ExtendPor of Extend =
|
|||||||
GenIP ip = {s = \\_,_,c => ip.s ! c} ;
|
GenIP ip = {s = \\_,_,c => ip.s ! c} ;
|
||||||
|
|
||||||
GenModNP num np cn = DetCN (DetQuant (GenNP (lin NP np)) num) cn ;
|
GenModNP num np cn = DetCN (DetQuant (GenNP (lin NP np)) num) cn ;
|
||||||
|
|
||||||
GenModIP num ip cn = IdetCN (IdetQuant (GenIP (lin IP ip)) num) cn ;
|
GenModIP num ip cn = IdetCN (IdetQuant (GenIP (lin IP ip)) num) cn ;
|
||||||
|
|
||||||
|
CompBareCN cn = {
|
||||||
|
s = \\agr => cn.s ! agr.n ;
|
||||||
|
cop = serCopula
|
||||||
|
} ;
|
||||||
|
|
||||||
|
EmptyRelSlash cls = {
|
||||||
|
s = \\agr,t,a,p,m => cls.s ! agr ! DDir ! t ! a ! p ! m ++ cls.c2.s ;
|
||||||
|
c = Nom
|
||||||
|
} ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
VPS = {s : Agr => Mood => Str} ;
|
VPS = {s : Agr => Mood => Str} ;
|
||||||
[VPS] = {s1,s2 : Agr => Mood => Str} ;
|
[VPS] = {s1,s2 : Agr => Mood => Str} ;
|
||||||
@@ -96,18 +118,15 @@ concrete ExtendPor of Extend =
|
|||||||
PrepCN prep cn = {s = prep.s ++ prepCase prep.c ++ cn.s ! Sg} ;
|
PrepCN prep cn = {s = prep.s ++ prepCase prep.c ++ cn.s ! Sg} ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
|
PresPartAP vp = {
|
||||||
|
s = \\af => gerVP vp (aform2aagr af ** {p = P3}) ;
|
||||||
|
isPre = False
|
||||||
|
} ;
|
||||||
|
|
||||||
PastPartAP vps = pastPartAP vps [] ;
|
PastPartAP vps = pastPartAP vps [] ;
|
||||||
|
|
||||||
PastPartAgentAP vps np = pastPartAP vps (let by = <Grammar.by8agent_Prep : Prep> in by.s ++ (np.s ! by.c).ton) ;
|
PastPartAgentAP vps np = pastPartAP vps (let by = <Grammar.by8agent_Prep : Prep> in by.s ++ (np.s ! by.c).ton) ;
|
||||||
|
|
||||||
oper
|
|
||||||
pastPartAP : VPSlash -> Str -> AP ;
|
|
||||||
pastPartAP vps agent = lin AP {
|
|
||||||
s = \\af => vps.comp ! (aform2aagr af ** {p = P3}) ++ vps.s.s ! VPart (aform2gender af) (aform2number af) ++ agent ;
|
|
||||||
isPre = False
|
|
||||||
} ;
|
|
||||||
|
|
||||||
lin
|
|
||||||
PassVPSlash vps = 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) ;
|
PassAgentVPSlash vps np = passVPSlash vps (let by = <Grammar.by8agent_Prep : Prep> in by.s ++ (np.s ! by.c).ton) ;
|
||||||
@@ -117,9 +136,22 @@ concrete ExtendPor of Extend =
|
|||||||
(insertComplement (\\_ => (np.s ! Nom).ton)
|
(insertComplement (\\_ => (np.s ! Nom).ton)
|
||||||
(predV (mkV "existir"))) ;
|
(predV (mkV "existir"))) ;
|
||||||
|
|
||||||
|
PurposeVP vp = {
|
||||||
|
s = infVP vp (Ag Masc Sg P3)
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ComplBareVS = ComplVS ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
passVPSlash : VPSlash -> Str -> VP = \vps, agent ->
|
pastPartAP : VPSlash -> Str -> AP ;
|
||||||
let auxvp = predV auxPassive
|
pastPartAP vps agent = lin AP {
|
||||||
|
s = \\af => vps.comp ! (aform2aagr af ** {p = P3}) ++ vps.s.s ! VPart (aform2gender af) (aform2number af) ++ agent ;
|
||||||
|
isPre = False
|
||||||
|
} ;
|
||||||
|
|
||||||
|
passVPSlash : VPSlash -> Str -> VP ;
|
||||||
|
passVPSlash vps agent = let
|
||||||
|
auxvp = predV auxPassive
|
||||||
in
|
in
|
||||||
vps ** {
|
vps ** {
|
||||||
s = auxvp.s ;
|
s = auxvp.s ;
|
||||||
@@ -149,6 +181,42 @@ concrete ExtendPor of Extend =
|
|||||||
g = Masc
|
g = Masc
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
GerundNP vp = let
|
||||||
|
neutrAgr = Ag Masc Sg P3
|
||||||
|
in heavyNP {
|
||||||
|
s = \\_ => gerVP vp neutrAgr ;
|
||||||
|
a = neutrAgr
|
||||||
|
} ;
|
||||||
|
|
||||||
|
GerundAdv vp = {
|
||||||
|
s = gerundStr vp
|
||||||
|
} ;
|
||||||
|
|
||||||
|
WithoutVP vp = {
|
||||||
|
s = "sem" ++ gerundStr vp
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ByVP vp = {
|
||||||
|
s = "by" ++ gerundStr vp
|
||||||
|
} ;
|
||||||
|
|
||||||
|
InOrderToVP vp = {
|
||||||
|
s = "a fim de" ++ gerundStr vp
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ApposNP np1 np2 = np1 ** {
|
||||||
|
s = \\c => {
|
||||||
|
c1 = (np1.s ! c).c1 ++ (np2.s ! c).c1 ;
|
||||||
|
c2 = (np1.s ! c).c2 ++ (np2.s ! c).c2 ;
|
||||||
|
comp = (np1.s ! c).comp ++ (np2.s ! c).comp ;
|
||||||
|
ton = (np1.s ! c).ton ++ (np2.s ! c).ton
|
||||||
|
} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
gerundStr : VP -> Str ;
|
||||||
|
gerundStr vp = gerVP vp (Ag Masc Sg P3) ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
-- Romance
|
-- Romance
|
||||||
iFem_Pron = pronAgr S.i_Pron Fem Sg P1 ;
|
iFem_Pron = pronAgr S.i_Pron Fem Sg P1 ;
|
||||||
|
|||||||
Reference in New Issue
Block a user