fix number agreement with decimals

This commit is contained in:
Krasimir Angelov
2026-08-24 14:03:38 +02:00
parent 4c23ca2116
commit 5995be8940
3 changed files with 13 additions and 8 deletions
+2 -1
View File
@@ -17,6 +17,7 @@ lincat Pron = Pronoun ;
lincat Prep = Compl ; lincat Prep = Compl ;
lincat Decimal = {s : Str; n : Number; hasDot : Bool} ; lincat Decimal = {s : Str; n : Number; hasDot : Bool} ;
lincat Digits = {s : Str; n : Number; tail : DTail} ; lincat Digits = {s : Str; n : Number; tail : DTail} ;
lincat Numeral = {s : Str; n : Number} ;
linref N,N2,N3 = \n -> n.s ! Indef ! Sg ; linref N,N2,N3 = \n -> n.s ! Indef ! Sg ;
linref V, VA, VV, VS, VQ, V2, V2S, V2Q, V3, V2A, V2V = 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 AP = {s : Species => GenNum => Str; isPre : Bool} ;
lincat NP = {s : Role => Str; vocative: Str; a : Agr} ; 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 Quant = {s : GenNum => Str; sp : Species} ;
lincat Ord = {s : Species => GenNum => Str} ; lincat Ord = {s : Species => GenNum => Str} ;
lincat Det, DAP = {s : Gender => Str; n : NNumber; sp : Species} ; lincat Det, DAP = {s : Gender => Str; n : NNumber; sp : Species} ;
+9 -5
View File
@@ -1,5 +1,5 @@
concrete NounMkd of Noun = CatMkd ** open Prelude,ResMkd in { 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 = { lin AdjCN ap cn = {
s = case ap.isPre of { s = case ap.isPre of {
True => \\s,n => ap.s ! s 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; lin MassNP cn = {s = \\r => cn.s ! Indef ! Sg;
vocative = cn.vocative ! Sg; vocative = cn.vocative ! Sg;
a = {g = GSg cn.g; p = P3}} ; a = {g = GSg cn.g; p = P3}} ;
lin NumCard c = {s = c.s; n = NNum Sg} ; lin NumCard c = c ;
lin NumDecimal d = {s = d.s} ; lin NumDecimal, NumDigits, NumNumeral = \d -> {
lin NumDigits d = {s = d.s} ; s = d.s ;
lin NumNumeral n = {s = n.s} ; n = case d.n of {
Sg => NNum Sg ;
Pl => NCountable
}
} ;
lin NumPl = {s = []; n = NNum Pl} ; lin NumPl = {s = []; n = NNum Pl} ;
lin NumSg = {s = []; n = NNum Sg} ; lin NumSg = {s = []; n = NNum Sg} ;
lin UseN s = s ; lin UseN s = s ;
+2 -2
View File
@@ -1224,7 +1224,7 @@ mkConj : Str -> Number -> Conj =
mkPConj : Str -> PConj = \s -> lin PConj {s=s} ; mkPConj : Str -> PConj = \s -> lin PConj {s=s} ;
mkPredet : Str -> Predet = \s -> lin Predet {s=s} ; mkPredet : Str -> Predet = \s -> lin Predet {s=s} ;
mkCAdv : Str -> CAdv = \s -> lin CAdv {s=s; p=""} ; mkCAdv : Str -> CAdv = \s -> lin CAdv {s=s; p=""} ;
mkCard : Str -> Card = \s -> lin Card {s=s} ; mkCard : Str -> Card = \s -> lin Card {s=s; n=NNum Sg} ;
mkACard : Str -> ACard = \s -> lin ACard {s=s} ; mkACard : Str -> ACard = \s -> lin ACard {s=s; n=NNum Sg} ;
} }