mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
Romanian numerals in utf8
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
concrete NumeralRon of Numeral = CatRon **
|
||||
open MorphoRon, CatRon, Prelude in {
|
||||
|
||||
flags coding = utf8 ;
|
||||
|
||||
param DForm = unit | teen | ten | teen_inf ;
|
||||
param Place = indep | attr ;
|
||||
|
||||
@@ -20,7 +22,7 @@ oper mkOrdinalForm : Str -> Gender -> Str =
|
||||
_ => two+"lea"
|
||||
};
|
||||
Fem => case two of
|
||||
{ x + ("ã"|"u") => x +"a";
|
||||
{ x + ("ă"|"u") => x +"a";
|
||||
x + "ei" => two + "a";
|
||||
x + "ii" => x + "ia" ;
|
||||
x + "i" => x + "ea";
|
||||
@@ -72,7 +74,7 @@ oper mkNumVSpc : Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str ->
|
||||
} ;
|
||||
|
||||
oper regNum : Str -> Digit =
|
||||
\trei -> mkNum trei (trei + "sprezece") (trei + "zeci") (trei + "ºpe") ;
|
||||
\trei -> mkNum trei (trei + "sprezece") (trei + "zeci") (trei + "şpe") ;
|
||||
|
||||
|
||||
oper mkMidF : Str -> Str -> Sub100 =
|
||||
@@ -111,17 +113,17 @@ lin num = \d ->
|
||||
} ;
|
||||
-- Latin A Supplement chars
|
||||
|
||||
lin n2 = mkNumVSpc "doi" "doispreze" "douãsprezece" "douãzeci" "douã" "doiºpe" "douãºpe" "doilea" "doua";
|
||||
lin n2 = mkNumVSpc "doi" "doispreze" "douăsprezece" "douăzeci" "două" "doişpe" "douăşpe" "doilea" "doua";
|
||||
lin n3 = regNum "trei";
|
||||
lin n4 = mkNum "patru" "paisprezece" "patruzeci" "paiºpe";
|
||||
lin n5 = mkNum "cinci" "cinsprezece" "cincizeci" "cinºpe";
|
||||
lin n6 = mkNum "ºase" "ºaisprezece" "ºaizeci" "ºaiºpe";
|
||||
lin n7 = mkNum "ºapte" "ºaptesprezece" "ºaptezeci" "ºaptispe";
|
||||
lin n8 = mkNum "opt" "optsprezece" "optzeci" "optiºpe";
|
||||
lin n9 = regNum "nouã";
|
||||
lin n4 = mkNum "patru" "paisprezece" "patruzeci" "paişpe";
|
||||
lin n5 = mkNum "cinci" "cinsprezece" "cincizeci" "cinşpe";
|
||||
lin n6 = mkNum "şase" "şaisprezece" "şaizeci" "şaişpe";
|
||||
lin n7 = mkNum "şapte" "şaptesprezece" "şaptezeci" "şaptispe";
|
||||
lin n8 = mkNum "opt" "optsprezece" "optzeci" "optişpe";
|
||||
lin n9 = regNum "nouă";
|
||||
|
||||
lin pot01 = let num = mkNumVSpc "un" "unsprezece" "unsprezece" "zece" "o" "unºpe" "unºpe" "dintâi" "dintâi" ;
|
||||
dep = mkNumVSpc "unu" "unsprezece" "unsprezece" "zece" "una" "unºpe" "unºpe" "unulea" "una"
|
||||
lin pot01 = let num = mkNumVSpc "un" "unsprezece" "unsprezece" "zece" "o" "unşpe" "unşpe" "dintâi" "dintâi" ;
|
||||
dep = mkNumVSpc "unu" "unsprezece" "unsprezece" "zece" "una" "unşpe" "unşpe" "unulea" "una"
|
||||
|
||||
in
|
||||
{ s = \\o,c => table {indep => num.s ! o ! c ;
|
||||
@@ -136,7 +138,7 @@ lin pot0 d = { s = \\o, c => \\_ => d.s ! o ! c ;
|
||||
|
||||
lin pot110 = mkMidF "zece" "zece" ;
|
||||
|
||||
lin pot111 = mkMidF "unsprezece" "unºpe" ;
|
||||
lin pot111 = mkMidF "unsprezece" "unşpe" ;
|
||||
|
||||
lin pot1to19 = \d ->
|
||||
{s = \\c => table { Formal => \\_ => d.s ! c ! teen ;
|
||||
@@ -159,8 +161,8 @@ lin pot1 = \d ->
|
||||
|
||||
lin pot1plus d e =
|
||||
{s = table {
|
||||
NCard g => \\_,_ => d.s ! (NCard g) ! ten ++ "ºi" ++ e.s ! (NCard g) ! unit ! attr ;
|
||||
NOrd g => \\_,_ => d.s ! (NCard g) ! ten ++ "ºi" ++ e.s ! (NOrd g) ! unit ! attr
|
||||
NCard g => \\_,_ => d.s ! (NCard g) ! ten ++ "şi" ++ e.s ! (NCard g) ! unit ! attr ;
|
||||
NOrd g => \\_,_ => d.s ! (NCard g) ! ten ++ "şi" ++ e.s ! (NOrd g) ! unit ! attr
|
||||
};
|
||||
size = pl
|
||||
};
|
||||
@@ -195,9 +197,9 @@ lin pot3plus n m =
|
||||
size = pl
|
||||
};
|
||||
|
||||
oper mksute : Size -> Str = \sz -> table {sg => "sutã" ; _ => "sute" } ! sz ;
|
||||
oper mksute : Size -> Str = \sz -> table {sg => "sută" ; _ => "sute" } ! sz ;
|
||||
oper mkSute : Size -> Gender -> Str = \sz, g ->
|
||||
table {sg => mkOrdinalForm "sutã" g ;
|
||||
table {sg => mkOrdinalForm "sută" g ;
|
||||
_ => mkOrdinalForm "sute" g } ! sz ;
|
||||
|
||||
oper mkmie : Size -> Str -> Str = \sz, attr ->
|
||||
|
||||
Reference in New Issue
Block a user