From b13866e3ef797f7b9daf4f81c7e7ccff55e9dcb4 Mon Sep 17 00:00:00 2001 From: krasimir Date: Tue, 16 Aug 2016 10:35:30 +0000 Subject: [PATCH] conjunction in Slovenian --- lib/src/slovenian/CatSlv.gf | 2 +- lib/src/slovenian/ConjunctionSlv.gf | 17 ++++++++++++++++- lib/src/slovenian/ParadigmsSlv.gf | 4 ++-- lib/src/slovenian/ResSlv.gf | 12 ++++++++++++ lib/src/slovenian/StructuralSlv.gf | 2 +- 5 files changed, 32 insertions(+), 5 deletions(-) diff --git a/lib/src/slovenian/CatSlv.gf b/lib/src/slovenian/CatSlv.gf index 1e4a9568c..a339e4341 100644 --- a/lib/src/slovenian/CatSlv.gf +++ b/lib/src/slovenian/CatSlv.gf @@ -31,7 +31,7 @@ lincat Numeral = {s : Gender => Case => Str ; n : NumAgr} ; -- Structural - Conj = {s : Str} ; + Conj = {s : Str; n : Number} ; Prep = {s : Str; c : Case} ; -- Open lexical classes, e.g. Lexicon diff --git a/lib/src/slovenian/ConjunctionSlv.gf b/lib/src/slovenian/ConjunctionSlv.gf index 802ed6623..85c4300f5 100644 --- a/lib/src/slovenian/ConjunctionSlv.gf +++ b/lib/src/slovenian/ConjunctionSlv.gf @@ -2,19 +2,34 @@ concrete ConjunctionSlv of Conjunction = CatSlv ** open ResSlv in { lin + ConjNP conj xs = { + s = \\c => xs.s1 ! c ++ conj.s ++ xs.s2 ! c ; + a = {g = xs.a.g; n = conjNumber conj.n xs.a.n; p = xs.a.p} + } ; ConjAP conj xs = { s = \\sp,g,c,n => xs.s1 ! sp ! g ! c ! n ++ conj.s ++ xs.s2 ! sp ! g ! c ! n } ; -- These fun's are generated from the list cat's. - BaseAP x y = { s1 = x.s; s2=y.s } ; + BaseNP x y = { + s1 = x.s ; + s2 = y.s ; + a = conjAgr x.a y.a + } ; + ConsNP x xs = { + s1 = \\c => x.s ! c ++ "," ++ xs.s1 ! c ; + s2 = xs.s2 ; + a = conjAgr x.a xs.a + } ; + BaseAP x y = { s1 = x.s; s2 = y.s } ; ConsAP x xs = { s1 = \\sp,g,c,n => x.s ! sp ! g ! c ! n ++ xs.s1 ! sp ! g ! c ! n ; s2 = xs.s2 } ; lincat + [NP] = {s1,s2 : Case => Str; a : Agr} ; [AP] = {s1,s2 : Species => Gender => Case => Number => Str} ; } diff --git a/lib/src/slovenian/ParadigmsSlv.gf b/lib/src/slovenian/ParadigmsSlv.gf index e684c5aa3..870d8eb8c 100644 --- a/lib/src/slovenian/ParadigmsSlv.gf +++ b/lib/src/slovenian/ParadigmsSlv.gf @@ -387,6 +387,6 @@ oper mkInterj : Str -> Interj = \s -> lin Interj {s=s} ; - mkConj : Str -> Conj = - \s -> lin Conj {s=s} ; + mkConj : Str -> Number -> Conj = + \s,n -> lin Conj {s=s; n=n} ; } diff --git a/lib/src/slovenian/ResSlv.gf b/lib/src/slovenian/ResSlv.gf index 4acab39d3..8dcf7894b 100644 --- a/lib/src/slovenian/ResSlv.gf +++ b/lib/src/slovenian/ResSlv.gf @@ -30,6 +30,18 @@ param oper Agr = {g : Gender; n : Number; p : Person} ; + conjNumber : Number -> Number -> Number = \m,n -> + case m of { + Sg => n ; + _ => Pl + } ; + + conjAgr : Agr -> Agr -> Agr = \a,b -> { + g = b.g ; + n = conjNumber a.n b.n ; + p = b.p + } ; + VP = {s : VForm => Str; s2 : Agr => Str} ; neg : Polarity => Tense => Str = diff --git a/lib/src/slovenian/StructuralSlv.gf b/lib/src/slovenian/StructuralSlv.gf index 2a71a66ff..bb2c9c095 100644 --- a/lib/src/slovenian/StructuralSlv.gf +++ b/lib/src/slovenian/StructuralSlv.gf @@ -1,7 +1,7 @@ concrete StructuralSlv of Structural = CatSlv ** open ResSlv, ParadigmsSlv in { lin - and_Conj = mkConj "in" ; + and_Conj = mkConj "in" Pl ; he_Pron = mkPron "òn" "njêga" "njêga" "njêmu" "njêm" "njím" "njegôv" "njegôvega" "njegôvemu" ("njegôv"|"njegôvega") "njegôvem" "njegôvim" "njegôva" "njegôvih" "njegôvima" "njegôva" "njegôvih" "njegôvima"