forked from GitHub/gf-core
completed French ordinals and thereby French/Romance
This commit is contained in:
@@ -593,7 +593,7 @@ a <b>lock field</b>,
|
|||||||
cat C ; ===> oper C : Type = T ** {lock_C : {}} ;
|
cat C ; ===> oper C : Type = T ** {lock_C : {}} ;
|
||||||
lincat C = T ;
|
lincat C = T ;
|
||||||
|
|
||||||
fun f : C_1 ... C_n -> C ; ===> oper f : A = \x_1,...,x_n ->
|
fun f : C_1 ... C_n -> C ; ===> oper f : C_1 ... C_n -> C = \x_1,...,x_n ->
|
||||||
lin f = t ; t x_1 ... x_n ** {lock_C = <>};
|
lin f = t ; t x_1 ... x_n ** {lock_C = <>};
|
||||||
</pre>
|
</pre>
|
||||||
(Notice that the latter translation is type-correct because of
|
(Notice that the latter translation is type-correct because of
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ When will it be ready? Hopefully around February 2005.
|
|||||||
|
|
||||||
---------- later history and status:
|
---------- later history and status:
|
||||||
|
|
||||||
|
24/1 French complete, as well as the Romance parametrized modules.
|
||||||
|
|
||||||
20/1 Main difficulties of French and Romance implemented. Also
|
20/1 Main difficulties of French and Romance implemented. Also
|
||||||
ParadigmsFre and fragments of LangFre.
|
ParadigmsFre and fragments of LangFre.
|
||||||
|
|
||||||
|
|||||||
@@ -1332,15 +1332,9 @@ oper
|
|||||||
t => s + tavoir ! t
|
t => s + tavoir ! t
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- for NumeralsFre
|
--- for Numerals
|
||||||
|
|
||||||
param DForm = unit | teen | jten | ten | tenplus ;
|
param DForm = unit | teen | jten | ten | tenplus ;
|
||||||
param Place = indep | attr ;
|
param Place = indep | attr ;
|
||||||
|
|
||||||
oper
|
|
||||||
digitPl :
|
|
||||||
{inh : DForm ; inh1 : Number ; s : DForm => Str} ->
|
|
||||||
{inh : DForm ; inh1 : Number ; s : Gender => DForm => Str ; n : Number} = \d ->
|
|
||||||
{inh = d.inh ; inh1 = d.inh1 ; s = \\_ => d.s ; n = Pl} ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,39 @@
|
|||||||
concrete NumeralFre of Numeral = CatFre ** open ResRomance, MorphoFre in {
|
concrete NumeralFre of Numeral = CatFre **
|
||||||
|
open CommonRomance, ResRomance, MorphoFre, Prelude in {
|
||||||
|
|
||||||
-- originally written in 1998, automatically translated to current notation...
|
-- originally written in 1998, automatically translated to current notation...
|
||||||
|
-- last modified 24/1/2006, adding ordinals
|
||||||
|
|
||||||
|
-- Auxiliaries
|
||||||
|
|
||||||
|
oper
|
||||||
|
digitPl : {s : DForm => Str; inh : DForm ; inh1 : Number} ->
|
||||||
|
{s : CardOrd => DForm => Str ; inh : DForm ; inh1 : Number} = \d -> {
|
||||||
|
s = \\co,df => let ds = d.s ! df in
|
||||||
|
case co of {
|
||||||
|
NCard _ => ds ;
|
||||||
|
NOrd _ _ => case last ds of {
|
||||||
|
"q" => "uième" ;
|
||||||
|
"e" => init ds + "ième" ;
|
||||||
|
_ => ds + "ième"
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
inh = d.inh ; inh1 = d.inh1
|
||||||
|
} ;
|
||||||
|
|
||||||
|
cardOrd : CardOrd -> Str -> Str -> Str = \co, x,y -> case co of {
|
||||||
|
NCard _ => x ;
|
||||||
|
NOrd _ _ => y
|
||||||
|
} ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Digit = {inh : DForm ; inh1 : Number ; s : Gender => DForm => Str ; n : Number} ;
|
Digit = {s : CardOrd => DForm => Str ; inh : DForm ; inh1 : Number} ;
|
||||||
Sub10 = {inh : Number ; s : Gender => {p1 : DForm ; p2 : Place} => Str ; n : Number} ;
|
Sub10 = {s : CardOrd => {p1 : DForm ; p2 : Place} => Str ; inh : Number} ;
|
||||||
Sub100 = {s : Gender => Place => Str ; n : Number} ;
|
Sub100 = {s : CardOrd => Place => Str} ;
|
||||||
Sub1000 = {s : Gender => Place => Str ; n : Number} ;
|
Sub1000 = {s : CardOrd => Place => Str} ;
|
||||||
Sub1000000 = {s : Gender => Str ; n : Number} ;
|
Sub1000000 = {s : CardOrd => Str} ;
|
||||||
|
|
||||||
lin num x0 = {s = \\_ => x0.s ! Masc} ; ---- ord
|
lin num x0 = x0 ;
|
||||||
|
|
||||||
lin n2 =
|
lin n2 =
|
||||||
digitPl {inh = unit ; inh1 = Sg ; s = table {unit => "deux" ; teen => "douze" ; jten => "vingt" ; ten => "vingt" ; tenplus => "vingt"}} ;
|
digitPl {inh = unit ; inh1 = Sg ; s = table {unit => "deux" ; teen => "douze" ; jten => "vingt" ; ten => "vingt" ; tenplus => "vingt"}} ;
|
||||||
@@ -22,18 +46,19 @@ lin n5 =
|
|||||||
lin n6 =
|
lin n6 =
|
||||||
digitPl {inh = unit ; inh1 = Sg ; s = table {unit => "six" ; teen => "seize" ; jten => "soixante" ; ten => "soixante" ; tenplus => "soixante"}} ;
|
digitPl {inh = unit ; inh1 = Sg ; s = table {unit => "six" ; teen => "seize" ; jten => "soixante" ; ten => "soixante" ; tenplus => "soixante"}} ;
|
||||||
lin n7 =
|
lin n7 =
|
||||||
digitPl {inh = teen ; inh1 = Sg ; s = table {unit => "sept" ; teen => "dix" ++ "-" ++ "sept" ; jten => "soixante" ++ "-" ++ "dix" ; ten => "soixante" ++ "-" ++ "dix" ; tenplus => "soixante"}} ;
|
digitPl {inh = teen ; inh1 = Sg ; s = table {unit => "sept" ; teen => "dix-sept" ; jten => "soixante-dix" ; ten => "soixante-dix" ; tenplus => "soixante"}} ;
|
||||||
lin n8 =
|
lin n8 =
|
||||||
digitPl {inh = unit ; inh1 = Pl ; s = table {unit => "huit" ; teen => "dix" ++ "-" ++ "huit" ; jten => "quatre" ++ "-" ++ "vingts" ; ten => "quatre" ++ "-" ++ "vingt" ; tenplus => "quatre" ++ "-" ++ "vingt"}} ;
|
digitPl {inh = unit ; inh1 = Pl ; s = table {unit => "huit" ; teen => "dix-huit" ; jten => "quatre-vingts" ; ten => "quatre-vingt" ; tenplus => "quatre-vingt"}} ;
|
||||||
lin n9 =
|
lin n9 =
|
||||||
digitPl {inh = teen ; inh1 = Pl ; s = table {unit => "neuf" ; teen => "dix" ++ "-" ++ "neuf" ; jten => "quatre" ++ "-" ++ "vingt" ++ "-" ++ "dix" ; ten => "quatre" ++ "-" ++ "vingt" ++ "-" ++ "dix" ; tenplus => "quatre" ++ "-" ++ "vingt"}} ;
|
digitPl {inh = teen ; inh1 = Pl ; s = table {unit => "neuf" ; teen => "dix-neuf" ; jten => "quatre-vingt-dix" ; ten => "quatre-vingt-dix" ; tenplus => "quatre-vingt"}} ;
|
||||||
|
|
||||||
lin pot01 =
|
lin pot01 =
|
||||||
{inh = Sg ; s = \\g => table {{p1 = unit ; p2 = indep} => case g of {Masc =>
|
{inh = Sg ; s = \\g => let dix = cardOrd g "dix" "dixième" in table {
|
||||||
"un" ; Fem => "une"} ; {p1 = unit ; p2 = attr} => [] ; {p1 = teen ;
|
{p1 = unit ; p2 = indep} => cardOrd g "un" "unième" ; {p1 = unit ; p2 = attr} => [] ; {p1 = teen ;
|
||||||
p2 = indep} => "onze" ; {p1 = teen ; p2 = attr} => [] ; {p1 = jten ;
|
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 = jten ; p2 = attr} => [] ; {p1 = ten ;
|
||||||
p2 = indep} => "dix" ; {p1 = ten ; p2 = attr} => [] ; {p1 = tenplus
|
p2 = indep} => dix ; {p1 = ten ; p2 = attr} => [] ; {p1 = tenplus
|
||||||
; p2 = indep} => "dix" ; {p1 = tenplus ; p2 = attr} => []} ; n = Sg} ;
|
; p2 = indep} => dix ; {p1 = tenplus ; p2 = attr} => []} ; n = Sg} ;
|
||||||
lin pot0 d =
|
lin pot0 d =
|
||||||
{inh = Pl ; s = \\g => table {{p1 = unit ; p2 = indep} => d.s ! g ! unit
|
{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}
|
; {p1 = unit ; p2 = attr} => d.s ! g ! unit ; {p1 = teen ; p2 = indep}
|
||||||
@@ -42,10 +67,11 @@ lin pot0 d =
|
|||||||
{p1 = ten ; p2 = indep} => d.s ! g ! ten ; {p1 = ten ; p2 = attr} => d.s
|
{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
|
! g ! ten ; {p1 = tenplus ; p2 = indep} => d.s ! g ! tenplus ; {p1 = tenplus
|
||||||
; p2 = attr} => d.s ! g ! tenplus} ; n = Pl} ;
|
; p2 = attr} => d.s ! g ! tenplus} ; n = Pl} ;
|
||||||
|
|
||||||
lin pot110 =
|
lin pot110 =
|
||||||
{s = \\_ => table {indep => "dix" ; attr => "dix"} ; n = Pl} ;
|
{s = \\g => table {_ => cardOrd g "dix" "dixième"} ; n = Pl} ;
|
||||||
lin pot111 =
|
lin pot111 =
|
||||||
{s = \\_ => table {indep => "onze" ; attr => "onze"} ; n = Pl} ;
|
{s = \\g => table {_ => cardOrd g "onze" "onzième"} ; n = Pl} ;
|
||||||
lin pot1to19 d =
|
lin pot1to19 d =
|
||||||
{s = \\g => table {indep => d.s ! g ! teen ; attr => d.s ! g ! teen} ; n = Pl} ;
|
{s = \\g => table {indep => d.s ! g ! teen ; attr => d.s ! g ! teen} ; n = Pl} ;
|
||||||
lin pot0as1 n =
|
lin pot0as1 n =
|
||||||
@@ -55,29 +81,29 @@ lin pot1 d =
|
|||||||
{s = \\g => table {indep => d.s ! g ! jten ; attr => d.s ! g ! ten}
|
{s = \\g => table {indep => d.s ! g ! jten ; attr => d.s ! g ! ten}
|
||||||
; n = Pl} ;
|
; n = Pl} ;
|
||||||
lin pot1plus d e =
|
lin pot1plus d e =
|
||||||
{s = \\g => table {indep => (d.s ! g ! tenplus) ++ (table {{p1 = Sg
|
{s = \\g => table {indep => (d.s ! (NCard Masc) ! tenplus) ++ (table {{p1 = Sg
|
||||||
; p2 = Sg} => "et" ; {p1 = Sg ; p2 = pl} => "-" ; {p1 = Pl ; p2 =
|
; p2 = Sg} => "et" ; {p1 = Sg ; p2 = pl} => "-" ; {p1 = Pl ; p2 =
|
||||||
Sg} => "-" ; {p1 = Pl ; p2 = pl} => "-"} ! {p1 = d.inh1 ; p2 =
|
Sg} => "-" ; {p1 = Pl ; p2 = pl} => "-"} ! {p1 = d.inh1 ; p2 =
|
||||||
e.inh}) ++ e.s ! g ! {p1 = d.inh ; p2 = indep} ; attr => (d.s ! g !
|
e.inh}) ++ e.s ! g ! {p1 = d.inh ; p2 = indep} ; attr => (d.s ! (NCard Masc) !
|
||||||
tenplus) ++ (table {{p1 = Sg ; p2 = Sg} => "et" ; {p1 = Sg ; p2 =
|
tenplus) ++ (table {{p1 = Sg ; p2 = Sg} => "et" ; {p1 = Sg ; p2 =
|
||||||
pl} => "-" ; {p1 = Pl ; p2 = Sg} => "-" ; {p1 = Pl ; p2 = pl} =>
|
pl} => "-" ; {p1 = Pl ; p2 = Sg} => "-" ; {p1 = Pl ; p2 = pl} =>
|
||||||
"-"} ! {p1 = d.inh1 ; p2 = e.inh}) ++ e.s ! g ! {p1 = d.inh ; p2 =
|
"-"} ! {p1 = d.inh1 ; p2 = e.inh}) ++ e.s ! g ! {p1 = d.inh ; p2 =
|
||||||
indep}} ; n = Pl} ;
|
indep}} ; n = Pl} ;
|
||||||
lin pot1as2 n = n ;
|
lin pot1as2 n = n ;
|
||||||
---- {s = \\g,d => n.s ! indep ; attr => n.s ! attr}} ;
|
|
||||||
lin pot2 d =
|
lin pot2 d =
|
||||||
{s = \\g => table {indep => (d.s ! Masc ! {p1 = unit ; p2 = attr})
|
{s = \\g => table {indep => (d.s ! NCard Masc ! {p1 = unit ; p2 = attr})
|
||||||
++ table {Sg => "cent" ; Pl => "cents"} ! (d.inh) ; attr => (d.s !
|
++ table {Sg => cardOrd g "cent" "centième" ; Pl => cardOrd g "cents" "centième"} ! (d.inh) ; attr => (d.s !
|
||||||
Masc ! {p1 = unit ; p2 = attr}) ++ "cent"} ; n = Pl} ;
|
NCard Masc ! {p1 = unit ; p2 = attr}) ++ cardOrd g "cent" "centième"} ; n = Pl} ;
|
||||||
lin pot2plus d e =
|
lin pot2plus d e =
|
||||||
{s = \\g => table {indep => (d.s ! Masc ! {p1 = unit ; p2 = attr})
|
{s = \\g => table {indep => (d.s ! NCard Masc ! {p1 = unit ; p2 = attr})
|
||||||
++ "cent" ++ e.s ! g ! indep ; attr => (d.s ! Masc ! {p1 = unit ; p2
|
++ "cent" ++ e.s ! g ! indep ; attr => (d.s ! NCard Masc ! {p1 = unit ; p2
|
||||||
= attr}) ++ "cent" ++ e.s ! g ! indep} ; n = Pl} ;
|
= attr}) ++ "cent" ++ e.s ! g ! indep} ; n = Pl} ;
|
||||||
lin pot2as3 n =
|
lin pot2as3 n =
|
||||||
{s = \\g => n.s ! g ! indep ; n = n.n} ;
|
{s = \\g => n.s ! g ! indep ; n = n.n} ;
|
||||||
lin pot3 n =
|
lin pot3 n =
|
||||||
{s = \\_ => (n.s ! Masc ! attr) ++ "mille" ; n = Pl} ;
|
{s = \\g => (n.s ! NCard Masc ! attr) ++ cardOrd g "mille" "millième" ; n = Pl} ;
|
||||||
lin pot3plus n m =
|
lin pot3plus n m =
|
||||||
{s = \\g => (n.s ! Masc ! attr) ++ "mille" ++ m.s ! g ! indep ; n =
|
{s = \\g => (n.s ! NCard Masc ! attr) ++ "mille" ++ m.s ! g ! indep ; n =
|
||||||
Pl} ;
|
Pl} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user