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