From 5995be8940aa2b8059e4d28bcb16f8a8f80f4389 Mon Sep 17 00:00:00 2001 From: Krasimir Angelov Date: Mon, 24 Aug 2026 14:03:38 +0200 Subject: [PATCH] fix number agreement with decimals --- src/macedonian/CatMkd.gf | 3 ++- src/macedonian/NounMkd.gf | 14 +++++++++----- src/macedonian/ParadigmsMkd.gf | 4 ++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/macedonian/CatMkd.gf b/src/macedonian/CatMkd.gf index 6a92fd06..816aa09d 100644 --- a/src/macedonian/CatMkd.gf +++ b/src/macedonian/CatMkd.gf @@ -17,6 +17,7 @@ lincat Pron = Pronoun ; lincat Prep = Compl ; lincat Decimal = {s : Str; n : Number; hasDot : Bool} ; lincat Digits = {s : Str; n : Number; tail : DTail} ; +lincat Numeral = {s : Str; n : Number} ; linref N,N2,N3 = \n -> n.s ! Indef ! Sg ; linref V, VA, VV, VS, VQ, V2, V2S, V2Q, V3, V2A, V2V = @@ -30,7 +31,7 @@ linref A, A2 = \a -> a.s ! Indef ! GSg Masc ; lincat AP = {s : Species => GenNum => Str; isPre : Bool} ; lincat NP = {s : Role => Str; vocative: Str; a : Agr} ; -lincat Num = {s : Str; n : NNumber} ; +lincat Num, Card, ACard = {s : Str; n : NNumber} ; lincat Quant = {s : GenNum => Str; sp : Species} ; lincat Ord = {s : Species => GenNum => Str} ; lincat Det, DAP = {s : Gender => Str; n : NNumber; sp : Species} ; diff --git a/src/macedonian/NounMkd.gf b/src/macedonian/NounMkd.gf index 6c9a84d3..12441594 100644 --- a/src/macedonian/NounMkd.gf +++ b/src/macedonian/NounMkd.gf @@ -1,5 +1,5 @@ concrete NounMkd of Noun = CatMkd ** open Prelude,ResMkd in { - lin AdNum a c = {s = a.s ++ c.s} ; + lin AdNum a c = c ** {s = a.s ++ c.s} ; lin AdjCN ap cn = { s = case ap.isPre of { True => \\s,n => ap.s ! s @@ -82,10 +82,14 @@ concrete NounMkd of Noun = CatMkd ** open Prelude,ResMkd in { lin MassNP cn = {s = \\r => cn.s ! Indef ! Sg; vocative = cn.vocative ! Sg; a = {g = GSg cn.g; p = P3}} ; - lin NumCard c = {s = c.s; n = NNum Sg} ; - lin NumDecimal d = {s = d.s} ; - lin NumDigits d = {s = d.s} ; - lin NumNumeral n = {s = n.s} ; + lin NumCard c = c ; + lin NumDecimal, NumDigits, NumNumeral = \d -> { + s = d.s ; + n = case d.n of { + Sg => NNum Sg ; + Pl => NCountable + } + } ; lin NumPl = {s = []; n = NNum Pl} ; lin NumSg = {s = []; n = NNum Sg} ; lin UseN s = s ; diff --git a/src/macedonian/ParadigmsMkd.gf b/src/macedonian/ParadigmsMkd.gf index f4f7936e..52ff4150 100644 --- a/src/macedonian/ParadigmsMkd.gf +++ b/src/macedonian/ParadigmsMkd.gf @@ -1224,7 +1224,7 @@ mkConj : Str -> Number -> Conj = 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=""} ; -mkCard : Str -> Card = \s -> lin Card {s=s} ; -mkACard : Str -> ACard = \s -> lin ACard {s=s} ; +mkCard : Str -> Card = \s -> lin Card {s=s; n=NNum Sg} ; +mkACard : Str -> ACard = \s -> lin ACard {s=s; n=NNum Sg} ; }