1
0
forked from GitHub/gf-rgl

added ByVP, InOrderToVP and CompoundAP

This commit is contained in:
Krasimir Angelov
2018-06-26 12:26:41 +02:00
parent 39bca7b395
commit a730a3194b
3 changed files with 25 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
--# -path=.:../abstract:../common:prelude
concrete ExtendBul of Extend = CatBul ** open Prelude, Predef, ResBul, GrammarBul in {
concrete ExtendBul of Extend = CatBul ** open Prelude, Predef, ResBul, GrammarBul, MorphoFunsBul 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
@@ -26,6 +26,8 @@ lin
g = n2.g
} ;
CompoundAP n a = AdvAP (PositA a) (PrepNP (mkPrep "от" Acc) (MassNP (UseN n))) ;
PositAdVAdj a = {s = a.adv; p = Pos} ;
PresPartAP vp =
@@ -69,11 +71,14 @@ lin
p = Pos
} ;
GerundAdv vp =
GerundAdv, ByVP = \vp ->
{s = vp.ad.s ++
vp.s ! Imperf ! VGerund ++
vp.compl ! {gn=GSg Neut; p=P3}} ;
InOrderToVP vp =
{s = "за" ++ daComplex Simul Pos vp ! Perf ! {gn=GSg Neut; p=P3}};
iFem_Pron = mkPron "аз" "мен" "ме" "ми" "мой" "моя" "моят" "моя" "моята" "мое" "моето" "мои" "моите" (GSg Fem) P1 ;
youFem_Pron = youSg_Pron ;
weFem_Pron = we_Pron ;

View File

@@ -251,12 +251,13 @@ concrete ExtendEng of Extend =
SlashBareV2S v s = insertExtrac s.s (predVc v) ;
CompoundN noun cn = {
s = (\\n,c => noun.s ! Sg ! Nom ++ cn.s ! n ! c) ;
s = \\n,c => noun.s ! Sg ! Nom ++ cn.s ! n ! c ;
g = cn.g
} ;
CompoundAP noun adj = {
s = (\\_ => noun.s ! Sg ! Nom ++ adj.s ! AAdj Posit Nom) ;
s = variants {\\_ => noun.s ! Sg ! Nom ++ adj.s ! AAdj Posit Nom ;
\\_ => noun.s ! Sg ! Nom ++ BIND++"-"++BIND ++ adj.s ! AAdj Posit Nom} ;
isPre = True
} ;

View File

@@ -5,14 +5,14 @@ concrete ExtendSwe of Extend = CatSwe **
GenNP, GenModNP, ComplBareVS, CompBareCN,
ApposNP, DetNPMasc, DetNPFem,
StrandRelSlash, EmptyRelSlash, StrandQuestSlash,
PassVPSlash, PassAgentVPSlash, UttVPShort,
PassVPSlash, PassAgentVPSlash, UttVPShort, ByVP, InOrderToVP,
MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS,
ICompAP,
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
CompoundN, CompoundAP
]
with (Grammar = GrammarSwe)
**
@@ -174,6 +174,11 @@ concrete ExtendSwe of Extend = CatSwe **
g = n2.g
} ;
CompoundAP noun adj = {
s = \\ap => noun.co ++ BIND ++ adj.s ! AF (APosit ap) Nom ;
isPre = True
} ;
lin
AdAdV = cc2 ;
@@ -215,5 +220,12 @@ concrete ExtendSwe of Extend = CatSwe **
GerundAdv vp = {
s = partVPPlusPost vp (PartPres Sg Indef (Nom|Gen)) {g = Utr ; n = Sg ; p = P3} Pos -- sovande(s) i sängen
} ;
ByVP vp = { -- infinitive: att dricka öl, att vara glad
s = "genom att" ++ infVP vp {g = Utr ; n = Sg ; p = P3}
} ;
InOrderToVP vp = { -- infinitive: att dricka öl, att vara glad
s = "för att" ++ infVP vp {g = Utr ; n = Sg ; p = P3}
} ;
}