From 8c2a6f611812838e62a5cb2b187eaf7668ac5641 Mon Sep 17 00:00:00 2001 From: Krasimir Angelov Date: Tue, 10 Jul 2018 11:25:06 +0200 Subject: [PATCH] allow post-position adjectives. added as_CAdv --- src/bulgarian/AdjectiveBul.gf | 2 +- src/bulgarian/CatBul.gf | 10 +++++++--- src/bulgarian/ExtendBul.gf | 17 +++++++---------- src/bulgarian/LexiconBul.gf | 4 ++-- src/bulgarian/MorphoBul.gf | 1 + src/bulgarian/MorphoFunsBul.gf | 6 +++--- src/bulgarian/ParadigmsBul.gf | 2 +- src/bulgarian/StructuralBul.gf | 2 ++ 8 files changed, 24 insertions(+), 20 deletions(-) diff --git a/src/bulgarian/AdjectiveBul.gf b/src/bulgarian/AdjectiveBul.gf index 14848f20d..5beb49788 100644 --- a/src/bulgarian/AdjectiveBul.gf +++ b/src/bulgarian/AdjectiveBul.gf @@ -6,7 +6,7 @@ concrete AdjectiveBul of Adjective = CatBul ** open ResBul, Prelude in { PositA a = { s = \\aform,_ => a.s ! aform ; adv = a.adv ; - isPre = True + isPre = a.isPre } ; ComparA a np = { diff --git a/src/bulgarian/CatBul.gf b/src/bulgarian/CatBul.gf index 223dce911..c667679e9 100644 --- a/src/bulgarian/CatBul.gf +++ b/src/bulgarian/CatBul.gf @@ -81,7 +81,7 @@ concrete CatBul of Cat = CommonX - [IAdv,CAdv,AdV,SC] ** open ResBul, Prelude, P V3 = Verb ** {c2, c3 : Preposition} ; VV = Verb ** {typ : VVType}; - A = {s : AForm => Str; adv : Str} ; + A = {s : AForm => Str; adv : Str; isPre : Bool} ; A2 = {s : AForm => Str; adv : Str; c2 : Str} ; N = {s : NForm => Str; rel : AForm => Str; relPost : Bool; g : AGender} ; @@ -103,9 +103,11 @@ concrete CatBul of Cat = CommonX - [IAdv,CAdv,AdV,SC] ** open ResBul, Prelude, P V3 = \s -> {s = \\_,_ => s; vtype = VNormal; c2,c3 = {s=""; c=Acc}}; VV = \s -> {s = \\_,_ => s; vtype = VNormal; typ = VVInf Perf}; - A = \s -> {s = \\_ => s; adv = s}; + A = \s -> {s = \\_ => s; adv = s; isPre = True}; A2 = \s -> {s = \\_ => s; adv = s; c2 = ""}; - + + CAdv = \s -> {s=[]; sn=s} ; + N = \s -> {s = \\_ => s; rel = \\_ => s; relPost = False; g = AMasc NonHuman}; N2 = \s -> {s = \\_ => s; rel = \\_ => s; relPost = False; g = AMasc NonHuman; c2 = {s=""; c=Acc}}; N3 = \s -> {s = \\_ => s; rel = \\_ => s; relPost = False; g = AMasc NonHuman; c2,c3 = {s=""; c=Acc}}; @@ -144,6 +146,8 @@ concrete CatBul of Cat = CommonX - [IAdv,CAdv,AdV,SC] ** open ResBul, Prelude, P A = \a -> a.s ! ASg Masc Indef; A2 = \a -> a.s ! ASg Masc Indef ++ a.c2; + CAdv = \adv -> adv.s ++ adv.sn ; + N = \n -> n.s ! NF Sg Indef; N2 = \n -> n.s ! NF Sg Indef ++ linPrep n.c2; N3 = \n -> n.s ! NF Sg Indef ++ linPrep n.c2 ++ linPrep n.c3; diff --git a/src/bulgarian/ExtendBul.gf b/src/bulgarian/ExtendBul.gf index 6d7b5a4ff..a5fc6a866 100644 --- a/src/bulgarian/ExtendBul.gf +++ b/src/bulgarian/ExtendBul.gf @@ -11,17 +11,14 @@ lin } ; CompoundN n1 n2 = - let aform = ASg (case n2.g of { - AMasc _ => Masc ; - AFem => Fem ; - ANeut => Neut - }) Indef + let comp : NForm => Str + = \\nf => case n1.relPost of { + True => n2.s ! nf ++ n1.rel ! nform2aform nf n2.g ; + False => n1.rel ! nform2aform nf n2.g ++ n2.s ! indefNForm nf + } in { - s = \\nf => case n1.relPost of { - True => n2.s ! nf ++ n1.rel ! nform2aform nf n2.g ; - False => n1.rel ! nform2aform nf n2.g ++ n2.s ! indefNForm nf - } ; - rel = \\af => n1.rel ! aform ++ n2.s ! NF Sg Indef ; relPost = n1.relPost ; + s = comp ; + rel = \\af => "РЅР°" ++ comp ! NF Sg Def ; relPost = True ; g = n2.g } ; diff --git a/src/bulgarian/LexiconBul.gf b/src/bulgarian/LexiconBul.gf index 64258c963..cda724e3b 100644 --- a/src/bulgarian/LexiconBul.gf +++ b/src/bulgarian/LexiconBul.gf @@ -84,7 +84,7 @@ lin fridge_N = mkN007 "фризер" ; friend_N = mkN031a "приятел" ; fruit_N = mkN001 "плод" ; - fun_AV = mkAV (mkA079 "забавен") ; + fun_AV = mkA079 "забавен" ; forget_V2 = dirV2 (actionV (mkV187 "забравям") (mkV173 "забравя")) ; garden_N = mkN041 "градина" ; girl_N = mkN065 "момиче" ; @@ -152,7 +152,7 @@ lin play_V2 = dirV2 (stateV (mkV161 "играя")) ; policeman_N = mkN032a "полицай" ; priest_N = mkN014 "свещеник" ; - probable_AS = mkAS (mkA079 "вероятен") ; + probable_AS = mkA079 "вероятен" ; queen_N = mkN041 "кралица" ; radio_N = mkN054 "радио" ; rain_V0 = mkV0 (stateV (mkV174 "вали")) ; diff --git a/src/bulgarian/MorphoBul.gf b/src/bulgarian/MorphoBul.gf index c28ecdc8e..a2ca1853a 100644 --- a/src/bulgarian/MorphoBul.gf +++ b/src/bulgarian/MorphoBul.gf @@ -235,6 +235,7 @@ oper APl Def => dobrite } ; adv = dobro ; + isPre = True ; lock_A = <> } ; } diff --git a/src/bulgarian/MorphoFunsBul.gf b/src/bulgarian/MorphoFunsBul.gf index 21ce9e917..e95f8798e 100644 --- a/src/bulgarian/MorphoFunsBul.gf +++ b/src/bulgarian/MorphoFunsBul.gf @@ -21,13 +21,13 @@ oper -- Adverbs modifying adjectives and sentences can also be formed. - mkAdA : Str -> AdA = \x -> ss x ** {lock_AdA = <>} ; - + mkAdA : Str -> AdA = \x -> lin AdA (ss x) ; + mkCAdv : Str -> Str -> CAdv = \s,sn -> lin CAdv {s = s; sn = sn} ; --2 Adjectives -- - AS, A2S, AV : Type = A ; + AS, A2S, AV : Type = {s : AForm => Str; adv : Str} ; A2V : Type = A2 ; mkA2 : A -> Prep -> A2 ; diff --git a/src/bulgarian/ParadigmsBul.gf b/src/bulgarian/ParadigmsBul.gf index f604e85d9..7bfb60bdb 100644 --- a/src/bulgarian/ParadigmsBul.gf +++ b/src/bulgarian/ParadigmsBul.gf @@ -2081,5 +2081,5 @@ oper (v0+"ане") ; adjAdv : A -> Str -> A = - \a,adv -> {s = a.s; adv = adv; lock_A=<>} ; + \a,adv -> a ** {adv = adv} ; } diff --git a/src/bulgarian/StructuralBul.gf b/src/bulgarian/StructuralBul.gf index a803b92ae..0e9aaeee1 100644 --- a/src/bulgarian/StructuralBul.gf +++ b/src/bulgarian/StructuralBul.gf @@ -122,6 +122,8 @@ concrete StructuralBul of Structural = CatBul ** youPl_Pron = mkPron "вие" "ваш" "вашия" "вашият" "ваша" "вашата" "ваше" "вашето" "ваши" "вашите" GPl PronP2 ; youPol_Pron = mkPron "вие" "ваш" "вашия" "вашият" "ваша" "вашата" "ваше" "вашето" "ваши" "вашите" GPl PronP2 ; + as_CAdv = mkCAdv "" "колкото" ; + have_V2 = dirV2 (stateV (mkV186 "имам")) ; lin language_title_Utt = ss "Български" ;