From 9544bd8e6b66e0c5e95ddecd17d995de942730f6 Mon Sep 17 00:00:00 2001 From: Krasimir Angelov Date: Sat, 12 May 2018 17:41:12 +0200 Subject: [PATCH] CompoundN in ExtendSwe and ExtendBul --- src/bulgarian/AllBul.gf | 7 +++---- src/bulgarian/AllBulAbs.gf | 5 ++--- src/bulgarian/ExtendBul.gf | 18 ++++++++++++++++++ src/swedish/ExtendSwe.gf | 9 +++++++-- 4 files changed, 30 insertions(+), 9 deletions(-) create mode 100644 src/bulgarian/ExtendBul.gf diff --git a/src/bulgarian/AllBul.gf b/src/bulgarian/AllBul.gf index 90166354..f0970620 100644 --- a/src/bulgarian/AllBul.gf +++ b/src/bulgarian/AllBul.gf @@ -1,9 +1,8 @@ --# -path=.:../abstract:../common:../prelude:../api ---# -coding=cp1251 -concrete AllBul of AllBulAbs = +concrete AllBul of AllBulAbs = LangBul, - ExtraBul + ExtendBul ** { - flags coding=cp1251 ; + } ; diff --git a/src/bulgarian/AllBulAbs.gf b/src/bulgarian/AllBulAbs.gf index 07e88d53..3aa4604d 100644 --- a/src/bulgarian/AllBulAbs.gf +++ b/src/bulgarian/AllBulAbs.gf @@ -1,9 +1,8 @@ --# -path=.:../abstract:../common:prelude ---# -coding=cp1251 abstract AllBulAbs = Lang, - ExtraBulAbs + Extend ** { - flags coding=cp1251 ; + } ; diff --git a/src/bulgarian/ExtendBul.gf b/src/bulgarian/ExtendBul.gf new file mode 100644 index 00000000..7d51c572 --- /dev/null +++ b/src/bulgarian/ExtendBul.gf @@ -0,0 +1,18 @@ +--# -path=.:../abstract:../common:prelude +concrete ExtendBul of Extend = CatBul ** open ResBul in { + +lin + CompoundN n1 n2 = + let aform = ASg (case n2.g of { + AMasc _ => Masc ; + AFem => Fem ; + ANeut => Neut + }) Indef + in { + s = \\nf => n1.rel ! nform2aform nf n2.g ++ n2.s ! (indefNForm nf) ; + rel = \\af => n1.rel ! aform ++ n2.s ! NF Sg Indef ; + g = n2.g + } ; + +} + diff --git a/src/swedish/ExtendSwe.gf b/src/swedish/ExtendSwe.gf index 2ae788b7..4ba2eff1 100644 --- a/src/swedish/ExtendSwe.gf +++ b/src/swedish/ExtendSwe.gf @@ -8,7 +8,8 @@ concrete ExtendSwe of Extend = CatSwe ** MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS, ICompAP, RNP, RNPList, ReflRNP, ReflPron, ReflPoss, PredetRNP, ConjRNP, - Base_rr_RNP, Base_nr_RNP, Base_rn_RNP, Cons_rr_RNP, Cons_nr_RNP + Base_rr_RNP, Base_nr_RNP, Base_rn_RNP, Cons_rr_RNP, Cons_nr_RNP, + CompoundN ] with (Grammar = GrammarSwe) ** @@ -143,6 +144,10 @@ concrete ExtendSwe of Extend = CatSwe ** Cons_rr_RNP x xs = consrTable Agr comma x xs ; Cons_nr_RNP x xs = consrTable Agr comma {s = \\a => x.s ! NPAcc} xs ; - + CompoundN n1 n2 = { + s = \\n,s,c => n1.co ++ BIND ++ n2.s ! n ! s ! c ; + co = n1.co ++ BIND ++ n2.co ; + g = n2.g + } ; }