forked from GitHub/gf-rgl
record type extension freshness check
This commit is contained in:
@@ -57,7 +57,15 @@ oper
|
|||||||
mkCNomInvar : Str -> Gender -> CNom = \cas ->
|
mkCNomInvar : Str -> Gender -> CNom = \cas ->
|
||||||
mkCNomIrreg cas cas ;
|
mkCNomIrreg cas cas ;
|
||||||
|
|
||||||
|
mkNomReg : Str -> Gender -> CNom = \cas ->
|
||||||
|
let cass = case last cas of {
|
||||||
|
"s" => cas ;
|
||||||
|
"x" => cas ;
|
||||||
|
"z" => cas ;
|
||||||
|
_ => cas + "s"
|
||||||
|
}
|
||||||
|
in mkCNomIrreg cas cass ;
|
||||||
|
|
||||||
|
|
||||||
-- The definite article has quite some variation: three parameters and
|
-- The definite article has quite some variation: three parameters and
|
||||||
-- elision. This is the simples definition we have been able to find.
|
-- elision. This is the simples definition we have been able to find.
|
||||||
@@ -111,7 +119,11 @@ oper
|
|||||||
|
|
||||||
adjHeureux : Str -> Adj = \heureux ->
|
adjHeureux : Str -> Adj = \heureux ->
|
||||||
let {heureu = Predef.tk 1 heureux} in
|
let {heureu = Predef.tk 1 heureux} in
|
||||||
mkAdj heureux heureu (heureu+"se") (heureu+"sement") ;
|
mkAdj heureux (heureu+"s") (heureu+"se") (heureu+"sement") ;
|
||||||
|
|
||||||
|
adjBanal : Str -> Adj = \banal ->
|
||||||
|
let {bana = Predef.tk 1 banal} in
|
||||||
|
mkAdj banal (bana + "ux") (banal+"e") (banal+"ement") ;
|
||||||
|
|
||||||
adjJeune : Str -> Adj = \jeune ->
|
adjJeune : Str -> Adj = \jeune ->
|
||||||
mkAdj jeune (jeune+"s") jeune (jeune+"ment") ;
|
mkAdj jeune (jeune+"s") jeune (jeune+"ment") ;
|
||||||
@@ -126,6 +138,23 @@ oper
|
|||||||
let {ch = Predef.tk 2 cher} in
|
let {ch = Predef.tk 2 cher} in
|
||||||
mkAdj cher (cher + "s") (ch + "ère") (ch + "èrement") ;
|
mkAdj cher (cher + "s") (ch + "ère") (ch + "èrement") ;
|
||||||
|
|
||||||
|
mkAdjReg : Str -> Adj = \creux ->
|
||||||
|
case Predef.dp 3 creux of {
|
||||||
|
"eux" => adjHeureux creux ;
|
||||||
|
_ => case Predef.dp 2 creux of {
|
||||||
|
"al" => adjBanal creux ;
|
||||||
|
"en" => adjIndien creux ;
|
||||||
|
"on" => adjIndien creux ;
|
||||||
|
"er" => adjCher creux ;
|
||||||
|
_ => case Predef.dp 1 creux of {
|
||||||
|
"s" => adjFrancais creux ;
|
||||||
|
"e" => adjJeune creux ;
|
||||||
|
"é" => adjJoli creux ;
|
||||||
|
"i" => adjJoli creux ;
|
||||||
|
_ => adjGrand creux
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
--2 Personal pronouns
|
--2 Personal pronouns
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
--# -path=.:../romance:../../prelude
|
--# -path=.:../romance:../../prelude
|
||||||
|
|
||||||
instance SyntaxFre of SyntaxRomance = TypesFre ** open Prelude, (CO=Coordination), MorphoFre in {
|
instance SyntaxFre of SyntaxRomance = TypesFre **
|
||||||
|
open Prelude, (CO=Coordination), MorphoFre in {
|
||||||
|
|
||||||
flags optimize=parametrize ;
|
flags optimize=parametrize ;
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ lincat
|
|||||||
AP = Adjective ;
|
AP = Adjective ;
|
||||||
AS = Adjective ** {mp,mn : Mode} ; --- "more difficult for him to come than..."
|
AS = Adjective ** {mp,mn : Mode} ; --- "more difficult for him to come than..."
|
||||||
A2S = Adjective ** {s2 : Preposition} ;
|
A2S = Adjective ** {s2 : Preposition} ;
|
||||||
AV = Adjective ;
|
AV = Adjective ** {c : CaseA} ;
|
||||||
A2V = Adjective ** {s2 : Preposition} ;
|
A2V = Adjective ** {s2 : Preposition} ;
|
||||||
|
|
||||||
V = Verb ;
|
V = Verb ;
|
||||||
|
|||||||
@@ -17,17 +17,15 @@ incomplete concrete ClauseRomance of Clause = CategoriesRomance **
|
|||||||
SPredV2A np v x y = predVerbClause np v (complDitransAdjVerb v x y) ;
|
SPredV2A np v x y = predVerbClause np v (complDitransAdjVerb v x y) ;
|
||||||
SPredSubjV2V np v x y = predVerbClause np v (complDitransVerbVerb False v x y) ;
|
SPredSubjV2V np v x y = predVerbClause np v (complDitransVerbVerb False v x y) ;
|
||||||
SPredObjV2V np v x y = predVerbClause np v (complDitransVerbVerb True v x y) ;
|
SPredObjV2V np v x y = predVerbClause np v (complDitransVerbVerb True v x y) ;
|
||||||
{-
|
-- SPredV2S np v x y = predVerbClause np v (complDitransSentVerb v x y) ;
|
||||||
SPredV2S np v x y = predVerbClause np v (complDitransSentVerb v x y) ;
|
-- SPredV2Q np v x y = predVerbClause np v (complDitransQuestVerb v x y) ;
|
||||||
SPredV2Q np v x y = predVerbClause np v (complDitransQuestVerb v x y) ;
|
|
||||||
-}
|
|
||||||
SPredAP np v = predCopula np (complAdjective v) ;
|
SPredAP np v = predCopula np (complAdjective v) ;
|
||||||
SPredSuperl np a = predCopula np (complAdjective (superlAdjPhrase a)) ;
|
SPredSuperl np a = predCopula np (complAdjective (superlAdjPhrase a)) ;
|
||||||
SPredCN np v = predCopula np (complCommNoun v) ;
|
SPredCN np v = predCopula np (complCommNoun v) ;
|
||||||
SPredNP np v = predCopula np (complNounPhrase v) ;
|
SPredNP np v = predCopula np (complNounPhrase v) ;
|
||||||
SPredPP np v = predCopula np (complAdverb v) ;
|
SPredPP np v = predCopula np (complAdverb v) ;
|
||||||
{-
|
|
||||||
SPredAV np v x = predCopula np (complVerbAdj v x) ;
|
SPredAV np v x = predCopula np (complVerbAdj v x) ;
|
||||||
|
{-
|
||||||
SPredObjA2V np v x y = predCopula np (complVerbAdj2 True v x y) ;
|
SPredObjA2V np v x y = predCopula np (complVerbAdj2 True v x y) ;
|
||||||
|
|
||||||
SPredProgVP = progressiveClause ;
|
SPredProgVP = progressiveClause ;
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ oper
|
|||||||
|
|
||||||
--3 Comparison adjectives
|
--3 Comparison adjectives
|
||||||
--
|
--
|
||||||
-- The type is defined in $types.Romance.gf$. Syntax adds to lexicon the position
|
-- The type is defined in $TypesRomance$. Syntax adds to lexicon the position
|
||||||
-- information.
|
-- information.
|
||||||
|
|
||||||
AdjDegr = AdjComp ** {p : Bool} ;
|
AdjDegr = AdjComp ** {p : Bool} ;
|
||||||
@@ -489,6 +489,11 @@ oper
|
|||||||
complAdverb : Adverb -> Complemnt = \dehors ->
|
complAdverb : Adverb -> Complemnt = \dehors ->
|
||||||
complCopula (\\_,_,_ => dehors.s) ;
|
complCopula (\\_,_,_ => dehors.s) ;
|
||||||
|
|
||||||
|
complVerbAdj : (Adjective ** {c : CaseA}) -> VerbPhrase -> Complemnt = \facile,ouvrir ->
|
||||||
|
complCopula (\\g,n,p =>
|
||||||
|
facile.s ! AF g n ++ prepCase facile.c ++
|
||||||
|
ouvrir.s ! VIInfinit ! g ! n ! p) ;
|
||||||
|
|
||||||
-- Passivization is like adjectival predication.
|
-- Passivization is like adjectival predication.
|
||||||
|
|
||||||
passVerb : Verb -> Complemnt = \aimer ->
|
passVerb : Verb -> Complemnt = \aimer ->
|
||||||
@@ -531,6 +536,11 @@ oper
|
|||||||
-- More will be needed when we add ditransitive verbs.
|
-- More will be needed when we add ditransitive verbs.
|
||||||
|
|
||||||
complTransVerb : TransVerb -> NounPhrase -> Complemnt = \aime,jean ->
|
complTransVerb : TransVerb -> NounPhrase -> Complemnt = \aime,jean ->
|
||||||
|
complTransVerbGen aime jean (\\_,_,_ => []) ;
|
||||||
|
|
||||||
|
complTransVerbGen : TransVerb -> NounPhrase ->
|
||||||
|
(Gender => Number => Person => Str) -> Complemnt =
|
||||||
|
\aime,jean,ici ->
|
||||||
let
|
let
|
||||||
clit = andB (isNounPhraseClit jean) (isTransVerbClit aime) ;
|
clit = andB (isNounPhraseClit jean) (isTransVerbClit aime) ;
|
||||||
Jean = jean.s ! (case2pformClit aime.c) ;
|
Jean = jean.s ! (case2pformClit aime.c) ;
|
||||||
@@ -538,9 +548,12 @@ oper
|
|||||||
(aime.s ! VPart (pgen2gen jean.g) jean.n)
|
(aime.s ! VPart (pgen2gen jean.g) jean.n)
|
||||||
(aime.s ! VPart Masc Sg)
|
(aime.s ! VPart Masc Sg)
|
||||||
in
|
in
|
||||||
\\_,_,_ => case clit of {
|
\\g,n,p =>
|
||||||
True => {clit = Jean ; part = aimee ; compl = []} ;
|
let Ici = ici ! g ! n ! p
|
||||||
False => {clit = [] ; part = aimee ; compl = Jean}
|
in
|
||||||
|
case clit of {
|
||||||
|
True => {clit = Jean ; part = aimee ; compl = Ici} ;
|
||||||
|
False => {clit = [] ; part = aimee ; compl = Jean ++ Ici}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
----- add auxVerb to Complemnt to switch to $esse$ in refl ?
|
----- add auxVerb to Complemnt to switch to $esse$ in refl ?
|
||||||
@@ -625,35 +638,23 @@ oper
|
|||||||
|
|
||||||
complDitransAdjVerb :
|
complDitransAdjVerb :
|
||||||
TransVerb -> NounPhrase -> AdjPhrase -> Complemnt = \rend,toi,sec ->
|
TransVerb -> NounPhrase -> AdjPhrase -> Complemnt = \rend,toi,sec ->
|
||||||
let
|
complTransVerbGen rend toi (\\g,n,_ => sec.s ! AF g n) ;
|
||||||
rendtoi = complTransVerb rend toi
|
|
||||||
in
|
|
||||||
\\g,n,p =>
|
|
||||||
let rt = rendtoi ! g ! n ! p in
|
|
||||||
{clit = rt.clit ; part = rt.part ;
|
|
||||||
compl = rt.compl ++ sec.s ! AF g n
|
|
||||||
} ;
|
|
||||||
|
|
||||||
DitransVerbVerb = TransVerb ** {c3 : CaseA} ;
|
DitransVerbVerb = TransVerb ** {c3 : CaseA} ;
|
||||||
|
|
||||||
complDitransVerbVerb :
|
complDitransVerbVerb :
|
||||||
Bool -> DitransVerbVerb -> NounPhrase -> VerbPhrase -> Complemnt =
|
Bool -> DitransVerbVerb -> NounPhrase -> VerbPhrase -> Complemnt =
|
||||||
\obj, demander, toi, nager ->
|
\obj, demander, toi, nager ->
|
||||||
let
|
complTransVerbGen demander toi
|
||||||
rendtoi = complTransVerb demander toi
|
(\\g,n,p =>
|
||||||
in
|
let
|
||||||
\\g,n,p =>
|
agr : Gender * Number * Person = case obj of {
|
||||||
let
|
True => <pgen2gen toi.g, toi.n, toi.p> ;
|
||||||
rt = rendtoi ! g ! n ! p ;
|
False => <g, n, p>
|
||||||
agr : Gender * Number * Person = case obj of {
|
}
|
||||||
True => <pgen2gen toi.g, toi.n, toi.p> ;
|
in
|
||||||
False => <g, n, p>
|
prepCase demander.c ++
|
||||||
}
|
nager.s ! VIInfinit ! agr.p1 ! agr.p2 ! agr.p3) ;
|
||||||
in
|
|
||||||
{clit = rt.clit ; part = rt.part ;
|
|
||||||
compl = rt.compl ++ prepCase demander.c ++
|
|
||||||
nager.s ! VIInfinit ! agr.p1 ! agr.p2 ! agr.p3
|
|
||||||
} ;
|
|
||||||
|
|
||||||
|
|
||||||
--2 Adverbs
|
--2 Adverbs
|
||||||
@@ -763,27 +764,28 @@ oper
|
|||||||
co = comp ! pgen2gen np.g ! np.n ! np.p ;
|
co = comp ! pgen2gen np.g ! np.n ! np.p ;
|
||||||
la = co.clit ;
|
la = co.clit ;
|
||||||
ici = co.compl ;
|
ici = co.compl ;
|
||||||
|
aimee = co.part ;
|
||||||
aime : TMode -> Str = \t -> verb.s ! (VFin t np.n np.p) ;
|
aime : TMode -> Str = \t -> verb.s ! (VFin t np.n np.p) ;
|
||||||
avoir : TMode -> Str = \t -> (auxVerb verb).s ! (VFin t np.n np.p) ;
|
avoir : TMode -> Str = \t -> (auxVerb verb).s ! (VFin t np.n np.p) ;
|
||||||
aimee = co.part ;
|
|
||||||
aimer = verb.s ! VInfin ;
|
aimer = verb.s ! VInfin ;
|
||||||
avoirr = (auxVerb verb).s ! VInfin
|
avoirr = (auxVerb verb).s ! VInfin
|
||||||
in
|
in
|
||||||
\\b => table {
|
\\b => table {
|
||||||
ClPres Simul m => <jean, posNeg b (la ++ aime (VPres m)) ici> ;
|
ClPres Simul m => <jean, posNeg b (la ++ aime (VPres m)) ici> ;
|
||||||
ClPres a m => <jean, posNeg b (la ++ avoir (VPres m)) (aimee ++ ici)> ;
|
ClPres a m => <jean, posNeg b (la ++ avoir (VPres m)) (aimee ++ ici)> ;
|
||||||
ClImperf Simul m => <jean, posNeg b (la ++ aime (VImperf m)) ici> ;
|
ClImperf Simul m => <jean, posNeg b (la ++ aime (VImperf m)) ici> ;
|
||||||
ClImperf a m => <jean, posNeg b (la ++ avoir (VImperf m)) (aimee ++ ici)> ;
|
ClImperf a m => <jean, posNeg b (la ++ avoir (VImperf m)) (aimee ++ ici)> ;
|
||||||
ClPasse Simul => <jean, posNeg b (la ++ aime VPasse) ici> ;
|
ClPasse Simul => <jean, posNeg b (la ++ aime VPasse) ici> ;
|
||||||
ClPasse a => <jean, posNeg b (la ++ avoir VPasse) (aimee ++ ici)> ;
|
ClPasse a => <jean, posNeg b (la ++ avoir VPasse) (aimee ++ ici)> ;
|
||||||
ClFut Simul => <jean, posNeg b (la ++ aime VFut) ici> ;
|
ClFut Simul => <jean, posNeg b (la ++ aime VFut) ici> ;
|
||||||
ClFut a => <jean, posNeg b (la ++ avoir VFut) (aimee ++ ici)> ;
|
ClFut a => <jean, posNeg b (la ++ avoir VFut) (aimee ++ ici)> ;
|
||||||
ClCondit Simul => <jean, posNeg b (la ++ aime VFut) ici> ;
|
ClCondit Simul => <jean, posNeg b (la ++ aime VFut) ici> ;
|
||||||
ClCondit a => <jean, posNeg b (la ++ avoir VFut) (aimee ++ ici)> ;
|
ClCondit a => <jean, posNeg b (la ++ avoir VFut) (aimee ++ ici)> ;
|
||||||
ClInfinit Simul => <jean, posNeg b (la ++ aimer) ici> ;
|
ClInfinit Simul => <jean, posNeg b (la ++ aimer) ici> ;
|
||||||
ClInfinit a => <jean, posNeg b (la ++ avoirr) (aimee ++ ici)>
|
ClInfinit a => <jean, posNeg b (la ++ avoirr) (aimee ++ ici)>
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
--3 Sentence-complement verbs
|
--3 Sentence-complement verbs
|
||||||
--
|
--
|
||||||
-- Sentence-complement verbs take sentences as complements.
|
-- Sentence-complement verbs take sentences as complements.
|
||||||
|
|||||||
Reference in New Issue
Block a user