mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-11 22:09:32 -06:00
32 lines
498 B
Plaintext
32 lines
498 B
Plaintext
param Num = Sg | Pl ;
|
|
param Gen = Masc | Fem ;
|
|
|
|
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 {
|
|
(Masc) => "le" ;
|
|
(Fem) => "la"
|
|
} ! g ;
|
|
|
|
|
|
lin Voiture : CN = {
|
|
s = table {
|
|
(Sg) => "voiture" ;
|
|
(Pl) => "voitures"
|
|
} ;
|
|
g = Fem
|
|
} ;
|
|
|
|
lin Bus : CN = {
|
|
s = table {$x => "bus"} ;
|
|
g = Masc
|
|
} ;
|
|
|
|
lin Def : CN -> NP = \cn -> {
|
|
s = artDef cn.g ++ cn.s ! Sg ;
|
|
a = {g = cn.g ; n = Sg}
|
|
} ;
|