mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-07 02:02:51 -06:00
New order among numerals.
This commit is contained in:
@@ -1,15 +1,5 @@
|
||||
-- numerals in Polish, author Wojciech Mostowski, 20/9/2002
|
||||
|
||||
-- Did special Polish characters Harald Hammarstrom October 2003
|
||||
-- e, for e,
|
||||
-- c' for c'
|
||||
-- s' for s'
|
||||
-- a, for a,
|
||||
-- l/ for l/
|
||||
-- n' for n'
|
||||
-- z. for z.
|
||||
|
||||
|
||||
include numerals.Abs.gf ;
|
||||
|
||||
-- all different for unit digits, teens, tens and hundreds
|
||||
@@ -47,47 +37,47 @@ dwiescie };
|
||||
|
||||
oper mkRegNum1 : Str -> LinDigit =
|
||||
\siedem ->
|
||||
{ s = table { unit => siedem ; teen => siedem + "nas'cie" ;
|
||||
ten => siedem + "dziesia,t" ; hund => siedem + "set"
|
||||
{ s = table { unit => siedem ; teen => siedem + "nascie" ;
|
||||
ten => siedem + "dziesiat" ; hund => siedem + "set"
|
||||
};
|
||||
o = fiveup ; t = fiveup
|
||||
};
|
||||
oper mkRegNum2 : Str -> LinDigit =
|
||||
\pie ->
|
||||
{ s = table { unit => pie + "c'" ; teen => pie + "tnas'cie" ;
|
||||
ten => pie + "c'dziesia,t" ; hund => pie + "c'set"
|
||||
{ s = table { unit => pie + "c" ; teen => pie + "tnascie" ;
|
||||
ten => pie + "cdziesiat" ; hund => pie + "cset"
|
||||
};
|
||||
o = fiveup ; t = fiveup
|
||||
};
|
||||
|
||||
oper mkTh : Str -> ThForm => Str = \s ->
|
||||
table { onlyone => "tysia,c" ; lastone => s ++ "tysie,cy" ;
|
||||
twoorthreeorfour => s ++ "tysia,ce" ; fiveup => s ++ "tysie,cy"
|
||||
oper mkTh : ThForm => Str =
|
||||
table { onlyone => "tysiac" ; lastone => "tysiecy" ;
|
||||
twoorthreeorfour => "tysiace" ; fiveup => "tysiecy"
|
||||
};
|
||||
|
||||
oper ss : Str -> ThForm -> {s : Str ; t : ThForm} = \str -> \th -> {s = str; t = th}
|
||||
;
|
||||
|
||||
lin num x = {s = "/L" ++ x.s ++ "L/"} ; -- the Polish in Latin A supplement ;
|
||||
lin num x = x ;
|
||||
|
||||
lin n2 = mkNum "dwa" "dwanas'cie" "dwadzies'cia" "dwies'cie"
|
||||
lin n2 = mkNum "dwa" "dwanascie" "dwadziescia" "dwiescie"
|
||||
twoorthreeorfour ;
|
||||
lin n3 = mkNum "trzy" "trzynas'cie" "trzydzies'ci" "trzysta"
|
||||
lin n3 = mkNum "trzy" "trzynascie" "trzydziesci" "trzysta"
|
||||
twoorthreeorfour ;
|
||||
lin n4 = mkNum "cztery" "czternas'cie" (variants {"czterydzies'ci" ; "czterdzies'ci"}) "czterysta"
|
||||
lin n4 = mkNum "cztery" "czternascie" "czterdziesci" "czterysta"
|
||||
twoorthreeorfour ;
|
||||
lin n5 = mkRegNum2 "pie," ;
|
||||
lin n6 = mkNum "szes'c'" "szesnas'cie" "szes'c'dziesia,t" "szes'c'set" fiveup;
|
||||
lin n5 = mkRegNum2 "pie" ;
|
||||
lin n6 = mkNum "szesc" "szesnascie" "szescdziesiat" "szescset" fiveup;
|
||||
lin n7 = mkRegNum1 "siedem" ;
|
||||
lin n8 = mkRegNum1 "osiem" ;
|
||||
lin n9 = mkRegNum2 "dziewie," ;
|
||||
lin n9 = mkRegNum2 "dziewie" ;
|
||||
|
||||
lin pot01 = { s = table {hund => "sto"; f => "jeden" };
|
||||
o = onlyone ; t = lastone
|
||||
};
|
||||
lin pot0 d = {s = table {f => d.s ! f} ; o = d.o ; t = d.t} ;
|
||||
lin pot110 = ss "dziesie,c'" fiveup ;
|
||||
lin pot111 = ss "jedenas'cie" fiveup ;
|
||||
lin pot110 = ss "dziesiec" fiveup ;
|
||||
lin pot111 = ss "jedenascie" fiveup ;
|
||||
lin pot1to19 d = {s = d.s ! teen ; t = fiveup} ;
|
||||
lin pot0as1 n = {s = n.s ! unit ; t = n.o} ;
|
||||
lin pot1 d = {s = d.s ! ten ; t = fiveup} ;
|
||||
@@ -99,6 +89,6 @@ lin pot2plus d e = { s = d.s ! hund ++ e.s ;
|
||||
} ;
|
||||
|
||||
lin pot2as3 n = n ;
|
||||
lin pot3 n = {s = (mkTh n.s) ! n.t} ;
|
||||
lin pot3plus n m = {s = (mkTh n.s) ! n.t ++ m.s} ;
|
||||
lin pot3 n = {s = n.s ++ mkTh ! n.t} ;
|
||||
lin pot3plus n m = {s = n.s ++ mkTh ! n.t ++ m.s} ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user