(Som) WIP better handling of multiple modifiers and numerals

This commit is contained in:
Inari Listenmaa
2019-09-27 15:22:43 +02:00
parent 62641093dd
commit 3f30e0946e
6 changed files with 91 additions and 28 deletions
+12 -5
View File
@@ -40,6 +40,7 @@ lincat
Sub10, Sub100, Sub1000, Sub1000000 = {
s : DForm => Str ;
thousand : Str ; -- TODO figure out if this really works so
hasThousand : Bool ;
ord : Str ;
da : DefArticle ;
n : Number
@@ -64,25 +65,28 @@ lin n7 = mkNum2 "toddoba" "toddobaatan" ;
lin n8 = mkNum2Masc "siddeed" "siddeetan" ;
lin n9 = mkNum2Masc "sagaal" "sagaashan" ;
lin pot01 = n1.unit ** {n = Sg ; thousand = []} ;
lin pot01 = n1.unit ** {n = Sg ; thousand = [] ; hasThousand = False} ;
lin pot0 d = d.unit ** {n = Pl ; thousand = []} ;
lin pot0 d = d.unit ** {n = Pl ; thousand = [] ; hasThousand = False} ;
lin pot110 = n1.ten ** {
s = \\df => n1.ten.s ;
thousand = [] ;
hasThousand = False ;
n = Pl
} ;
lin pot111 = {
s = \\_ => "koob iyo" ++ n1.ten.s ;
ord = "koob iyo" ++ n1.ten.ord ;
thousand = [] ;
hasThousand = False ;
da = M KA ;
n = Pl
} ;
lin pot1to19 d = {
s = \\_ => d.unit.s ! Hal ++ "iyo" ++ n1.ten.s ;
thousand = [] ;
hasThousand = False ;
ord = d.unit.s ! Hal ++ "iyo" ++ n1.ten.ord ;
da = M KA ;
n = Pl
@@ -91,26 +95,31 @@ lin pot0as1 n = n ;
lin pot1 d = d.ten ** {
s = \\df => d.ten.s ;
thousand = [] ;
hasThousand = False ;
n = Pl
} ;
lin pot1plus d e = d.ten ** {
s = \\b => e.s ! b ++ "iyo" ++ d.ten.s ;
ord = e.s ! Hal ++ "iyo" ++ d.ten.ord ;
thousand = [] ;
hasThousand = False ;
n = Pl ;
} ;
lin pot1as2 n = n ;
lin pot2 d = d ** {
thousand = "boqol" ;
hasThousand = True ;
ord = d.s ! Hal ++ "boqlaad"
} ;
lin pot2plus d e = d ** {
thousand = "boqol iyo" ++ e.s ! Hal ;
hasThousand = True ;
ord = d.s ! Hal ++ "boqol iyo" ++ e.ord ;
n = Pl} ;
lin pot2as3 n = n ;
lin pot3 n = n ** {
thousand = n.thousand ++ "kun" ;
hasThousand = True ;
ord = n.s ! Hal ++ "kunaad" ;
n = Pl } ;
@@ -119,9 +128,7 @@ lin pot3plus n m = n ** {
ord = n.ord ++ "kun iyo" ++ m.ord ;
n = Pl} ;
--TODO:
-- two thousand small cats
-- => laba kun oo bisadood oo yar (kun and bisadood are both attributes)
----------------------------------------------------------------------------
lincat Dig = TDigit ;