summaryrefslogtreecommitdiff
path: root/next-lib/src/french
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-12-01 18:02:08 +0000
committeraarne <aarne@cs.chalmers.se>2008-12-01 18:02:08 +0000
commit3efc24bbeac98f56653b4465efc8f734491fef20 (patch)
tree6b38b7a021fe559ca1771d827684f933c81955f3 /next-lib/src/french
parent22112ca160a131bccc3d06c7b880a3dca843ca17 (diff)
fixed the gender of French numeral "un"
Diffstat (limited to 'next-lib/src/french')
-rw-r--r--next-lib/src/french/MorphoFre.gf4
-rw-r--r--next-lib/src/french/NumeralFre.gf82
2 files changed, 57 insertions, 29 deletions
diff --git a/next-lib/src/french/MorphoFre.gf b/next-lib/src/french/MorphoFre.gf
index 1bd470097..05ecbc925 100644
--- a/next-lib/src/french/MorphoFre.gf
+++ b/next-lib/src/french/MorphoFre.gf
@@ -1234,9 +1234,5 @@ oper
t => s + tavoir ! t
} ;
---- for Numerals
-
-param DForm = unit | teen | jten | ten | tenplus ;
-param Place = indep | attr ;
}
diff --git a/next-lib/src/french/NumeralFre.gf b/next-lib/src/french/NumeralFre.gf
index 23a8ab43d..73d07dfdf 100644
--- a/next-lib/src/french/NumeralFre.gf
+++ b/next-lib/src/french/NumeralFre.gf
@@ -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} ;