mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-30 05:08:55 -06:00
French close to complete; reported on regexp bindings
This commit is contained in:
@@ -31,7 +31,7 @@ incomplete concrete CatRomance of Cat =
|
||||
-- Relative
|
||||
|
||||
RCl = {s : Tense => Anteriority => Polarity => Mood => Agr => Str} ;
|
||||
RP = {s : AAgr => RelForm => Str} ; ---- ; a : RAgr} ;
|
||||
RP = {s : Bool => AAgr => Case => Str ; a : RAgr} ;
|
||||
|
||||
-- Verb
|
||||
|
||||
|
||||
@@ -10,14 +10,16 @@ incomplete concrete ConjunctionRomance of Conjunction =
|
||||
|
||||
ConjAdv conj ss = conjunctSS conj ss ;
|
||||
DConjAdv conj ss = conjunctDistrSS conj ss ;
|
||||
{-
|
||||
|
||||
ConjNP conj ss = conjunctTable NPForm conj ss ** {
|
||||
a = {g = ss.a.g ; n = conjNumber conj.n ss.a.n ; p = ss.a.p}
|
||||
a = {g = ss.a.g ; n = conjNumber conj.n ss.a.n ; p = ss.a.p} ;
|
||||
c = Clit0
|
||||
} ;
|
||||
DConjNP conj ss = conjunctDistrTable NPForm conj ss ** {
|
||||
a = {g = ss.a.g ; n = conjNumber conj.n ss.a.n ; p = ss.a.p}
|
||||
a = {g = ss.a.g ; n = conjNumber conj.n ss.a.n ; p = ss.a.p} ;
|
||||
c = Clit0
|
||||
} ;
|
||||
-}
|
||||
|
||||
ConjAP conj ss = conjunctTable AForm conj ss ** {
|
||||
isPre = ss.isPre
|
||||
} ;
|
||||
|
||||
@@ -31,9 +31,13 @@ oper
|
||||
partAgr : VType -> VPAgr ;
|
||||
|
||||
conjThan : Str ;
|
||||
conjThat : Str ;
|
||||
|
||||
clitInf : Str -> Str -> Str ;
|
||||
|
||||
relPron : Bool => AAgr => Case => Str ;
|
||||
pronSuch : AAgr => Str ;
|
||||
|
||||
-- These needed above.
|
||||
|
||||
param
|
||||
|
||||
@@ -120,7 +120,7 @@ oper
|
||||
Agr : Type = AAgr ** {p : Person} ;
|
||||
|
||||
param
|
||||
RAgr = RAg AAgr | RNoAg ;
|
||||
RAgr = RAg {g : Gender ; n : Number} | RNoAg ; --- AAgr
|
||||
|
||||
oper
|
||||
aagr : Gender -> Number -> AAgr = \g,n ->
|
||||
|
||||
@@ -1,44 +1,42 @@
|
||||
incomplete concrete RelativeRomance of Relative =
|
||||
CatRomance ** open DiffRomance, ResRomance in {
|
||||
CatRomance ** open Prelude, CommonRomance, ResRomance in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
|
||||
RelCl cl = {
|
||||
s = \\t,a,p,ag => pronSuch ! ag.gn ++ conjThat ++ cl.s ! t ! a ! p ! Sub
|
||||
s = \\t,a,p,m,ag => pronSuch ! ag ++ conjThat ++ cl.s ! t ! a ! p ! m
|
||||
} ;
|
||||
|
||||
RelVP rp vp = {
|
||||
s = \\t,ant,b,ag =>
|
||||
s = \\t,ant,b,m,ag =>
|
||||
let
|
||||
agr = case rp.a of {
|
||||
RNoAg => ag ;
|
||||
RAg a => a
|
||||
RAg a => a ** {p = P3}
|
||||
} ;
|
||||
cl = mkClause (rp.s ! ag.gn ! RNom) agr vp
|
||||
cl = mkClause (rp.s ! False ! ag ! Nom) agr vp
|
||||
in
|
||||
cl.s ! t ! ant ! b ! Sub
|
||||
cl.s ! t ! ant ! b ! m
|
||||
} ;
|
||||
|
||||
--- We make this easy by using "som" and preposition stranding. It would be
|
||||
--- a proble to determine whether $slash$ takes a direct object, since
|
||||
--- $slash.c2$ is defined to be just a string.
|
||||
--
|
||||
-- The empty relative is left to $ExtRomance$.
|
||||
|
||||
{-
|
||||
RelSlash rp slash = {
|
||||
s = \\t,a,p,ag =>
|
||||
rp.s ! ag.gn ! RNom ++ slash.s ! t ! a ! p ! Sub ++ slash.c2
|
||||
} ;
|
||||
|
||||
--- The case here could be genitive.
|
||||
-}
|
||||
|
||||
FunRP p np rp = {
|
||||
s = \\gn,c => np.s ! nominative ++ p.s ++ rp.s ! gn ! RPrep ;
|
||||
s = \\_,a,c => np.s ! Ton Nom ++ p.s ++ rp.s ! True ! a ! p.c ;
|
||||
a = RAg np.a
|
||||
} ;
|
||||
IdRP = {
|
||||
s = relPron ;
|
||||
a = RNoAg
|
||||
} ;
|
||||
|
||||
IdRP = {s = relPron ; a = RNoAg} ;
|
||||
-- RCl = {s : Tense => Anteriority => Polarity => Mood => Agr => Str} ;
|
||||
-- RP = {s : AAgr => RelForm => Str ; a : RAgr} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -10,9 +10,6 @@ param
|
||||
|
||||
NPForm = Ton Case | Aton Case | Poss {g : Gender ; n : Number} ; --- AAgr
|
||||
|
||||
RelForm = RSimple Case | RComplex Gender Number Case ;
|
||||
|
||||
|
||||
oper
|
||||
|
||||
nominative : Case = Nom ;
|
||||
@@ -44,11 +41,6 @@ oper
|
||||
_ => Ton c
|
||||
} ;
|
||||
|
||||
npRelForm : NPForm -> RelForm = \np -> case np of {
|
||||
Ton c => RSimple c ;
|
||||
Aton c => RSimple c ;
|
||||
Poss _ => RSimple genitive
|
||||
} ;
|
||||
|
||||
appCompl : Compl -> (NPForm => Str) -> Str = \comp,np ->
|
||||
comp.s ++ np ! Ton comp.c ;
|
||||
|
||||
Reference in New Issue
Block a user