diff --git a/src/macedonian/CatMkd.gf b/src/macedonian/CatMkd.gf index e8bf6e81..7c4f367d 100644 --- a/src/macedonian/CatMkd.gf +++ b/src/macedonian/CatMkd.gf @@ -1,4 +1,4 @@ -concrete CatMkd of Cat = CommonX - [Temp,Tense] ** open ParamX, ResMkd, Prelude in { +concrete CatMkd of Cat = CommonX - [Temp,Tense] ** open ParamX, ResMkd, Prelude, Predef in { lincat Temp = {s : Str ; t : ResMkd.Tense ; a : Anteriority} ; @@ -49,4 +49,6 @@ lincat Subj = {s : Str} ; lincat Imp = {s : Polarity => GenNum => Str} ; lincat Comp = {s : GenNum => Str} ; +lincat Conj = {s : Str; sep : Ints 3; n : Number} ; + } diff --git a/src/macedonian/ConjunctionMkd.gf b/src/macedonian/ConjunctionMkd.gf new file mode 100644 index 00000000..6874da7d --- /dev/null +++ b/src/macedonian/ConjunctionMkd.gf @@ -0,0 +1,104 @@ +--# -coding=utf8 +concrete ConjunctionMkd of Conjunction = + CatMkd ** open ResMkd, Coordination, Prelude, Predef in { + + lin + ConjS conj ss = { + s = linCoord []!conj.sep ++ ss.s!conj.sep ++ conj.s ++ ss.s!4; + } ; + + ConjAdv conj ss = { + s = linCoord []!conj.sep ++ ss.s!conj.sep ++ conj.s ++ ss.s!4; + } ; + + ConjAdV conj ss = { + s = linCoord []!conj.sep ++ ss.s!conj.sep ++ conj.s ++ ss.s!4; + } ; + + ConjIAdv conj ss = { + s = linCoord []!conj.sep ++ ss.s!conj.sep ++ conj.s ++ ss.s!4; + } ; + + ConjNP conj ss = { + s = \\role => linCoord []!conj.sep ++ ss.s!role!conj.sep ++ conj.s ++ ss.s!role!4; + vocative = linCoord []!conj.sep ++ ss.vocative!conj.sep ++ conj.s ++ ss.vocative!4; + a = {g = conjGenNum (genNum Masc conj.n) ss.gn; p = ss.p} + } ; + + ConjAP conj ss = { + s = \\sp,gn => linCoord []!conj.sep ++ ss.s!sp!gn!conj.sep ++ conj.s ++ ss.s!sp!gn!4; + isPre = ss.isPre + } ; + + ConjRS conj ss = { + s = \\gn => linCoord []!conj.sep ++ ss.s!gn!conj.sep ++ conj.s ++ ss.s!gn!4; + } ; + + ConjCN conj ss = { + s = \\sp,n => linCoord []!conj.sep ++ ss.s!sp!n!conj.sep ++ conj.s ++ ss.s!sp!n!4; + count_form = linCoord []!conj.sep ++ ss.count_form!conj.sep ++ conj.s ++ ss.s!Indef!Pl!4; + vocative = \\n => linCoord []!conj.sep ++ ss.vocative!n!conj.sep ++ conj.s ++ ss.vocative!n!4; + g = ss.g + } ; + +-- These fun's are generated from the list cat's. + BaseS x y = {s = table {4 => y.s; _ => x.s}} ; + ConsS x xs = {s = table {4 => xs.s!4; t => x.s++linCoord bindComma!t++xs.s!t}} ; + + BaseAdv x y = {s = table {4 => y.s; _ => x.s}} ; + ConsAdv x xs = {s = table {4 => xs.s!4; t => x.s++linCoord bindComma!t++xs.s!t}} ; + + BaseAdV x y = {s = table {4 => y.s; _ => x.s}} ; + ConsAdV x xs = {s = table {4 => xs.s!4; t => x.s++linCoord bindComma!t++xs.s!t}} ; + + BaseIAdv x y = {s = table {4 => y.s; _ => x.s}} ; + ConsIAdv x xs = {s = table {4 => xs.s!4; t => x.s++linCoord bindComma!t++xs.s!t}} ; + + BaseNP x y = + {s = \\role=>table {4 => y.s!role; _ => x.s!role}; + vocative = table {4 => y.vocative; _ => x.vocative}; + gn = conjGenNum x.a.g y.a.g; + p = x.a.p} ; + ConsNP x xs = + {s = \\role=>table {4 => xs.s!role!4; t => x.s!role++linCoord bindComma!t++xs.s!role!t}; + vocative = table {4 => xs.vocative!4; t => x.vocative++linCoord bindComma!t++xs.vocative!t}; + gn = conjGenNum xs.gn x.a.g; + p = x.a.p} ; + + BaseAP x y = + {s = \\sp,gn => table {4 => y.s!sp!gn; _ => x.s!sp!gn} ; + isPre = andB x.isPre y.isPre} ; + ConsAP x xs = + {s = \\sp,gn => table {4 => xs.s!sp!gn!4; t => x.s!sp!gn++linCoord bindComma!t++xs.s!sp!gn!t}; + isPre = andB x.isPre xs.isPre} ; + + BaseRS x y = + {s = \\gn=>table {4 => y.s!gn; _ => x.s!gn}} ; + ConsRS x xs = + {s = \\gn=>table {4 => xs.s!gn!4; t => x.s!gn++linCoord bindComma!t++xs.s!gn!t}} ; + + BaseCN x y = + {s = \\sp,n=>table {4 => y.s!sp!n; _ => x.s!sp!n}; + count_form = table {4 => y.count_form; t => x.count_form}; + vocative = \\n=>table {4 => y.vocative!n; t => x.vocative!n}; + g = x.g} ; + ConsCN x xs = + {s = \\sp,n=>table {4 => xs.s!sp!n!4; t => x.s!sp!n++linCoord bindComma!t++xs.s!sp!n!t}; + count_form = table {4 => xs.count_form!4; t => x.count_form++linCoord bindComma!t++xs.count_form!t}; + vocative = \\n=>table {4 => xs.vocative!n!4; t => x.vocative!n++linCoord bindComma!t++xs.vocative!n!t}; + g = x.g} ; + + lincat + [S] = {s : Ints 4 => Str} ; + [Adv] = {s : Ints 4 => Str} ; + [AdV] = {s : Ints 4 => Str} ; + [IAdv] = {s : Ints 4 => Str} ; + [NP] = {s : Role => Ints 4 => Str; vocative : Ints 4 => Str; gn : GenNum; p : Person} ; + [AP] = {s : Species => GenNum => Ints 4 => Str; isPre : Bool} ; + [RS] = {s : GenNum => Ints 4 => Str} ; + [CN] = {s : Species => Number => Ints 4 => Str ; + count_form : Ints 4 => Str ; + vocative : Number => Ints 4 => Str ; + g : Gender} ; + +} diff --git a/src/macedonian/GrammarMkd.gf b/src/macedonian/GrammarMkd.gf index 4d593af1..3ffea411 100644 --- a/src/macedonian/GrammarMkd.gf +++ b/src/macedonian/GrammarMkd.gf @@ -1,2 +1,2 @@ -concrete GrammarMkd of Grammar = NamesMkd,VerbMkd,SentenceMkd,QuestionMkd,NounMkd,AdverbMkd,AdjectiveMkd,IdiomMkd,NumeralMkd,PhraseMkd,RelativeMkd,TextMkd,StructuralMkd,TenseMkd ** { +concrete GrammarMkd of Grammar = NamesMkd,VerbMkd,SentenceMkd,QuestionMkd,NounMkd,AdverbMkd,AdjectiveMkd,IdiomMkd,NumeralMkd,PhraseMkd,RelativeMkd,TextMkd,StructuralMkd,TenseMkd,ConjunctionMkd ** { } diff --git a/src/macedonian/ParadigmsMkd.gf b/src/macedonian/ParadigmsMkd.gf index 8eb17207..f4f7936e 100644 --- a/src/macedonian/ParadigmsMkd.gf +++ b/src/macedonian/ParadigmsMkd.gf @@ -1218,7 +1218,9 @@ mkDet = overload { } ; } ; -mkConj : Str -> Conj = \s -> lin Conj {s=s} ; +mkConj : Str -> Number -> Conj = + \s,n -> lin Conj {s = s; sep = 3; n = n} ; + mkPConj : Str -> PConj = \s -> lin PConj {s=s} ; mkPredet : Str -> Predet = \s -> lin Predet {s=s} ; mkCAdv : Str -> CAdv = \s -> lin CAdv {s=s; p=""} ; diff --git a/src/macedonian/ResMkd.gf b/src/macedonian/ResMkd.gf index c02754ec..8868ae10 100644 --- a/src/macedonian/ResMkd.gf +++ b/src/macedonian/ResMkd.gf @@ -1,4 +1,4 @@ -resource ResMkd = ParamX - [Tense] ** open Prelude in { +resource ResMkd = ParamX - [Tense] ** open Prelude, Predef in { oper Compl = {s : Str; c : Case} ; @@ -175,6 +175,12 @@ oper Pronoun = { a : {g : GenNum; p : Person} } ; +conjGenNum : GenNum -> GenNum -> GenNum = \a,b -> + case of { + => GSg g ; + _ => GPl + } ; + genNum : Gender -> Number -> GenNum = \g,n -> case n of { Sg => GSg g ; @@ -323,4 +329,8 @@ mkClause : Str -> Agr -> Verb ** {compl : Agr => Str} -> Order => Tense => Anter Quest => "ли" } } ; + +linCoord : Str -> Ints 4 => Str ; +linCoord comma = table {0 => "и"; 1=>"или"; 2=>"нито"; 3=>comma; 4=>[]} ; + }