forked from GitHub/gf-rgl
Merge branch 'master' of github.com:GrammaticalFramework/gf-rgl
This commit is contained in:
@@ -5,7 +5,7 @@ concrete ExtendFin of Extend =
|
|||||||
VPI2,VPS2,MkVPS,MkVPS2,ConjVPS2,ComplVPS2, ConsVPS, BaseVPS, ListVPS, VPS, ConjVPS,PredVPS,
|
VPI2,VPS2,MkVPS,MkVPS2,ConjVPS2,ComplVPS2, ConsVPS, BaseVPS, ListVPS, VPS, ConjVPS,PredVPS,
|
||||||
MkVPI2,ConjVPI2,ComplVPI2,ComplVPIVV
|
MkVPI2,ConjVPI2,ComplVPI2,ComplVPIVV
|
||||||
,ExistCN, ExistMassCN, ICompAP, ByVP
|
,ExistCN, ExistMassCN, ICompAP, ByVP
|
||||||
,CompoundN, GenNP, GenIP, AdvIsNP, EmbedSSlash
|
,CompoundN, GenNP, GenIP, GenRP, AdvIsNP, EmbedSSlash
|
||||||
,PassVPSlash, PassAgentVPSlash
|
,PassVPSlash, PassAgentVPSlash
|
||||||
,CardCNCard
|
,CardCNCard
|
||||||
,UttAccNP
|
,UttAccNP
|
||||||
@@ -191,6 +191,15 @@ lin
|
|||||||
|
|
||||||
GenIP ip = {s = \\_,_ => ip.s ! NPCase Gen} ;
|
GenIP ip = {s = \\_,_ => ip.s ! NPCase Gen} ;
|
||||||
|
|
||||||
|
GenRP num cn = {
|
||||||
|
s = \\n,c =>
|
||||||
|
let k = npform2case num.n c
|
||||||
|
in relPron ! n ! Gen ++ linCN (NCase num.n k) cn ;
|
||||||
|
--- a = RNoAg
|
||||||
|
a = RAg (agrP3 num.n)
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
ByVP vp = lin Adv {s = S.infVP vp.s.sc Pos (Ag Sg P3) vp Inf3Adess} ; ---- Agr ?
|
ByVP vp = lin Adv {s = S.infVP vp.s.sc Pos (Ag Sg P3) vp Inf3Adess} ; ---- Agr ?
|
||||||
|
|
||||||
AdvIsNP adv np = S.mkClause (\_ -> adv.s) np.a (UseComp (CompNP np)) ;
|
AdvIsNP adv np = S.mkClause (\_ -> adv.s) np.a (UseComp (CompNP np)) ;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ concrete ExtendFre of Extend =
|
|||||||
CatFre ** ExtendFunctor -
|
CatFre ** ExtendFunctor -
|
||||||
[
|
[
|
||||||
---- iFem_Pron, youFem_Pron, weFem_Pron, youPlFem_Pron, theyFem_Pron, youPolFem_Pron, youPolPl_Pron, youPolPlFem_Pron,
|
---- iFem_Pron, youFem_Pron, weFem_Pron, youPlFem_Pron, theyFem_Pron, youPolFem_Pron, youPolPl_Pron, youPolPlFem_Pron,
|
||||||
|
GenRP,
|
||||||
ExistCN, ExistMassCN, ExistPluralCN, RNP, ReflRNP,
|
ExistCN, ExistMassCN, ExistPluralCN, RNP, ReflRNP,
|
||||||
PassVPSlash, PassAgentVPSlash, ApposNP, CompoundN
|
PassVPSlash, PassAgentVPSlash, ApposNP, CompoundN
|
||||||
] -- put the names of your own definitions here
|
] -- put the names of your own definitions here
|
||||||
@@ -23,6 +24,16 @@ lincat
|
|||||||
RNP = {s : Agr => Case => Str} ;
|
RNP = {s : Agr => Case => Str} ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
|
GenRP nu cn = {
|
||||||
|
s = \\_b,_aagr,_c => "dont" ++ num ++ artDef False g n Nom ++ cn.s ! n ;
|
||||||
|
a = aagr g n ;
|
||||||
|
hasAgr = True
|
||||||
|
} where {
|
||||||
|
g = cn.g ;
|
||||||
|
n = nu.n ;
|
||||||
|
num = if_then_Str nu.isNum (nu.s ! g) []
|
||||||
|
} ;
|
||||||
|
|
||||||
ExistCN cn =
|
ExistCN cn =
|
||||||
let
|
let
|
||||||
pos = ExistNP (DetCN (DetQuant IndefArt NumSg) cn) ;
|
pos = ExistNP (DetCN (DetQuant IndefArt NumSg) cn) ;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ concrete AdverbGer of Adverb = CatGer ** open ResGer, Prelude in {
|
|||||||
|
|
||||||
PositAdAAdj a = {s = a.s ! Posit ! APred} ;
|
PositAdAAdj a = {s = a.s ! Posit ! APred} ;
|
||||||
|
|
||||||
SubjS subj s = {s = subj.s ++ s.s ! Sub} ;
|
SubjS subj s = {s = {- Predef.BIND ++ "," ++ -} subj.s ++ s.s ! Sub} ; --- comma needed in some uses
|
||||||
|
|
||||||
AdnCAdv cadv = {s = cadv.s ++ conjThan} ;
|
AdnCAdv cadv = {s = cadv.s ++ conjThan} ;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
concrete ExtendGer of Extend =
|
concrete ExtendGer of Extend =
|
||||||
CatGer ** ExtendFunctor
|
CatGer ** ExtendFunctor
|
||||||
- [ -- remove the default implementations of:
|
- [ -- remove the default implementations of:
|
||||||
GenNP, EmptyRelSlash,
|
GenNP, GenRP, EmptyRelSlash,
|
||||||
VPS, ListVPS, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS,
|
VPS, ListVPS, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS,
|
||||||
VPI, ListVPI, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
|
VPI, ListVPI, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
|
||||||
ICompAP, IAdvAdv, CompIQuant, PrepCN,
|
ICompAP, IAdvAdv, CompIQuant, PrepCN,
|
||||||
@@ -36,6 +36,13 @@ concrete ExtendGer of Extend =
|
|||||||
delCardOne = False
|
delCardOne = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
GenRP nu cn = {
|
||||||
|
s = \\gn,c => relPron ! gn ! Gen ++ cn.s ! Weak ! nu.n ! c ;
|
||||||
|
a = RAg nu.n P3
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
EmptyRelSlash slash = {
|
EmptyRelSlash slash = {
|
||||||
s = \\m,t,a,p,gn =>
|
s = \\m,t,a,p,gn =>
|
||||||
appPrep slash.c2 (relPron ! gn) ++ slash.s ! m ! t ! a ! p ! Sub ;
|
appPrep slash.c2 (relPron ! gn) ++ slash.s ! m ! t ! a ! p ! Sub ;
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ concrete RelativeGer of Relative = CatGer ** open ResGer, Prelude in {
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
|
|
||||||
RelCl cl = {
|
RelCl cl = { --- no comma before derart
|
||||||
s = \\m,t,a,b,_ => "derart" ++ conjThat ++ cl.s ! m ! t ! a ! b ! Sub ;
|
s = \\m,t,a,b,_ => "derart" ++ Predef.BIND ++ "," ++ conjThat ++ cl.s ! m ! t ! a ! b ! Sub ;
|
||||||
c = Nom
|
c = Nom
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
--# -path=alltenses:../common:../abstract:../romance
|
--# -path=alltenses:../common:../abstract:../romance
|
||||||
concrete ExtendIta of Extend = CatIta ** ExtendRomanceFunctor -
|
concrete ExtendIta of Extend = CatIta ** ExtendRomanceFunctor -
|
||||||
[
|
[
|
||||||
|
GenRP,
|
||||||
PassVPSlash, PassAgentVPSlash
|
PassVPSlash, PassAgentVPSlash
|
||||||
]
|
]
|
||||||
-- don't forget to put the names of your own
|
-- don't forget to put the names of your own
|
||||||
@@ -16,6 +17,19 @@ concrete ExtendIta of Extend = CatIta ** ExtendRomanceFunctor -
|
|||||||
ParadigmsIta in {
|
ParadigmsIta in {
|
||||||
-- put your own definitions here
|
-- put your own definitions here
|
||||||
|
|
||||||
|
lin
|
||||||
|
GenRP nu cn = {
|
||||||
|
s = \\_b,_aagr,_c => "di cui" ++ num ++ cn.s ! n ;
|
||||||
|
a = aagr g n ;
|
||||||
|
hasAgr = True
|
||||||
|
} where {
|
||||||
|
g = cn.g ;
|
||||||
|
n = nu.n ;
|
||||||
|
num = if_then_Str nu.isNum (nu.s ! g) []
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
lin PassVPSlash vps = passVPSlash vps [] ;
|
lin PassVPSlash vps = passVPSlash vps [] ;
|
||||||
PassAgentVPSlash vps np = passVPSlash
|
PassAgentVPSlash vps np = passVPSlash
|
||||||
|
|||||||
@@ -37,19 +37,9 @@ lincat
|
|||||||
CN = ResRus.Noun ;
|
CN = ResRus.Noun ;
|
||||||
|
|
||||||
NP = ResRus.NounPhrase ;
|
NP = ResRus.NounPhrase ;
|
||||||
VP = {
|
VP = ResRus.VP ;
|
||||||
adv : AgrTable ; -- modals are in position of adverbials ones numgen gets fixed
|
|
||||||
verb : ResRus.VerbForms ;
|
VPSlash = ResRus.VPSlash ;
|
||||||
dep : Str ; -- dependent infinitives and such
|
|
||||||
compl : ComplTable
|
|
||||||
} ;
|
|
||||||
VPSlash = {
|
|
||||||
adv : AgrTable ; -- modals are in position of adverbials ones numgen gets fixed
|
|
||||||
verb : ResRus.VerbForms ;
|
|
||||||
dep : Str ; -- dependent infinitives and such
|
|
||||||
compl : ComplTable ;
|
|
||||||
c : ComplementCase
|
|
||||||
} ; ----
|
|
||||||
|
|
||||||
AP = ResRus.Adjective ** {isPost : Bool} ;
|
AP = ResRus.Adjective ** {isPost : Bool} ;
|
||||||
|
|
||||||
@@ -142,7 +132,13 @@ linref
|
|||||||
VP = \s -> s.adv ! Ag (GSg Neut) P3 ++ (verbInf s.verb) ++ s.dep ++ s.compl ! Pos ! Ag (GSg Neut) P3 ;
|
VP = \s -> s.adv ! Ag (GSg Neut) P3 ++ (verbInf s.verb) ++ s.dep ++ s.compl ! Pos ! Ag (GSg Neut) P3 ;
|
||||||
Comp = \s -> copula.inf ++ s.s ! Ag (GSg Neut) P3 ++ s.adv ;
|
Comp = \s -> copula.inf ++ s.s ! Ag (GSg Neut) P3 ++ s.adv ;
|
||||||
IComp = \s -> s.s ! Ag (GSg Neut) P3 ++ s.adv ++ copula.inf;
|
IComp = \s -> s.s ! Ag (GSg Neut) P3 ++ s.adv ++ copula.inf;
|
||||||
VPSlash = \s -> s.adv ! Ag (GSg Neut) P3 ++ (verbInf s.verb) ++ s.dep ++ s.compl ! Pos ! Ag (GSg Neut) P3 ++ s.c.s ;
|
VPSlash = \s -> let vp : VP
|
||||||
|
= {verb = s.verb ;
|
||||||
|
adv = s.adv ;
|
||||||
|
dep = s.dep ;
|
||||||
|
compl = \\p, a => s.compl1 ! p ! a ++ s.c.s ++ s.compl2 ! p ! a
|
||||||
|
}
|
||||||
|
in vp.adv ! Ag (GSg Neut) P3 ++ (verbInf vp.verb) ++ vp.dep ++ vp.compl ! Pos ! Ag (GSg Neut) P3 ;
|
||||||
Cl = \s -> s.subj ++ s.adv ++ (verbInf s.verb) ++ s.dep ++ s.compl ! Pos ;
|
Cl = \s -> s.subj ++ s.adv ++ (verbInf s.verb) ++ s.dep ++ s.compl ! Pos ;
|
||||||
ClSlash = \s -> s.subj ++ s.adv ++ (verbInf s.verb) ++ s.dep ++ s.compl ! Pos ;
|
ClSlash = \s -> s.subj ++ s.adv ++ (verbInf s.verb) ++ s.dep ++ s.compl ! Pos ;
|
||||||
QCl = \s -> s.subj ++ s.adv ++ (verbInf s.verb) ++ s.dep ++ s.compl ! Pos ;
|
QCl = \s -> s.subj ++ s.adv ++ (verbInf s.verb) ++ s.dep ++ s.compl ! Pos ;
|
||||||
|
|||||||
@@ -145,12 +145,14 @@ lin
|
|||||||
vps.adv ! (genNumAgrP3 gn)
|
vps.adv ! (genNumAgrP3 gn)
|
||||||
++ shortPastPassPart vps.verb gn
|
++ shortPastPassPart vps.verb gn
|
||||||
++ vps.dep
|
++ vps.dep
|
||||||
++ vps.compl ! Pos ! (genNumAgrP3 gn) ;
|
++ vps.compl1 ! Pos ! (genNumAgrP3 gn)
|
||||||
|
++ vps.compl2 ! Pos ! (genNumAgrP3 gn);
|
||||||
short=\\a =>
|
short=\\a =>
|
||||||
vps.adv ! a
|
vps.adv ! a
|
||||||
++ shortPastPassPart vps.verb (agrGenNum a)
|
++ shortPastPassPart vps.verb (agrGenNum a)
|
||||||
++ vps.dep
|
++ vps.dep
|
||||||
++ vps.compl ! Pos ! a
|
++ vps.compl1 ! Pos ! a
|
||||||
|
++ vps.compl2 ! Pos ! a
|
||||||
++ vps.c.s ; --
|
++ vps.c.s ; --
|
||||||
isPost = False ;
|
isPost = False ;
|
||||||
preferShort=PreferFull
|
preferShort=PreferFull
|
||||||
@@ -163,13 +165,15 @@ lin
|
|||||||
++ shortPastPassPart vps.verb gn
|
++ shortPastPassPart vps.verb gn
|
||||||
++ vps.dep
|
++ vps.dep
|
||||||
++ applyPolPrep Pos vps.c np
|
++ applyPolPrep Pos vps.c np
|
||||||
++ vps.compl ! Pos ! (genNumAgrP3 gn) ;
|
++ vps.compl1 ! Pos ! (genNumAgrP3 gn)
|
||||||
|
++ vps.compl2 ! Pos ! (genNumAgrP3 gn);
|
||||||
short=\\a =>
|
short=\\a =>
|
||||||
vps.adv ! a
|
vps.adv ! a
|
||||||
++ shortPastPassPart vps.verb (agrGenNum a)
|
++ shortPastPassPart vps.verb (agrGenNum a)
|
||||||
++ vps.dep
|
++ vps.dep
|
||||||
++ applyPolPrep Pos vps.c np
|
++ applyPolPrep Pos vps.c np
|
||||||
++ vps.compl ! Pos ! a ;
|
++ vps.compl1 ! Pos ! a
|
||||||
|
++ vps.compl2 ! Pos ! a ;
|
||||||
isPost = False ;
|
isPost = False ;
|
||||||
preferShort=PreferFull
|
preferShort=PreferFull
|
||||||
} ;
|
} ;
|
||||||
@@ -178,10 +182,11 @@ lin
|
|||||||
PassVPSlash vps = case vps.verb.asp of {
|
PassVPSlash vps = case vps.verb.asp of {
|
||||||
Perfective => vps ** {
|
Perfective => vps ** {
|
||||||
verb=copulaEll ;
|
verb=copulaEll ;
|
||||||
compl=\\p,a => shortPastPassPart vps.verb (agrGenNum a) ++ vps.compl ! p ! a ++ vps.c.s
|
compl=\\p,a => shortPastPassPart vps.verb (agrGenNum a) ++ vps.compl1 ! p ! a ++ vps.compl2 ! p ! a ++ vps.c.s
|
||||||
} ;
|
} ;
|
||||||
Imperfective => vps ** {
|
Imperfective => vps ** {
|
||||||
verb=(passivate vps.verb);
|
verb=(passivate vps.verb);
|
||||||
|
compl=\\p,a => shortPastPassPart vps.verb (agrGenNum a) ++ vps.compl1 ! p ! a ++ vps.compl2 ! p ! a ++ vps.c.s
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -192,11 +197,11 @@ lin
|
|||||||
PassAgentVPSlash vps np = case vps.verb.asp of {
|
PassAgentVPSlash vps np = case vps.verb.asp of {
|
||||||
Perfective => vps ** {
|
Perfective => vps ** {
|
||||||
verb=copulaEll ;
|
verb=copulaEll ;
|
||||||
compl=\\p,a => shortPastPassPart vps.verb (agrGenNum a) ++ vps.c.s ++ vps.compl ! p ! a ++ np.s ! Ins
|
compl=\\p,a => shortPastPassPart vps.verb (agrGenNum a) ++ vps.c.s ++ vps.compl1 ! p ! a ++ vps.compl2 ! p ! a ++ np.s ! Ins
|
||||||
} ;
|
} ;
|
||||||
Imperfective => vps ** {
|
Imperfective => vps ** {
|
||||||
verb=(passivate vps.verb);
|
verb=(passivate vps.verb);
|
||||||
compl=\\p,a => vps.compl ! p ! a ++ np.s ! Ins
|
compl=\\p,a => vps.compl1 ! p ! a ++ vps.compl2 ! p ! a ++ np.s ! Ins
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -144,7 +144,8 @@ lin
|
|||||||
++ verbRefl vps.verb
|
++ verbRefl vps.verb
|
||||||
++ case temp.t of {Cond => "бы" ; _ => []}
|
++ case temp.t of {Cond => "бы" ; _ => []}
|
||||||
++ vps.dep
|
++ vps.dep
|
||||||
++ vps.compl ! pol.p ! Ag (GSg Neut) P3
|
++ vps.compl1 ! pol.p ! Ag (GSg Neut) P3
|
||||||
|
++ vps.compl2 ! pol.p ! Ag (GSg Neut) P3
|
||||||
++ vps.c.s
|
++ vps.c.s
|
||||||
)
|
)
|
||||||
} ;
|
} ;
|
||||||
@@ -157,7 +158,8 @@ lin
|
|||||||
++ verbRefl vps.verb
|
++ verbRefl vps.verb
|
||||||
++ case temp.t of {Cond => "бы" ; _ => []}
|
++ case temp.t of {Cond => "бы" ; _ => []}
|
||||||
++ vps.dep
|
++ vps.dep
|
||||||
++ vps.compl ! pol.p ! Ag (GSg Neut) P3
|
++ vps.compl1 ! pol.p ! Ag (GSg Neut) P3
|
||||||
|
++ vps.compl2 ! pol.p ! Ag (GSg Neut) P3
|
||||||
++ vps.c.s
|
++ vps.c.s
|
||||||
++ endComma
|
++ endComma
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -599,6 +599,70 @@ oper
|
|||||||
-- we can store the sya-schema and 'BIND++' as necessary.
|
-- we can store the sya-schema and 'BIND++' as necessary.
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
VP : Type = {
|
||||||
|
adv : AgrTable ; -- modals are in position of adverbials ones numgen gets fixed
|
||||||
|
verb : ResRus.VerbForms ;
|
||||||
|
dep : Str ; -- dependent infinitives and such
|
||||||
|
compl : ComplTable
|
||||||
|
} ;
|
||||||
|
|
||||||
|
VPSlash = {
|
||||||
|
adv : AgrTable ; -- modals are in position of adverbials ones numgen gets fixed
|
||||||
|
verb : VerbForms ;
|
||||||
|
dep : Str ; -- dependent infinitives and such
|
||||||
|
compl1 : ComplTable ;
|
||||||
|
compl2 : ComplTable ;
|
||||||
|
c : ComplementCase ;
|
||||||
|
} ; ----
|
||||||
|
|
||||||
|
slashV : VerbForms -> ComplementCase -> VPSlash = \verb,c -> {
|
||||||
|
verb = verb ;
|
||||||
|
adv = \\a => [];
|
||||||
|
compl1 = \\_,a => [] ;
|
||||||
|
compl2 = \\_,a => [] ;
|
||||||
|
dep = [] ;
|
||||||
|
c = c ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
insertSlashObjA : Adjective -> ComplementCase -> VPSlash -> VPSlash = \ap,c,slash -> {
|
||||||
|
verb = slash.verb ;
|
||||||
|
adv = slash.adv ;
|
||||||
|
compl1 = slash.compl1 ;
|
||||||
|
compl2 = \\p,a => case p of {
|
||||||
|
Pos => case ap.preferShort of {
|
||||||
|
PreferFull => slash.compl2 ! p ! a ++ ap.s ! agrGenNum a ! Animate ! slash.c.c ;
|
||||||
|
PrefShort => slash.compl2 ! p ! a ++ ap.short ! a
|
||||||
|
} ;
|
||||||
|
Neg => case ap.preferShort of {
|
||||||
|
PreferFull => case neggen slash.c of {
|
||||||
|
False => slash.compl2 ! p ! a ++ ap.s ! agrGenNum a ! Animate ! slash.c.c ;
|
||||||
|
True => slash.compl2 ! p ! a ++ ap.s ! agrGenNum a ! Animate ! Gen
|
||||||
|
} ;
|
||||||
|
PrefShort => slash.compl2 ! p ! a ++ ap.short ! a
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
c = {s="" ; c=Acc ; neggen=True ; hasPrep=False};
|
||||||
|
dep = slash.dep ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
insertSlashObj1 : (Polarity => Agr => Str) -> ComplementCase -> VPSlash -> VPSlash = \obj,c,slash -> {
|
||||||
|
verb = slash.verb ;
|
||||||
|
adv = slash.adv;
|
||||||
|
compl1 =\\p,a => slash.compl1 ! p ! a ++ obj ! p ! a;
|
||||||
|
compl2 = slash.compl2 ;
|
||||||
|
c = slash.c ;
|
||||||
|
dep = slash.dep ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
insertSlashObj2 : (Polarity => Agr => Str) -> ComplementCase -> VPSlash -> VPSlash = \obj,c,slash -> {
|
||||||
|
verb = slash.verb ;
|
||||||
|
adv = slash.adv;
|
||||||
|
compl1 = slash.compl1 ;
|
||||||
|
compl2 =\\p,a => slash.compl2 ! p ! a ++ obj ! p ! a;
|
||||||
|
c = slash.c ;
|
||||||
|
dep = slash.dep ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
guessVerbForms : Aspect -> Transitivity -> Str -> Str -> Str -> VerbForms
|
guessVerbForms : Aspect -> Transitivity -> Str -> Str -> Str -> VerbForms
|
||||||
= \asp,tran,inf,sg1,sg3 ->
|
= \asp,tran,inf,sg1,sg3 ->
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ lin
|
|||||||
adv=vps.adv ! np.a ; -- ??
|
adv=vps.adv ! np.a ; -- ??
|
||||||
verb=vps.verb ;
|
verb=vps.verb ;
|
||||||
dep=vps.dep ;
|
dep=vps.dep ;
|
||||||
compl=\\p => vps.compl ! p ! np.a ; -- ??
|
compl=\\p => vps.compl1 ! p ! np.a ++ vps.compl2 ! p ! np.a; -- ??
|
||||||
a=np.a ;
|
a=np.a ;
|
||||||
c=vps.c
|
c=vps.c
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -53,81 +53,39 @@ lin
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : V2 -> VPSlash ; -- love (it)
|
-- : V2 -> VPSlash ; -- love (it)
|
||||||
SlashV2a v2 = {
|
SlashV2a v2 = slashV v2 v2.c ;
|
||||||
adv=\\a=>[] ;
|
|
||||||
verb=v2 ;
|
|
||||||
dep=[] ;
|
|
||||||
compl=\\_,_ => [] ;
|
|
||||||
c=v2.c
|
|
||||||
} ;
|
|
||||||
|
|
||||||
-- : V3 -> NP -> VPSlash ; -- give it (to her)
|
-- : V3 -> NP -> VPSlash ; -- give it (to her)
|
||||||
Slash2V3 v3 np = {
|
Slash2V3 v3 np = insertSlashObj1 (\\p,_ => applyPolPrep p v3.c np) v3.c (slashV v3 v3.c) ;
|
||||||
adv=\\a=>[] ;
|
|
||||||
verb=v3 ;
|
|
||||||
dep=[] ;
|
|
||||||
compl=\\p,a => applyPolPrep p v3.c np ;
|
|
||||||
c=v3.c2
|
|
||||||
} ;
|
|
||||||
|
|
||||||
-- : V3 -> NP -> VPSlash ; -- give (it) to her
|
-- : V3 -> NP -> VPSlash ; -- give (it) to her
|
||||||
Slash3V3 v3 np = {
|
Slash3V3 v3 np = insertSlashObj2 (\\p,_ => applyPolPrep p v3.c2 np) v3.c2 (slashV v3 v3.c2) ;
|
||||||
adv=\\a=>[] ;
|
|
||||||
verb=v3 ;
|
|
||||||
dep=[] ;
|
|
||||||
compl=\\p,a => applyPolPrep p v3.c2 np ;
|
|
||||||
c=v3.c
|
|
||||||
} ;
|
|
||||||
|
|
||||||
-- : V2V -> VP -> VPSlash ; -- beg (her) to go
|
-- : V2V -> VP -> VPSlash ; -- beg (her) to go
|
||||||
SlashV2V v2v vp = vp ** {
|
SlashV2V v2v vp = insertSlashObj2 (\\_,a => verbInf vp.verb) v2v.c (slashV v2v v2v.c) ;
|
||||||
verb=v2v ;
|
|
||||||
dep=verbInf vp.verb ;
|
|
||||||
c=v2v.c
|
|
||||||
} ;
|
|
||||||
|
|
||||||
-- : V2S -> S -> VPSlash ; -- answer (to him) that it is good
|
-- : V2S -> S -> VPSlash ; -- answer (to him) that it is good
|
||||||
SlashV2S v2s s = {
|
SlashV2S v2s s = insertSlashObj2 (\\_,a=> embedInCommas ("что" ++ s.s ! Ind)) v2s.c (slashV v2s v2s.c) ;
|
||||||
adv=\\a=>[] ;
|
|
||||||
verb=v2s ;
|
|
||||||
dep=[] ;
|
|
||||||
compl=\\_,a=> embedInCommas ("что" ++ s.s ! Ind) ;
|
|
||||||
c=v2s.c
|
|
||||||
} ;
|
|
||||||
-- : V2Q -> QS -> VPSlash ; -- ask (him) who came
|
-- : V2Q -> QS -> VPSlash ; -- ask (him) who came
|
||||||
SlashV2Q v2q qs = {
|
SlashV2Q v2q qs = insertSlashObj2 (\\_,_=> qs.s ! QDir) v2q.c (slashV v2q v2q.c);
|
||||||
adv=\\a=>[] ;
|
|
||||||
verb=v2q ;
|
|
||||||
dep=[] ;
|
|
||||||
compl=\\_,a=>qs.s ! QDir;
|
|
||||||
c=v2q.c
|
|
||||||
} ;
|
|
||||||
|
|
||||||
-- : V2A -> AP -> VPSlash ; -- paint (it) red
|
-- : V2A -> AP -> VPSlash ; -- paint (it) red
|
||||||
SlashV2A v2a ap = {
|
SlashV2A v2a ap = insertSlashObjA ap v2a.c (slashV v2a v2a.c) ;
|
||||||
adv=\\a=>[] ;
|
|
||||||
verb=v2a ;
|
|
||||||
dep=[] ;
|
|
||||||
compl=table {
|
|
||||||
Pos => case ap.preferShort of {
|
|
||||||
PreferFull => \\a => ap.s ! agrGenNum a ! Animate ! v2a.c.c ;
|
|
||||||
PrefShort => ap.short
|
|
||||||
} ;
|
|
||||||
Neg => case ap.preferShort of {
|
|
||||||
PreferFull => case neggen v2a.c of {
|
|
||||||
False => \\a => ap.s ! agrGenNum a ! Animate ! v2a.c.c ;
|
|
||||||
True => \\a => ap.s ! agrGenNum a ! Animate ! Gen
|
|
||||||
} ;
|
|
||||||
PrefShort => ap.short
|
|
||||||
}
|
|
||||||
} ;
|
|
||||||
c={s="" ; c=Acc ; neggen=True ; hasPrep=False}
|
|
||||||
} ;
|
|
||||||
|
|
||||||
-- : VPSlash -> NP -> VP ; -- love it
|
-- : VPSlash -> NP -> VP ; -- love it
|
||||||
ComplSlash vps np = vps ** {
|
ComplSlash vps np =
|
||||||
compl=\\p,a => applyPolPrep p vps.c np ++ vps.compl ! p ! a
|
let arg : {obj,acc,dat : Str}
|
||||||
} ;
|
= case vps.c.c of {
|
||||||
|
Dat => {obj=[]; acc=np.s ! Acc; dat=[] } ;
|
||||||
|
Acc => {obj=[]; acc=[]; dat=np.s ! Dat} ;
|
||||||
|
c => {obj=np.s ! c; acc=[]; dat=[] }
|
||||||
|
}
|
||||||
|
in {verb = vps.verb ;
|
||||||
|
adv = vps.adv ;
|
||||||
|
dep = vps.dep ;
|
||||||
|
compl = \\p,a => vps.compl1 ! p ! a ++ arg.acc ++ arg.dat ++ arg.obj ++ vps.compl2 ! p ! a ;
|
||||||
|
} ;
|
||||||
|
|
||||||
-- : VV -> VPSlash -> VPSlash ; -- want to buy
|
-- : VV -> VPSlash -> VPSlash ; -- want to buy
|
||||||
SlashVV vv vps = vps ** {
|
SlashVV vv vps = vps ** {
|
||||||
@@ -149,7 +107,7 @@ lin
|
|||||||
|
|
||||||
-- : VPSlash -> VP ; -- love himself
|
-- : VPSlash -> VP ; -- love himself
|
||||||
ReflVP vps = vps ** {
|
ReflVP vps = vps ** {
|
||||||
compl=\\p,a => vps.compl ! p ! a ++ vps.c.s ++ sebya.s ! vps.c.c
|
compl=\\p,a => vps.compl1 ! p ! a ++ vps.c.s ++ vps.compl2 ! p ! a ++ sebya.s ! vps.c.c
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : Comp -> VP ; -- be warm
|
-- : Comp -> VP ; -- be warm
|
||||||
@@ -180,7 +138,8 @@ lin
|
|||||||
AdVVPSlash adv vps = vps ** {adv=\\a=>adv.s ++ vps.adv ! a} ;
|
AdVVPSlash adv vps = vps ** {adv=\\a=>adv.s ++ vps.adv ! a} ;
|
||||||
|
|
||||||
-- : VP -> Prep -> VPSlash ; -- live in (it)
|
-- : VP -> Prep -> VPSlash ; -- live in (it)
|
||||||
VPSlashPrep vp prep = vp ** {c=prep} ;
|
VPSlashPrep vp prep = vp ** {c = prep ; compl1 = vp.compl ; compl2 = \\_,_ => []; dep=[]} ;
|
||||||
|
|
||||||
-- : AP -> Comp ; -- (be) small
|
-- : AP -> Comp ; -- (be) small
|
||||||
CompAP ap = case ap.preferShort of {
|
CompAP ap = case ap.preferShort of {
|
||||||
PreferFull => {s=\\a=>ap.s ! agrGenNum a ! Inanimate ! Ins ; adv=[] ; cop=InsCopula} ;
|
PreferFull => {s=\\a=>ap.s ! agrGenNum a ! Inanimate ! Ins ; adv=[] ; cop=InsCopula} ;
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ concrete ExtendSpa of Extend = CatSpa ** ExtendRomanceFunctor -
|
|||||||
ExistsNP,
|
ExistsNP,
|
||||||
EmbedSSlash,
|
EmbedSSlash,
|
||||||
GenRP,
|
GenRP,
|
||||||
GenRP,
|
|
||||||
IAdvAdv,
|
IAdvAdv,
|
||||||
ICompAP,
|
ICompAP,
|
||||||
InOrderToVP,
|
InOrderToVP,
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ concrete ExtendSwe of Extend = CatSwe **
|
|||||||
CompoundN, CompoundAP, AdvIsNP,
|
CompoundN, CompoundAP, AdvIsNP,
|
||||||
UttAccNP,
|
UttAccNP,
|
||||||
A2VPSlash, N2VPSlash,
|
A2VPSlash, N2VPSlash,
|
||||||
CardCNCard
|
CardCNCard,
|
||||||
|
GenRP
|
||||||
]
|
]
|
||||||
with (Grammar = GrammarSwe)
|
with (Grammar = GrammarSwe)
|
||||||
**
|
**
|
||||||
@@ -392,5 +393,10 @@ lin UseDAPMasc, UseDAPFem = \dap ->
|
|||||||
|
|
||||||
lin CardCNCard card cn =
|
lin CardCNCard card cn =
|
||||||
{s = \\g => card.s ! cn.g ++ cn.s ! card.n ! DIndef ! Nom ; n = Pl} ;
|
{s = \\g => card.s ! cn.g ++ cn.s ! card.n ! DIndef ! Nom ; n = Pl} ;
|
||||||
|
|
||||||
|
GenRP num cn = {
|
||||||
|
s = \\g_,n,c => "vars" ++ cn.s ! num.n ! DDef Indef ! Nom ; --- c ?
|
||||||
|
a = RAg cn.g num.n P3
|
||||||
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user