From a730a3194b6349e8ebe19fc8346ae14787c66218 Mon Sep 17 00:00:00 2001 From: Krasimir Angelov Date: Tue, 26 Jun 2018 12:26:41 +0200 Subject: [PATCH] added ByVP, InOrderToVP and CompoundAP --- src/bulgarian/ExtendBul.gf | 9 +++++++-- src/english/ExtendEng.gf | 5 +++-- src/swedish/ExtendSwe.gf | 18 +++++++++++++++--- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/src/bulgarian/ExtendBul.gf b/src/bulgarian/ExtendBul.gf index 63cb10234..c4d32114c 100644 --- a/src/bulgarian/ExtendBul.gf +++ b/src/bulgarian/ExtendBul.gf @@ -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 ; diff --git a/src/english/ExtendEng.gf b/src/english/ExtendEng.gf index 9f971ac2a..76a1e940d 100644 --- a/src/english/ExtendEng.gf +++ b/src/english/ExtendEng.gf @@ -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 } ; diff --git a/src/swedish/ExtendSwe.gf b/src/swedish/ExtendSwe.gf index 5306a8b40..5dfcf9a2d 100644 --- a/src/swedish/ExtendSwe.gf +++ b/src/swedish/ExtendSwe.gf @@ -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} + } ; } -