forked from GitHub/gf-rgl
new abstract implemented for exper/french
This commit is contained in:
@@ -32,12 +32,29 @@ incomplete concrete NounRomance of Noun =
|
||||
hasClit = False
|
||||
} ;
|
||||
|
||||
RelNP np rs = {
|
||||
s = \\c => np.s ! c ++ rs.s ! Indic ! np.a ;
|
||||
a = np.a ;
|
||||
hasClit = False
|
||||
} ;
|
||||
|
||||
AdvNP np adv = {
|
||||
s = \\c => np.s ! c ++ adv.s ;
|
||||
a = np.a ;
|
||||
hasClit = False
|
||||
} ;
|
||||
|
||||
DetQuantOrd quant num ord = {
|
||||
s = \\g,c => quant.s ! num.n ! g ! c ++ num.s ! g ++
|
||||
ord.s ! aagr g num.n ;
|
||||
n = num.n
|
||||
} ;
|
||||
|
||||
DetQuant quant num = {
|
||||
s = \\g,c => quant.s ! num.n ! g ! c ++ num.s ! g ;
|
||||
n = num.n
|
||||
} ;
|
||||
|
||||
{---b
|
||||
DetSg quant ord = {
|
||||
s = \\g,c => quant.s ! False ! Sg ! g ! c ++ ord.s ! aagr g Sg ;
|
||||
@@ -50,6 +67,17 @@ incomplete concrete NounRomance of Noun =
|
||||
} ;
|
||||
-}
|
||||
|
||||
DetNP det =
|
||||
let
|
||||
g = Masc ; ---- Fem in Extra
|
||||
n = det.n
|
||||
in {
|
||||
s = \\c => let cs = npform2case c in
|
||||
det.s ! g ! cs ;
|
||||
a = agrP3 g n ;
|
||||
hasClit = False
|
||||
} ;
|
||||
|
||||
PossPron p = {
|
||||
s = \\n,g,c => possCase g n c ++ p.s ! Poss (aagr g n) ---- il mio!
|
||||
} ;
|
||||
@@ -62,16 +90,51 @@ incomplete concrete NounRomance of Noun =
|
||||
---b NumInt n = {s = \\_ => n.s ; isNum = True ; n = Pl} ;
|
||||
---b OrdInt n = {s = \\_ => n.s ++ "."} ; ---
|
||||
|
||||
NumDigits nu = {s = \\g => nu.s ! NCard g ; isNum = True ; n = nu.n} ;
|
||||
NumCard n = n ** {isNum = True} ;
|
||||
|
||||
NumDigits nu = {s = \\g => nu.s ! NCard g ; n = nu.n} ;
|
||||
OrdDigits nu = {s = \\a => nu.s ! NOrd a.g a.n} ;
|
||||
|
||||
NumNumeral nu = {s = \\g => nu.s ! NCard g ; isNum = True ; n = nu.n} ;
|
||||
NumNumeral nu = {s = \\g => nu.s ! NCard g ; n = nu.n} ;
|
||||
OrdNumeral nu = {s = \\a => nu.s ! NOrd a.g a.n} ;
|
||||
|
||||
AdNum adn num = {s = \\a => adn.s ++ num.s ! a ; isNum = num.isNum ; n = num.n} ;
|
||||
|
||||
OrdSuperl adj = {s = \\a => adj.s ! Superl ! AF a.g a.n} ;
|
||||
|
||||
DetArtOrd quant num ord = {
|
||||
s = \\g,c => quant.s ! num.isNum ! num.n ! g ! c ++ num.s ! g ++
|
||||
ord.s ! aagr g num.n ;
|
||||
n = num.n
|
||||
} ;
|
||||
|
||||
DetArtCard quant num = {
|
||||
s = \\g,c => quant.s ! True ! num.n ! g ! c ++ num.s ! g ;
|
||||
n = num.n
|
||||
} ;
|
||||
|
||||
DetArtSg det cn =
|
||||
let
|
||||
g = cn.g ;
|
||||
n = Sg
|
||||
in {
|
||||
s = \\c => let cs = npform2case c in
|
||||
det.s ! False ! n ! g ! cs ++ cn.s ! n ;
|
||||
a = agrP3 g n ;
|
||||
hasClit = False
|
||||
} ;
|
||||
|
||||
DetArtPl det cn =
|
||||
let
|
||||
g = cn.g ;
|
||||
n = Pl
|
||||
in {
|
||||
s = \\c => let cs = npform2case c in
|
||||
det.s ! False ! n ! g ! cs ++ cn.s ! n ;
|
||||
a = agrP3 g n ;
|
||||
hasClit = False
|
||||
} ;
|
||||
|
||||
DefArt = {
|
||||
s = \\_,n,g,c => artDef g n c
|
||||
} ;
|
||||
@@ -80,6 +143,15 @@ incomplete concrete NounRomance of Noun =
|
||||
s = \\b,n,g,c => if_then_Str b [] (artIndef g n c) ;
|
||||
} ;
|
||||
|
||||
MassNP cn = let
|
||||
g = cn.g ;
|
||||
n = Sg
|
||||
in {
|
||||
s = \\c => partitive g (npform2case c) ++ cn.s ! n ;
|
||||
a = agrP3 g n ;
|
||||
hasClit = False
|
||||
} ;
|
||||
|
||||
{---b
|
||||
MassDet = {
|
||||
s = \\b,n,g,c => case <b,n> of {
|
||||
@@ -94,10 +166,15 @@ incomplete concrete NounRomance of Noun =
|
||||
UseN, UseN2 = \noun -> noun ;
|
||||
---b UseN3 = \noun -> noun ;
|
||||
|
||||
Use2N3 f = f ;
|
||||
|
||||
Use3N3 f = f ** {c2 = f.c3} ;
|
||||
|
||||
ComplN2 f x = {
|
||||
s = \\n => f.s ! n ++ appCompl f.c2 x.s ;
|
||||
g = f.g ;
|
||||
} ;
|
||||
|
||||
ComplN3 f x = {
|
||||
s = \\n => f.s ! n ++ appCompl f.c2 x.s ;
|
||||
g = f.g ;
|
||||
|
||||
Reference in New Issue
Block a user