fixed the gender of French numeral "un"

This commit is contained in:
aarne
2008-12-01 18:02:08 +00:00
parent 461ec34e5b
commit 80512723e4
5 changed files with 63 additions and 32 deletions

View File

@@ -4,7 +4,7 @@ all: magnet
magnet:
# gfc --make -src --parser=off --name=fre BronzeageFre.gf +RTS -K100M
gfc --make -src --erasing=on --name=bul BronzeageBul.gf
# gfc --make -src --erasing=on --name=bul BronzeageBul.gf
gfc --make -src --parser=off --name=fin BronzeageFin.gf
gfc --make -src --erasing=on --name=ger BronzeageGer.gf
gfc --make -src BronzeageEng.gf BronzeageSwe.gf BronzeageIta.gf

View File

@@ -1234,9 +1234,5 @@ oper
t => s + tavoir ! t
} ;
--- for Numerals
param DForm = unit | teen | jten | ten | tenplus ;
param Place = indep | attr ;
}

View File

@@ -13,7 +13,7 @@ oper
case co of {
NCard _ => ds ;
NOrd _ _ => case last ds of {
"q" => "uième" ;
"q" => ds + "uième" ;
"e" => init ds + "ième" ;
_ => ds + "ième"
}
@@ -21,14 +21,27 @@ oper
inh = d.inh ; n = d.n
} ;
cardOrdG : CardOrd -> (_,_,_,_,_,_ : Str) -> Str =
\co,x,xf,sm,sf,pm,pf -> case co of {
NCard Masc => x ;
NCard Fem => xf ;
NOrd Masc Sg => sm ;
NOrd Fem Sg => sf ;
NOrd Masc Pl => pm ;
NOrd Fem Pl => pf
} ;
cardOrd : CardOrd -> Str -> Str -> Str = \co, x,y -> case co of {
NCard _ => x ;
NOrd _ _ => y
} ;
param DForm = unit | teen | jten | ten | tenplus ;
param Place = indep | postpo | attr ;
lincat
Digit = {s : CardOrd => DForm => Str ; inh : DForm ; n : Number} ;
Sub10 = {s : CardOrd => {p1 : DForm ; p2 : Place} => Str ; inh : Number} ;
Sub10 = {s : CardOrd => (DForm * Place) => Str ; inh : Number} ;
Sub100 = {s : CardOrd => Place => Str ; n : Number} ;
Sub1000 = {s : CardOrd => Place => Str ; n : Number} ;
Sub1000000 = {s : CardOrd => Str ; n : Number} ;
@@ -40,7 +53,7 @@ lin n2 =
lin n3 =
digitPl {inh = unit ; n = Sg ; s = table {unit => "trois" ; teen => "treize" ; jten => "trente" ; ten => "trente" ; tenplus => "trente"}} ;
lin n4 =
digitPl {inh = unit ; n = Sg ; s = table {unit => "quatre" ; teen => "quatorze" ; jten => "quarante" ; ten => "quarante" ; tenplus => "quarante"}} ;
digitPl {inh = unit ; n = Sg ; s = table {unit => "quatre" ; teen => "quatorze" ; jten => "quarante" ; ten => "quarante" ; tenplus => "quarante"}} ;
lin n5 =
digitPl {inh = unit ; n = Sg ; s = table {unit => "cinq" ; teen => "quinze" ; jten => "cinquante" ; ten => "cinquante" ; tenplus => "cinquante"}} ;
lin n6 =
@@ -54,56 +67,75 @@ lin n9 =
lin pot01 =
{inh = Sg ; s = \\g => let dix = cardOrd g "dix" "dixième" in table {
{p1 = unit ; p2 = indep} => cardOrd g "un" "unième" ; {p1 = unit ; p2 = attr} => [] ; {p1 = teen ;
p2 = indep} => cardOrd g "onze" "onzième" ; {p1 = teen ; p2 = attr} => [] ; {p1 = jten ;
p2 = indep} => dix ; {p1 = jten ; p2 = attr} => [] ; {p1 = ten ;
p2 = indep} => dix ; {p1 = ten ; p2 = attr} => [] ; {p1 = tenplus
; p2 = indep} => dix ; {p1 = tenplus ; p2 = attr} => []} ; n = Sg} ;
{p1 = unit ; p2 = indep} =>
cardOrdG g "un" "une" "premier" "première" "premiers" "premières" ;
{p1 = unit ; p2 = postpo} =>
cardOrdG g "un" "une" "unième" "unième" "unième" "unième" ;
{p1 = unit ; p2 = attr} => [] ;
{p1 = teen ; p2 = indep | postpo} => cardOrd g "onze" "onzième" ;
{p1 = teen ; p2 = attr} => [] ;
{p1 = jten ; p2 = indep | postpo} => dix ;
{p1 = jten ; p2 = attr} => [] ;
{p1 = ten ; p2 = indep | postpo} => dix ;
{p1 = ten ; p2 = attr} => [] ;
{p1 = tenplus ; p2 = indep | postpo} => dix ;
{p1 = tenplus ; p2 = attr} => []} ;
n = Sg} ;
lin pot0 d =
{inh = Pl ; s = \\g => table {{p1 = unit ; p2 = indep} => d.s ! g ! unit
; {p1 = unit ; p2 = attr} => d.s ! g ! unit ; {p1 = teen ; p2 = indep}
=> d.s ! g ! teen ; {p1 = teen ; p2 = attr} => d.s ! g ! teen ; {p1 = jten ;
p2 = indep} => d.s ! g ! jten ; {p1 = jten ; p2 = attr} => d.s ! g ! jten ;
{p1 = ten ; p2 = indep} => d.s ! g ! ten ; {p1 = ten ; p2 = attr} => d.s
! g ! ten ; {p1 = tenplus ; p2 = indep} => d.s ! g ! tenplus ; {p1 = tenplus
; p2 = attr} => d.s ! g ! tenplus} ; n = Pl} ;
{inh = Pl ; s = \\g => table {
{p1 = unit ; p2 = indep | postpo} => d.s ! g ! unit ;
{p1 = unit ; p2 = attr} => d.s ! g ! unit ;
{p1 = teen ; p2 = indep | postpo} => d.s ! g ! teen ;
{p1 = teen ; p2 = attr} => d.s ! g ! teen ;
{p1 = jten ; p2 = indep | postpo} => d.s ! g ! jten ;
{p1 = jten ; p2 = attr} => d.s ! g ! jten ;
{p1 = ten ; p2 = indep | postpo} => d.s ! g ! ten ;
{p1 = ten ; p2 = attr} => d.s ! g ! ten ;
{p1 = tenplus ; p2 = indep | postpo} => d.s ! g ! tenplus ;
{p1 = tenplus ; p2 = attr} => d.s ! g ! tenplus} ; n = Pl} ;
lin pot110 =
{s = \\g => table {_ => cardOrd g "dix" "dixième"} ; n = Pl} ;
lin pot111 =
{s = \\g => table {_ => cardOrd g "onze" "onzième"} ; n = Pl} ;
lin pot1to19 d =
{s = \\g => table {indep => d.s ! g ! teen ; attr => d.s ! g ! teen} ; n = Pl} ;
{s = \\g => table {indep | postpo => d.s ! g ! teen ; attr => d.s ! g ! teen} ; n = Pl} ;
lin pot0as1 n =
{s = \\g => table {indep => n.s ! g ! {p1 = unit ; p2 = indep} ;
{s = \\g => table {
p@(indep | postpo) => n.s ! g ! {p1 = unit ; p2 = p} ;
attr => n.s ! g ! {p1 = unit ; p2 = attr}} ; n = n.inh} ;
lin pot1 d =
{s = \\g => table {indep => d.s ! g ! jten ; attr => d.s ! g ! ten}
{s = \\g => table {indep | postpo => d.s ! g ! jten ; attr => d.s ! g ! ten}
; n = Pl} ;
lin pot1plus d e =
{s = \\g => table {indep => (d.s ! (NCard Masc) ! tenplus) ++ (table {{p1 = Sg
{s = \\g => table {
p@(indep | postpo) => (d.s ! (NCard Masc) ! tenplus) ++ (table {{p1 = Sg
; p2 = Sg} => "et" ; {p1 = Sg ; p2 = pl} => "-" ; {p1 = Pl ; p2 =
Sg} => "-" ; {p1 = Pl ; p2 = pl} => "-"} ! {p1 = d.n ; p2 =
e.inh}) ++ e.s ! g ! {p1 = d.inh ; p2 = indep} ; attr => (d.s ! (NCard Masc) !
e.inh}) ++ e.s ! g ! {p1 = d.inh ; p2 = p} ;
attr => (d.s ! (NCard Masc) !
tenplus) ++ (table {{p1 = Sg ; p2 = Sg} => "et" ; {p1 = Sg ; p2 =
pl} => "-" ; {p1 = Pl ; p2 = Sg} => "-" ; {p1 = Pl ; p2 = pl} =>
"-"} ! {p1 = d.n ; p2 = e.inh}) ++ e.s ! g ! {p1 = d.inh ; p2 =
indep}} ; n = Pl} ;
lin pot1as2 n = n ;
lin pot2 d =
{s = \\g => table {indep => (d.s ! NCard Masc ! {p1 = unit ; p2 = attr})
{s = \\g => table {indep | postpo => (d.s ! NCard Masc ! {p1 = unit ; p2 = attr})
++ table {Sg => cardOrd g "cent" "centième" ; Pl => cardOrd g "cents" "centième"} ! (d.inh) ; attr => (d.s !
NCard Masc ! {p1 = unit ; p2 = attr}) ++ cardOrd g "cent" "centième"} ; n = Pl} ;
lin pot2plus d e =
{s = \\g => table {indep => (d.s ! NCard Masc ! {p1 = unit ; p2 = attr})
++ "cent" ++ e.s ! g ! indep ; attr => (d.s ! NCard Masc ! {p1 = unit ; p2
= attr}) ++ "cent" ++ e.s ! g ! indep} ; n = Pl} ;
{s = \\g => table {
attr => (d.s ! NCard Masc ! {p1 = unit ; p2 = attr}) ++ "cent" ++ e.s ! g ! indep ;
p => (d.s ! NCard Masc ! {p1 = unit ; p2 = attr}) ++ "cent" ++ e.s ! g ! p
} ;
n = Pl
} ;
lin pot2as3 n =
{s = \\g => n.s ! g ! indep ; n = n.n} ;
lin pot3 n =
{s = \\g => (n.s ! NCard Masc ! attr) ++ cardOrd g "mille" "millième" ; n = Pl} ;
lin pot3plus n m =
{s = \\g => (n.s ! NCard Masc ! attr) ++ "mille" ++ m.s ! g ! indep ; n =
{s = \\g => (n.s ! NCard Masc ! attr) ++ "mille" ++ m.s ! g ! postpo ; n =
Pl} ;

View File

@@ -323,7 +323,7 @@ mkV2 : overload {
mk6N hund hund hund hund hunde hunden g ;
<_,_ + ("n" | "s"), Fem> => -- IX,X
mk6N hund hund hund hund hunde hunde g ;
_ => regN hund
_ => {s = (regN hund).s ; g = g ; lock_N = <>}
} ;
mkN2 = overload {

View File

@@ -23,7 +23,10 @@ lin pot01 =
let uno = (mkTal "uno" "undici" "dieci" "primo").s in
{s =\\f,g => case f of {
ental pred => [] ;
_ => uno ! f ! g
_ => case g of {
NCard Fem => "una" ;
_ => uno ! f ! g
}
} ;
n = Sg} ;