From da0e273d3d52acba01e3934898d12ab203751708 Mon Sep 17 00:00:00 2001 From: Krasimir Angelov Date: Mon, 13 Apr 2026 09:13:38 +0200 Subject: [PATCH] improved several functions --- src/macedonian/AdjectiveMkd.gf | 14 ++++++++------ src/macedonian/CatMkd.gf | 2 +- src/macedonian/NounMkd.gf | 4 ++-- src/macedonian/QuestionMkd.gf | 23 +++++++++++++---------- src/macedonian/RelativeMkd.gf | 4 ++-- src/macedonian/ResMkd.gf | 4 ++-- src/macedonian/SentenceMkd.gf | 4 ++-- 7 files changed, 30 insertions(+), 25 deletions(-) diff --git a/src/macedonian/AdjectiveMkd.gf b/src/macedonian/AdjectiveMkd.gf index 9f1f527b..2f59be84 100644 --- a/src/macedonian/AdjectiveMkd.gf +++ b/src/macedonian/AdjectiveMkd.gf @@ -3,19 +3,21 @@ concrete AdjectiveMkd of Adjective = CatMkd ** open Prelude,ResMkd in { lin AdAP a ap = {s = \\s,g => a.s ++ ap.s ! s ! g; isPre = ap.isPre} ; lin AdjOrd o = {s = \\s,g => o.s; isPre = False} ; - lin AdvAP ap a = {s = \\s,g => ap.s ! s ! g ++ a.s; - isPre = ap.isPre} ; + lin AdvAP ap adv = { + s = \\s,g => ap.s ! s ! g ++ adv.s; + isPre = False + } ; lin CAdvAP c ap np = {s = \\s,g => c.s ++ ap.s ! s ! g ++ np.s ! RSubj; isPre = ap.isPre} ; - lin ComparA a np = {s = \\s,g => a.s ! s ! g ++ np.s ! RSubj; + lin ComparA a np = {s = \\s,g => "по" ++ BIND ++ a.s ! s ! g ++ "од" ++ np.s ! RPrep; isPre = False} ; - lin ComplA2 a2 np = {s = \\s,g => a2.s ! s ! g ++ np.s ! RSubj; + lin ComplA2 a2 np = {s = \\s,g => a2.s ! s ! g ++ a2.c2.s ++ np.s ! RObj a2.c2.c; isPre = False} ; lin PositA a = a ** {isPre = True} ; lin ReflA2 a2 = {s = \\s,g => a2.s ! s ! g; isPre = False} ; lin SentAP ap sc = {s = \\s,g => ap.s ! s ! g ++ sc.s; isPre = ap.isPre} ; - lin UseA2 a2 = {s = \\s,g => a2.s ! s ! g; isPre = False} ; - lin UseComparA a = {s = \\s,g => a.s ! s ! g; isPre = False} ; + lin UseA2 a2 = {s = a2.s; isPre = True} ; + lin UseComparA a = {s = \\s,g => "по" ++ BIND ++ a.s ! s ! g; isPre = True} ; } diff --git a/src/macedonian/CatMkd.gf b/src/macedonian/CatMkd.gf index 16b5077b..e8bf6e81 100644 --- a/src/macedonian/CatMkd.gf +++ b/src/macedonian/CatMkd.gf @@ -38,7 +38,7 @@ lincat VP = Verb ** {compl : Agr => Str} ; lincat VPSlash = Verb ** {compl : Agr => Str; c2 : Compl} ; lincat S,QS = {s : Str} ; lincat RS = {s : GenNum => Str} ; -lincat Cl = {s : ResMkd.Tense => Anteriority => Polarity => Order => Str} ; +lincat Cl = {s : Order => ResMkd.Tense => Anteriority => Polarity => Str} ; lincat QCl = {s : ResMkd.Tense => Anteriority => Polarity => Str} ; lincat RCl = {s : GenNum => ResMkd.Tense => Anteriority => Polarity => Str} ; lincat RP = {s : GenNum => Str} ; diff --git a/src/macedonian/NounMkd.gf b/src/macedonian/NounMkd.gf index 3b23fd20..87f0fb97 100644 --- a/src/macedonian/NounMkd.gf +++ b/src/macedonian/NounMkd.gf @@ -95,8 +95,8 @@ concrete NounMkd of Noun = CatMkd ** open Prelude,ResMkd in { } ; lin OrdDigits d = {s = d.s} ; lin OrdNumeral n = {s = n.s} ; - lin OrdNumeralSuperl n a = {s = n.s ++ a.s ! Indef ! GSg Masc} ; - lin OrdSuperl a = {s = a.s ! Indef ! GSg Masc} ; + lin OrdNumeralSuperl n a = {s = n.s ++ "нај" ++ BIND ++ a.s ! Indef ! GSg Masc} ; + lin OrdSuperl a = {s = "нај" ++ BIND ++ a.s ! Indef ! GSg Masc} ; lin PPartNP np v2 = {s = \\r => np.s ! r ++ v2.present ! Imperfective ! Sg ! np.a.p; vocative = np.vocative ++ v2.present ! Imperfective ! Sg ! np.a.p; diff --git a/src/macedonian/QuestionMkd.gf b/src/macedonian/QuestionMkd.gf index a6c50c0d..83aa6f7b 100644 --- a/src/macedonian/QuestionMkd.gf +++ b/src/macedonian/QuestionMkd.gf @@ -3,17 +3,20 @@ concrete QuestionMkd of Question = CatMkd ** open Prelude,ResMkd in { lin AdvIP ip a = {s = ip.s ++ a.s; g = ip.g} ; lin CompIAdv i = {s = i.s} ; lin CompIP ip = {s = ip.s} ; - lin IdetCN i cn = {s = i.s ! cn.g ++ cn.s ! Indef ! i.n; - g = GSg Masc} ; - lin IdetIP i = {s = i.s ! Masc; g = GSg Masc} ; - lin IdetQuant i n = {s = \\g => i.s ! GSg Masc ++ n.s; n = Sg} ; - lin PrepIP p ip = {s = p.s ++ ip.s} ; + lin IdetCN idet cn = { + s = idet.s ! cn.g ++ cn.s ! Indef ! idet.n; + g = genNum cn.g idet.n + } ; + lin IdetIP idet = {s = idet.s ! Masc; g = genNum Masc idet.n} ; + lin IdetQuant i n = { + s = \\g => i.s ! GSg Masc ++ n.s; + n = Sg + } ; + lin PrepIP p ip = {s : Str = p.s ++ ip.s} ; lincat QVP = {s : Str} ; - lin QuestCl cl = {s = \\t,a,p => cl.s ! t ! a ! p ! Quest} ; - lin QuestIAdv i cl = {s = \\t,a,p => i.s - ++ cl.s ! t ! a ! p ! Main} ; + lin QuestCl cl = {s = cl.s ! Quest} ; + lin QuestIAdv i cl = {s = \\t,a,p => i.s ++ cl.s ! Main ! t ! a ! p} ; lin QuestIComp i np = {s = \\t,a,p => i.s ++ np.s ! RSubj} ; lin QuestSlash ip c = {s = \\t,a,p => ip.s ++ c.s} ; - lin QuestVP ip vp = {s = \\t,a,p => ip.s - ++ vp.present ! Imperfective ! Sg ! P1} ; + lin QuestVP ip vp = {s = mkClause ip.s {g=ip.g; p=P3} vp ! Main} ; } diff --git a/src/macedonian/RelativeMkd.gf b/src/macedonian/RelativeMkd.gf index 5cb027d6..975eb194 100644 --- a/src/macedonian/RelativeMkd.gf +++ b/src/macedonian/RelativeMkd.gf @@ -7,9 +7,9 @@ concrete RelativeMkd of Relative = CatMkd ** open Prelude,ResMkd in { GPl => "кои" } } ; - lin RelCl cl = {s = \\g,t,a,p => cl.s ! t ! a ! p ! Main} ; + lin RelCl cl = {s = \\g => cl.s ! Main} ; lin RelSlash rp c = {s = \\g,t,a,p => rp.s ! g ++ c.s} ; lin RelVP rp vp = { - s = \\gn,t,a,p => mkClause (rp.s ! gn) {g=gn; p=P3} vp ! t ! a ! p ! Main + s = \\gn => mkClause (rp.s ! gn) {g=gn; p=P3} vp ! Main } ; } diff --git a/src/macedonian/ResMkd.gf b/src/macedonian/ResMkd.gf index f492fd75..c02754ec 100644 --- a/src/macedonian/ResMkd.gf +++ b/src/macedonian/ResMkd.gf @@ -286,13 +286,13 @@ auxHave = { } } ; -mkClause : Str -> Agr -> Verb ** {compl : Agr => Str} -> Tense => Anteriority => Polarity => Order => Str +mkClause : Str -> Agr -> Verb ** {compl : Agr => Str} -> Order => Tense => Anteriority => Polarity => Str = \subj,agr,vp -> let n = case agr.g of { GSg _ => Sg ; GPl => Pl } - in \\t,a,p,o => + in \\o,t,a,p => case of { => subj ++ neg ++ vp.present ! Imperfective ! n ! agr.p ++ li ++ vp.compl ! agr ; => case o of { diff --git a/src/macedonian/SentenceMkd.gf b/src/macedonian/SentenceMkd.gf index 0391ef6f..d1c6b619 100644 --- a/src/macedonian/SentenceMkd.gf +++ b/src/macedonian/SentenceMkd.gf @@ -18,13 +18,13 @@ concrete SentenceMkd of Sentence = CatMkd ** open Prelude,ResMkd in { lin PredVP np vp = {s = mkClause (np.s ! RSubj) np.a vp} ; lin RelS s rs = {s = s.s ++ rs.s ! GSg Masc} ; lin SSubjS s s2 s3 = {s = s.s ++ s2.s ++ s3.s} ; - lin SlashPrep cl p = {s = cl.s ! VPresent ! Simul ! Pos ! Main + lin SlashPrep cl p = {s = cl.s ! Main ! VPresent ! Simul ! Pos ++ p.s} ; lin SlashVP np v = {s = np.s ! RSubj ++ v.present ! Imperfective ! Sg ! np.a.p} ; lin SlashVS np vs s = {s = np.s ! RSubj ++ vs.present ! Imperfective ! Sg ! np.a.p ++ s.s} ; - lin UseCl t p cl = {s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! Main} ; + lin UseCl t p cl = {s = t.s ++ p.s ++ cl.s ! Main ! t.t ! t.a ! p.p} ; lin UseQCl t p cl = {s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p} ; lin UseRCl t p cl = {s = \\gn => t.s ++ p.s ++ cl.s ! gn ! t.t ! t.a ! p.p} ; lin UseSlash t p c = {s = t.s ++ p.s ++ c.s} ;