mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
French conj
This commit is contained in:
@@ -131,6 +131,7 @@ lin
|
||||
open_V2 = ouvrir_V2 ;
|
||||
paint_V2A = mkV2A (v2V peindre_V2) accusative ;
|
||||
paper_N = regN "papier" masculine ;
|
||||
paris_PN = mkPN "Paris" masculine ;
|
||||
peace_N = regN "paix" feminine ;
|
||||
pen_N = regN "stylo" masculine ;
|
||||
planet_N = regN "planète" feminine ;
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
concrete ConjunctionFre of Conjunction = CatFre ** ConjunctionRomance with
|
||||
(DiffRomance = DiffFre) ;
|
||||
(ResRomance = ResFre) ;
|
||||
|
||||
@@ -9,7 +9,7 @@ concrete LangFre of Lang =
|
||||
SentenceFre,
|
||||
QuestionFre,
|
||||
-- RelativeFre,
|
||||
-- ConjunctionFre,
|
||||
ConjunctionFre,
|
||||
PhraseFre,
|
||||
TensedFre,
|
||||
StructuralFre,
|
||||
|
||||
@@ -60,7 +60,7 @@ incomplete concrete CatRomance of Cat =
|
||||
|
||||
-- Numeral
|
||||
|
||||
---- Numeral = {s : CardOrd => Str ; n : Number} ;
|
||||
Numeral = {s : CardOrd => Str} ;
|
||||
|
||||
-- Structural
|
||||
|
||||
|
||||
@@ -1,45 +1,45 @@
|
||||
incomplete concrete ConjunctionRomance of Conjunction =
|
||||
CatRomance ** open ResRomance, Coordination, Prelude in {
|
||||
CatRomance ** open ParamRomance, ResRomance, Coordination, Prelude in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
|
||||
ConjS conj ss = conjunctTable Order conj ss ;
|
||||
DConjS conj ss = conjunctDistrTable Order conj ss ;
|
||||
ConjS conj ss = conjunctTable Mood conj ss ;
|
||||
DConjS conj ss = conjunctDistrTable Mood conj ss ;
|
||||
|
||||
ConjAdv conj ss = conjunctSS conj ss ;
|
||||
DConjAdv conj ss = conjunctDistrSS conj ss ;
|
||||
|
||||
{-
|
||||
ConjNP conj ss = conjunctTable NPForm conj ss ** {
|
||||
a = {gn = conjGenNum (gennum utrum conj.n) ss.a.gn ; p = ss.a.p}
|
||||
a = {g = ss.a.g ; n = conjNumber conj.n ss.a.n ; p = ss.a.p}
|
||||
} ;
|
||||
DConjNP conj ss = conjunctDistrTable NPForm conj ss ** {
|
||||
a = {gn = conjGenNum (gennum utrum conj.n) ss.a.gn ; p = ss.a.p}
|
||||
a = {g = ss.a.g ; n = conjNumber conj.n ss.a.n ; p = ss.a.p}
|
||||
} ;
|
||||
|
||||
ConjAP conj ss = conjunctTable AFormPos conj ss ** {
|
||||
-}
|
||||
ConjAP conj ss = conjunctTable AForm conj ss ** {
|
||||
isPre = ss.isPre
|
||||
} ;
|
||||
DConjAP conj ss = conjunctDistrTable AFormPos conj ss ** {
|
||||
DConjAP conj ss = conjunctDistrTable AForm conj ss ** {
|
||||
isPre = ss.isPre
|
||||
} ;
|
||||
|
||||
-- These fun's are generated from the list cat's.
|
||||
|
||||
BaseS = twoTable Order ;
|
||||
ConsS = consrTable Order comma ;
|
||||
BaseS = twoTable Mood ;
|
||||
ConsS = consrTable Mood comma ;
|
||||
BaseAdv = twoSS ;
|
||||
ConsAdv = consrSS comma ;
|
||||
BaseNP x y = twoTable NPForm x y ** {a = conjAgr x.a y.a} ;
|
||||
ConsNP xs x = consrTable NPForm comma xs x ** {a = conjAgr xs.a x.a} ;
|
||||
BaseAP x y = twoTable AFormPos x y ** {isPre = andB x.isPre y.isPre} ;
|
||||
ConsAP xs x = consrTable AFormPos comma xs x ** {isPre = andB xs.isPre x.isPre} ;
|
||||
BaseAP x y = twoTable AForm x y ** {isPre = andB x.isPre y.isPre} ;
|
||||
ConsAP xs x = consrTable AForm comma xs x ** {isPre = andB xs.isPre x.isPre} ;
|
||||
|
||||
lincat
|
||||
[S] = {s1,s2 : Order => Str} ;
|
||||
[S] = {s1,s2 : Mood => Str} ;
|
||||
[Adv] = {s1,s2 : Str} ;
|
||||
[NP] = {s1,s2 : NPForm => Str ; a : Agr} ;
|
||||
[AP] = {s1,s2 : AFormPos => Str ; isPre : Bool} ;
|
||||
[AP] = {s1,s2 : AForm => Str ; isPre : Bool} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -19,7 +19,8 @@ incomplete concrete NounRomance of Noun =
|
||||
UsePron p = p ;
|
||||
|
||||
PredetNP pred np = {
|
||||
s = \\c => pred.s ! np.a ! npform2case c ++ np.s ! case2npform pred.c ;
|
||||
s = \\c => pred.s ! aagr (np.a.g) (np.a.n) ! npform2case c ++ --- subtype
|
||||
np.s ! case2npform pred.c ;
|
||||
a = np.a ;
|
||||
c = Clit0
|
||||
} ;
|
||||
@@ -48,12 +49,12 @@ incomplete concrete NounRomance of Noun =
|
||||
NumInt n = {s = \\_ => n.s} ;
|
||||
OrdInt n = {s = \\_ => n.s ++ "ème"} ; ---
|
||||
|
||||
---- NumNumeral numeral = {s = \\g => numeral.s ! NCard g ; isDet = True} ;
|
||||
---- OrdNumeral numeral = {s = numeral.s ! NOrd SupWeak ; isDet = True} ;
|
||||
NumNumeral numeral = {s = \\g => numeral.s ! NCard g} ;
|
||||
OrdNumeral numeral = {s = \\a => numeral.s ! NOrd a.g a.n} ;
|
||||
|
||||
AdNum adn num = {s = \\a => adn.s ++ num.s ! a} ;
|
||||
|
||||
---- OrdSuperl a = {s = a.s ! AF (ASuperl SupWeak) Nom ; isDet = True} ;
|
||||
OrdSuperl adj = {s = \\a => adj.s ! Superl ! AF a.g a.n} ;
|
||||
|
||||
DefSg = {
|
||||
s = \\g,c => artDef g Sg c ;
|
||||
|
||||
@@ -42,6 +42,10 @@ param
|
||||
|
||||
PronGen = PGen Gender | PNoGen ;
|
||||
|
||||
-- Cardinal numerals have gender, ordinal numerals have full number as well.
|
||||
|
||||
CardOrd = NCard Gender | NOrd Gender Number ;
|
||||
|
||||
-- The following coercions are useful:
|
||||
|
||||
oper
|
||||
@@ -59,6 +63,19 @@ oper
|
||||
AF _ n => n ;
|
||||
_ => Sg -- "le plus lentement"
|
||||
} ;
|
||||
|
||||
conjGender : Gender -> Gender -> Gender = \m,n ->
|
||||
case <m,n> of {
|
||||
<Fem,Fem> => Fem ;
|
||||
_ => Fem
|
||||
} ;
|
||||
|
||||
conjAgr : Agr -> Agr -> Agr = \a,b -> {
|
||||
g = conjGender a.g b.g ;
|
||||
n = conjNumber a.n b.n ;
|
||||
p = conjPerson a.p b.p
|
||||
} ;
|
||||
|
||||
|
||||
--3 Verbs
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user