forked from GitHub/gf-rgl
more functions in ExtendBul & ExtendSwe
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
--# -path=.:../abstract:../common:prelude
|
||||
concrete ExtendBul of Extend = CatBul ** open Prelude, Predef, ResBul, StructuralBul in {
|
||||
concrete ExtendBul of Extend = CatBul ** open Prelude, Predef, ResBul, GrammarBul in {
|
||||
|
||||
lin
|
||||
GenModNP num np cn = DetCN (DetQuant DefArt num) (AdvCN cn (PrepNP possess_Prep np)) ; -- this man's car(s) ; DEFAULT the car of this man
|
||||
|
||||
AdAdV = cc2 ;
|
||||
|
||||
EmptyRelSlash slash = {
|
||||
@@ -54,6 +56,13 @@ lin
|
||||
"от" ++ np.s ! RObj Acc
|
||||
in {s = ap; adv = ap ! ASg Neut Indef ! P3; isPre = False} ;
|
||||
|
||||
GerundCN vp = {
|
||||
s = \\nform => vp.ad.s ++
|
||||
vp.s ! Imperf ! VNoun nform ++
|
||||
vp.compl ! {gn=GSg Neut; p=P3} ;
|
||||
g = ANeut
|
||||
} ;
|
||||
|
||||
GerundNP vp = {
|
||||
s = \\_ => daComplex Simul Pos vp ! Imperf ! {gn=GSg Neut; p=P1};
|
||||
a = {gn=GSg Neut; p=P3};
|
||||
@@ -95,5 +104,52 @@ lin
|
||||
s = \\a => conj.s++(linCoordSep [])!conj.distr!conj.conj++vps.s!conj.distr!conj.conj!a;
|
||||
} ;
|
||||
|
||||
lincat
|
||||
RNP = {s : Agr => Role => Str; a : Agr; p : Polarity} ;
|
||||
|
||||
lin
|
||||
ReflRNP slash rnp = {
|
||||
s = slash.s ;
|
||||
ad = slash.ad ;
|
||||
compl = \\a => slash.compl1 ! a ++ slash.c2.s ++ rnp.s ! a ! RObj slash.c2.c ++ slash.compl2 ! rnp.a ;
|
||||
vtype = slash.vtype ;
|
||||
p = orPol rnp.p slash.p ;
|
||||
isSimple = False
|
||||
} ;
|
||||
|
||||
ReflPron =
|
||||
{ s = \\agr,role => "себе си";
|
||||
a = {gn = GSg Masc; p = P3} ;
|
||||
p = Pos
|
||||
} ;
|
||||
|
||||
ReflPoss num cn =
|
||||
{ s = \\agr,role =>
|
||||
let nf = case num.nn of {
|
||||
NNum Sg => case role of {
|
||||
RVoc => NFVocative ;
|
||||
_ => NF Sg Indef
|
||||
} ;
|
||||
NNum Pl => NF Pl Indef;
|
||||
NCountable => case cn.g of {
|
||||
AMasc Human => NF Pl Indef;
|
||||
_ => NFPlCount
|
||||
}
|
||||
} ;
|
||||
s = reflPron ! aform (gennum cn.g (numnnum num.nn)) Def (RObj Acc) ++ num.s ! dgenderSpecies cn.g Indef role ++ cn.s ! nf
|
||||
in case role of {
|
||||
RObj Dat => "на" ++ s;
|
||||
_ => s
|
||||
} ;
|
||||
a = {gn = gennum cn.g (numnnum num.nn); p = P3} ;
|
||||
p = Pos
|
||||
} ;
|
||||
|
||||
PredetRNP pred rnp = {
|
||||
s = \\a,c => pred.s ! rnp.a.gn ++ rnp.s ! a ! c ;
|
||||
a = rnp.a ;
|
||||
p = rnp.p
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -56,20 +56,6 @@ concrete ExtraBul of ExtraBulAbs = CatBul **
|
||||
|
||||
IAdvAdv adv = {s = \\qf => (mkIAdv "êîëêî").s ! qf ++ adv.s} ;
|
||||
|
||||
oper
|
||||
reflPron : AForm => Str =
|
||||
table {
|
||||
ASg Masc Indef => "ñâîé" ;
|
||||
ASg Masc Def => "ñâîÿ" ;
|
||||
ASgMascDefNom => "ñâîÿò" ;
|
||||
ASg Fem Indef => "ñâîÿ" ;
|
||||
ASg Fem Def => "ñâîÿòà" ;
|
||||
ASg Neut Indef => "ñâîå" ;
|
||||
ASg Neut Def => "ñâîåòî" ;
|
||||
APl Indef => "ñâîè" ;
|
||||
APl Def => "ñâîèòå"
|
||||
} ;
|
||||
|
||||
lincat
|
||||
VPI = {s : Agr => Str} ;
|
||||
[VPI] = {s : Bool => Ints 2 => Agr => Str} ;
|
||||
|
||||
@@ -750,4 +750,17 @@ resource ResBul = ParamX ** open Prelude, Predef in {
|
||||
|
||||
comma : Str = SOFT_BIND ++ "," ;
|
||||
hyphen : Str = SOFT_BIND ++ "-" ++ SOFT_BIND ;
|
||||
|
||||
reflPron : AForm => Str =
|
||||
table {
|
||||
ASg Masc Indef => "ñâîé" ;
|
||||
ASg Masc Def => "ñâîÿ" ;
|
||||
ASgMascDefNom => "ñâîÿò" ;
|
||||
ASg Fem Indef => "ñâîÿ" ;
|
||||
ASg Fem Def => "ñâîÿòà" ;
|
||||
ASg Neut Indef => "ñâîå" ;
|
||||
ASg Neut Def => "ñâîåòî" ;
|
||||
APl Indef => "ñâîè" ;
|
||||
APl Def => "ñâîèòå"
|
||||
} ;
|
||||
}
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
concrete ExtendSwe of Extend = CatSwe **
|
||||
ExtendFunctor -
|
||||
[
|
||||
GenNP, ComplBareVS, CompBareCN,
|
||||
GenNP, GenModNP, ComplBareVS, CompBareCN,
|
||||
StrandRelSlash, EmptyRelSlash, StrandQuestSlash,
|
||||
MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
|
||||
MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS,
|
||||
ICompAP,
|
||||
AdAdV, PositAdVAdj, GerundNP, GerundAdv, PresPartAP, PastPartAP, PastPartAgentAP,
|
||||
AdAdV, PositAdVAdj, GerundCN, GerundNP, GerundAdv, PresPartAP, PastPartAP, PastPartAgentAP,
|
||||
RNP, RNPList, ReflRNP, ReflPron, ReflPoss, PredetRNP, ConjRNP,
|
||||
Base_rr_RNP, Base_nr_RNP, Base_rn_RNP, Cons_rr_RNP, Cons_nr_RNP,
|
||||
CompoundN
|
||||
@@ -25,6 +25,7 @@ concrete ExtendSwe of Extend = CatSwe **
|
||||
det = DDef Indef
|
||||
} ;
|
||||
|
||||
GenModNP num np cn = DetCN (DetQuant (GenNP (lin NP np)) num) cn ;
|
||||
|
||||
ComplBareVS v s = insertObj (\\_ => s.s ! Sub) (predV v) ;
|
||||
|
||||
@@ -176,7 +177,13 @@ concrete ExtendSwe of Extend = CatSwe **
|
||||
s = \\af => partVPPlusPost vp (PartPret af Nom) (aformpos2agr af) Pos ++ "av" ++ np.s ! accusative ;
|
||||
isPre = False
|
||||
} ;
|
||||
|
||||
|
||||
GerundCN vp = { -- infinitive: att dricka öl, att vara glad
|
||||
s = \\_,_,_ => "att" ++ infVP vp {g = Utr ; n = Sg ; p = P3} ;
|
||||
g = Neutr ;
|
||||
isMod = False
|
||||
} ;
|
||||
|
||||
GerundNP vp = { -- infinitive: att dricka öl, att vara glad
|
||||
s = \\_ => "att" ++ infVP vp {g = Utr ; n = Sg ; p = P3} ;
|
||||
a = {g = Neutr ; n = Sg ; p = P3} ;
|
||||
|
||||
Reference in New Issue
Block a user