updated all resource langs to Digits (russian, arabic not complete)

This commit is contained in:
aarne
2007-12-18 09:55:24 +00:00
parent 2d5f98dc05
commit f85ead01b3
23 changed files with 292 additions and 83 deletions

View File

@@ -58,12 +58,14 @@ concrete CatRus of Cat = CommonX ** open ResRus, Prelude in {
-- Gender parameter is due to multiple determiners (Numerals in Russian)
-- like "mnogo"
-- The determined noun has the case parameter specific for the determiner
QuantSg, QuantPl , Det = {s : AdjForm => Str; n: Number; g: PronGen; c: Case} ;
--- DEPREC QuantSg, QuantPl ,
Det = {s : AdjForm => Str; n: Number; g: PronGen; c: Case} ;
Predet, Quant= {s : AdjForm => Str; g: PronGen; c: Case} ;
-- Numeral
Num, Numeral = {s : Case => Gender => Str} ;
Num, Numeral = {s : Case => Gender => Str ; n : Number} ;
Digits = {s : Str ; n : Number} ; ----
-- Structural
-- The conjunction has an inherent number, which is used when conjoining

View File

@@ -58,29 +58,29 @@ concrete NounRus of Noun = CatRus ** open ResRus, Prelude, MorphoRus in {
DetSg quant ord = {
s = \\af => quant.s!af ++ ord.s!af ;
n = quant.n;
n = Sg ;
g = quant.g;
c = quant.c
} ;
DetPl quant num ord = {
s = \\af => quant.s !af ++ num.s! (caseAF af) ! (genAF af) ++ ord.s!af ;
n = Pl;
n = num.n; ---- ?? AR 18/12/2007
g = quant.g;
c = quant.c
} ;
SgQuant quant = {s = quant.s; c=quant.c; g=quant.g; n= Sg} ;
PlQuant quant = {s = quant.s ; c=quant.c; g=quant.g; n= Pl} ;
--- DEPREC SgQuant quant = {s = quant.s; c=quant.c; g=quant.g; n= Sg} ;
--- DEPREC PlQuant quant = {s = quant.s ; c=quant.c; g=quant.g; n= Pl} ;
PossPron p = {s = \\af => p.s ! mkPronForm (caseAF af) No (Poss (gNum (genAF af) (numAF af) )); c=Nom; g = PNoGen} ;
NoNum = {s = \\_,_ => []} ; -- cardinal numeral
NoNum = {s = \\_,_ => [] ; n = Pl} ; -- cardinal numeral
NoOrd = {s = \\_ => []} ; -- adjective
-- unclear how to tell apart the numbers from their string representation,
-- so just leave a decimal representation, without case-suffixes:
NumInt i = {s = table { _ => table {_ => i.s } } } ;
NumInt i = {s = table { _ => table {_ => i.s } } ; n = Pl} ;
OrdInt n = variants {} ; ---- TODO
-- case n of {
@@ -88,12 +88,14 @@ concrete NounRus of Noun = CatRus ** open ResRus, Prelude, MorphoRus in {
-- 3 => (ti_j_EndDecl n.s) ;
-- _ => uy_j_EndDecl n.s } ;
OrdNumeral numeral = variants {} ; ---- TODO
---- OrdNumeral numeral = variants {} ; ---- TODO
---- OrdDigits TODO
-- {s = \\ af => (uy_j_EndDecl (numeral.s ! caseAF af ! genAF af)).s!af} ;
NumNumeral n = n ;
NumDigits n = {s = \\_,_ => n.s ; n = n.n} ;
AdNum adn num = {s = \\c,n => adn.s ++ num.s!c!n} ;
AdNum adn num = {s = \\c,n => adn.s ++ num.s!c!n ; n = num.n} ;
OrdSuperl a = {s = a.s!Posit};

View File

@@ -12,7 +12,7 @@ lincat Sub100 = {s : Place => Gender => Str ; size : Size} ;
lincat Sub1000 = {s : Place => Gender => Str ; size : Size} ;
lincat Sub1000000 = {s : Gender => Str} ;
lin num x = {s = table{ _ => x.s }};
lin num x = {s = table{ _ => x.s } ; n = Pl}; ---- n TODO ; Size? AR 18/12/2007
lin n2 =
{s = table {{unit} => table {{Fem} => "две" ; _ => "два"} ;
@@ -99,5 +99,44 @@ lin pot3plus n m =
--- TODO
--- raz/odin
-- numerals as sequences of digits
lincat
Dig = TDigit ;
lin
IDig d = {s = d.s ; n = d.n} ;
IIDig d i = {
s = d.s ++ i.s ;
n = Pl
} ;
D_0 = mkDig "0" ;
D_1 = mk3Dig "1" "1" Sg ; ----
D_2 = mkDig "2" ;
D_3 = mkDig "3" ;
D_4 = mkDig "4" ;
D_5 = mkDig "5" ;
D_6 = mkDig "6" ;
D_7 = mkDig "7" ;
D_8 = mkDig "8" ;
D_9 = mkDig "9" ;
oper
mk2Dig : Str -> Str -> TDigit = \c,o -> mk3Dig c o Pl ;
mkDig : Str -> TDigit = \c -> mk2Dig c (c + "o") ;
mk3Dig : Str -> Str -> Number -> TDigit = \c,o,n -> {
s = c ; ---- gender
n = n
} ;
TDigit = {
n : Number ;
s : Str
} ;
}

View File

@@ -38,7 +38,7 @@ lin
everything_NP = UsePron (pronVseInanimate ** {lock_Pron=<>}) ;
everywhere_Adv = ss "везде" ;
few_Det = (ij_EndK_G_KH_Decl "немног") **{lock_Det= <>; n= Sg; g = PNoGen; c = Nom}; -- AMalenkij
first_Ord = (uy_j_EndDecl "перв" ) ** {lock_A = <>}; --AStaruyj
--- DEPREC first_Ord = (uy_j_EndDecl "перв" ) ** {lock_A = <>}; --AStaruyj
from_Prep = { s = "от" ; c = Gen };
he_Pron = pronOn ;
here_Adv = ss "здесь" ;
@@ -64,7 +64,7 @@ lin
no_Phr = ss ["Нет ."] ;
--on_Prep = { s = "на" ; c = Prepos };
on_Prep = { s = "на" ; c = Prepos2 }; -- +++ MG_UR: new case Prepos2 introduced! +++
one_Quant = odinDet ** {lock_QuantSg = <>; n= Sg; g = PNoGen; c = Nom };
--- DEPREC one_Quant = odinDet ** {lock_QuantSg = <>; n= Sg; g = PNoGen; c = Nom };
--AStaruyj :
only_Predet = (uy_j_EndDecl "единственн" ) ** {lock_Predet = <>; n= Sg; g = PNoGen; c = Nom };
or_Conj = ss "или" ** {n = Sg} ;