GF Russian Resource Library
GF Russian Resource Library
GF Russian Resource Library
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
}<br />
pot01 : Sub10 ; -- 1<br />
pot0 : Digit -> Sub10 ; -- d * 1<br />
pot110 : Sub100 ; -- 10<br />
pot111 : Sub100 ; -- 11<br />
pot1to19 : Digit -> Sub100 ; -- 10 + d<br />
pot0as1 : Sub10 -> Sub100 ; -- coercion of 1..9<br />
pot1 : Digit -> Sub100 ; -- d * 10<br />
pot1plus : Digit -> Sub10 -> Sub100 ; -- d * 10 + n<br />
pot1as2 : Sub100 -> Sub1000 ; -- coercion of 1..99<br />
pot2 : Sub10 -> Sub1000 ; -- m * 100<br />
pot2plus : Sub10 -> Sub100 -> Sub1000 ; -- m * 100 + n<br />
pot2as3 : Sub1000 -> Sub1000000 ; -- coercion of 1..999<br />
pot3 : Sub1000 -> Sub1000000 ; -- m * 1000<br />
pot3plus : Sub1000 -> Sub1000 -> Sub1000000 ; -- m * 1000 + n<br />
10.2 <strong>Russian</strong> Implementation<br />
<strong>Russian</strong> implementation of Numeral API (concrete syntax for <strong>Russian</strong>) 1 . Cardinal<br />
numerals only. Cases are not included in the present description.<br />
concrete NumeralRus of Numeral = CatRus ** open ResRus in {<br />
flags coding=utf8 ;<br />
lincat<br />
Digit = {s : DForm => Gender => Str ; size : Size} ;<br />
Sub10 = {s : Place => DForm => Gender => Str ; size : Size} ;<br />
Sub100 = {s : Place => Gender => Str ; size : Size} ;<br />
Sub1000 = {s : Place => Gender => Str ; size : Size} ;<br />
Sub1000000 = {s : Gender => Str} ;<br />
lin<br />
num x = {s = table{ _ => x.s }};<br />
n2 = {s = table {<br />
{unit} => table {<br />
{Fem} => "dve" ;<br />
=> "dva" };<br />
{teen} => gg "dvenadcatь" ;<br />
{ten} => gg "dvadcatь" ;<br />
{hund} => gg "dvesti" };<br />
size = sgg} ;<br />
n3 = {s = table {<br />
{unit} => gg "tri" ;<br />
{teen} => gg "trinadcatь" ;<br />
{ten} => gg "tridcatь" ;<br />
{hund} => gg "trista" };<br />
1 Implemented by Arto Mustajoki and Aarne Ranta.<br />
39