mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-11 13:59:31 -06:00
43 lines
724 B
Plaintext
43 lines
724 B
Plaintext
param Num = Sg | Pl ;
|
|
param Gen = Masc | Fem ;
|
|
|
|
param AG = A Num Gen ;
|
|
|
|
oper Agr = {g : Gen ; n : Num} ;
|
|
|
|
oper CN = {s : Num -> Str ; g : Gen} ;
|
|
oper NP = {s : Str ; a : Agr} ;
|
|
|
|
oper artDef : Gen -> Str = \g -> table Gen {
|
|
(Masc) => "le" ;
|
|
(Fem) => "la"
|
|
} ! $g ;
|
|
|
|
lin Voiture : CN = {
|
|
s = table Num {
|
|
(Sg) => "voiture" ;
|
|
(Pl) => "voitures"
|
|
} ;
|
|
g = (Fem@)
|
|
} ;
|
|
|
|
|
|
lin Bus : CN = {
|
|
s = table Num {$x => "bus"} ;
|
|
g = (Masc@)
|
|
} ;
|
|
|
|
lin Indef : CN -> NP = \cn -> {
|
|
s = table Gen {
|
|
(Masc) => "un" ;
|
|
$x => "une"
|
|
} ! $cn.g ++ $cn.s ! (Sg@) ;
|
|
a = {g = $cn.g ; n = (Sg@)}
|
|
} ;
|
|
|
|
|
|
lin Def : CN -> NP = \cn -> {
|
|
s = &artDef $cn.g ++ $cn.s ! (Sg@) ;
|
|
a = {g = $cn.g ; n = (Sg@)}
|
|
} ;
|