mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-06 17:52:51 -06:00
Bulgarian: formal and informal numerals + small bugfix
This commit is contained in:
@@ -5,19 +5,19 @@ concrete NumeralBul of Numeral = CatBul ** open Prelude, ResBul in {
|
||||
lincat
|
||||
Digit = {s : DForm => CardOrd => Str} ;
|
||||
Sub10 = {s : DForm => CardOrd => Str; n : Number} ;
|
||||
Sub100 = {s : CardOrd => Str; n : Number; i : Bool} ;
|
||||
Sub1000 = {s : CardOrd => Str; n : Number; i : Bool} ;
|
||||
Sub1000000 = {s : CardOrd => Str; n : Number} ;
|
||||
Sub100 = {s : CardOrd => NumF => Str; n : Number; i : Bool} ;
|
||||
Sub1000 = {s : CardOrd => NumF => Str; n : Number; i : Bool} ;
|
||||
Sub1000000 = {s : CardOrd => NumF => Str; n : Number} ;
|
||||
|
||||
lin num x = x ;
|
||||
lin n2 = mkDigit "äâà" "äâàìà" "äâå" "âòîðè" "äâåñòà" ;
|
||||
lin n3 = mkDigit "òðè" "òðèìà" "òðè" "òðåòè" "òðèñòà" ;
|
||||
lin n4 = mkDigit "÷åòèðè" "÷åòèðèìà" "÷åòèðè" "÷åòâúðòè" "÷åòèðèñòîòèí" ;
|
||||
lin n5 = mkDigit "ïåò" "ïåòèìà" "ïåò" "ïåòè" "ïåòñòîòèí" ;
|
||||
lin n6 = mkDigit "øåñò" "øåñòèìà" "øåñò" "øåñòè" "øåñòñòîòèí" ;
|
||||
lin n7 = mkDigit "ñåäåì" "ñåäìèíà" "ñåäåì" "ñåäìè" "ñåäåìñòîòèí" ;
|
||||
lin n8 = mkDigit "îñåì" "îñìèíà" "îñåì" "îñìè" "îñåìñòîòèí" ;
|
||||
lin n9 = mkDigit "äåâåò" "äåâåòèìà" "äåâåò" "äåâåòè" "äåâåòñòîòèí" ;
|
||||
lin num x = {s = \\c => x.s ! c ! Formal; n=x.n} ;
|
||||
lin n2 = mkDigit "äâà" "äâàìà" "äâå" "âòîðè" "äâàéñåò" "äâåñòà" ;
|
||||
lin n3 = mkDigit "òðè" "òðèìà" "òðè" "òðåòè" "òðèéñåò" "òðèñòà" ;
|
||||
lin n4 = mkDigit "÷åòèðè" "÷åòèðèìà" "÷åòèðè" "÷åòâúðòè" "÷åòèðèéñåò" "÷åòèðèñòîòèí" ;
|
||||
lin n5 = mkDigit "ïåò" "ïåòèìà" "ïåò" "ïåòè" "ïåòäåñåò" "ïåòñòîòèí" ;
|
||||
lin n6 = mkDigit "øåñò" "øåñòèìà" "øåñò" "øåñòè" "øåéñåò" "øåñòñòîòèí" ;
|
||||
lin n7 = mkDigit "ñåäåì" "ñåäìèíà" "ñåäåì" "ñåäìè" "ñåäåìäåñåò" "ñåäåìñòîòèí" ;
|
||||
lin n8 = mkDigit "îñåì" "îñìèíà" "îñåì" "îñìè" "îñåìäåñåò" "îñåìñòîòèí" ;
|
||||
lin n9 = mkDigit "äåâåò" "äåâåòèìà" "äåâåò" "äåâåòè" "äåâåòäåñåò" "äåâåòñòîòèí" ;
|
||||
|
||||
lin pot01 =
|
||||
{s = table {
|
||||
@@ -44,40 +44,43 @@ lin pot01 =
|
||||
APl Def => "ïúðâèòå"
|
||||
}
|
||||
} ;
|
||||
teen => mkCardOrd "åäèíàäåñåò" "åäèíàäåñåòèìà" "åäèíàäåñåò" "åäèíàäåñåòè" ;
|
||||
ten => mkCardOrd "äåñåò" "äåñåòèìà" "äåñåò" "äåñåòè" ;
|
||||
hundred => mkCardOrd "ñòî" "ñòîòèíà" "ñòî" "ñòîòåí"
|
||||
teen nf => case nf of {
|
||||
Formal => mkCardOrd "åäèíàäåñåò" "åäèíàäåñåòèìà" "åäèíàäåñåò" "åäèíàäåñåòè" ;
|
||||
Informal => mkCardOrd "åäèíàéñåò" "åäèíàéñåò" "åäèíàéñåò" "åäèíàéñòè"
|
||||
} ;
|
||||
ten nf => mkCardOrd "äåñåò" "äåñåòèìà" "äåñåò" "äåñåòè" ;
|
||||
hundred => mkCardOrd100 "ñòî" "ñòîòåí"
|
||||
}
|
||||
;n = Sg
|
||||
} ;
|
||||
lin pot0 d = d ** {n = Pl} ;
|
||||
|
||||
lin pot110 = {s=pot01.s ! ten; n = Pl; i = True} ;
|
||||
lin pot111 = {s=pot01.s ! teen; n = Pl; i = True} ;
|
||||
lin pot1to19 d = {s = d.s ! teen; n = Pl; i = True} ;
|
||||
lin pot0as1 n = {s = n.s ! unit; n = n.n; i = True} ;
|
||||
lin pot1 d = {s = d.s ! ten; n = Pl; i = True} ;
|
||||
lin pot110 = {s=\\c,nf => pot01.s ! ten nf ! c; n = Pl; i = True} ;
|
||||
lin pot111 = {s=\\c,nf => pot01.s ! teen nf ! c; n = Pl; i = True} ;
|
||||
lin pot1to19 d = {s = \\c,nf => d.s ! teen nf ! c; n = Pl; i = True} ;
|
||||
lin pot0as1 n = {s = \\c,nf => n.s ! unit ! c; n = n.n; i = True} ;
|
||||
lin pot1 d = {s = \\c,nf => d.s ! ten nf ! c; n = Pl; i = True} ;
|
||||
lin pot1plus d e = {
|
||||
s = \\c => d.s ! ten ! NCard DMascIndef ++ "è" ++ e.s ! unit ! c ; n = Pl; i = False} ;
|
||||
s = \\c,nf => d.s ! ten nf ! NCard DMascIndef ++ "è" ++ e.s ! unit ! c ; n = Pl; i = False} ;
|
||||
|
||||
lin pot1as2 n = n ;
|
||||
lin pot2 n = {s = \\c => n.s ! hundred ! c; n = Pl; i = True} ;
|
||||
lin pot2 n = {s = \\c,nf => n.s ! hundred ! c; n = Pl; i = True} ;
|
||||
lin pot2plus d e = {
|
||||
s = \\c => d.s ! hundred ! NCard DMascIndef ++ case e.i of {False => []; True => "è"} ++ e.s ! c ;
|
||||
s = \\c,nf => d.s ! hundred ! NCard DMascIndef ++ case e.i of {False => []; True => "è"} ++ e.s ! c ! nf ;
|
||||
n = Pl ;
|
||||
i = False
|
||||
} ;
|
||||
|
||||
lin pot2as3 n = n ;
|
||||
lin pot3 n = {
|
||||
s = \\c => case n.n of {
|
||||
Sg => mkCardOrd "õèëÿäà" "õèëÿäà" "õèëÿäà" "õèëÿäåí" ! c ;
|
||||
Pl => n.s ! NCard DFemIndef ++ mkCardOrd "õèëÿäè" "õèëÿäè" "õèëÿäè" "õèëÿäåí" ! c
|
||||
} ;
|
||||
s = \\c,nf => case n.n of {
|
||||
Sg => mkCardOrd100 "õèëÿäà" "õèëÿäåí" ! c ;
|
||||
Pl => n.s ! NCard DFemIndef ! nf ++ mkCardOrd100 "õèëÿäè" "õèëÿäåí" ! c
|
||||
} ;
|
||||
n = Pl
|
||||
} ;
|
||||
lin pot3plus n m = {
|
||||
s = \\c => (pot3 (n ** {lock_Sub1000=<>})).s ! NCard DMascIndef ++ case m.i of {False => []; True => "è"} ++ m.s ! c ;
|
||||
s = \\c,nf => (pot3 (n ** {lock_Sub1000=<>})).s ! NCard DMascIndef ! nf ++ case m.i of {False => []; True => "è"} ++ m.s ! c ! nf ;
|
||||
n = Pl
|
||||
} ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user