forked from GitHub/gf-core
more french
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
concrete AdjectiveFre of Adjective = CatFre ** AdjectiveRomance with
|
||||
(DiffRomance = DiffFre) ;
|
||||
(ResRomance = ResFre) ;
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
concrete AdverbFre of Adverb = CatFre ** AdverbRomance with
|
||||
(DiffRomance = DiffFre) ;
|
||||
(ResRomance = ResFre) ;
|
||||
|
||||
@@ -56,6 +56,8 @@ instance DiffFre of DiffRomance = open CommonRomance, PhonoFre, Prelude in {
|
||||
Neg => <elisNe,"pas">
|
||||
} ;
|
||||
|
||||
conjThan = elisQue ;
|
||||
|
||||
copula : Verb = {s = table VF ["être";"suis";"es";"est";"sommes";"êtes";"sont";"sois";"sois";"soit";"soyons";"soyez";"soient";"étais";"étais";"était";"étions";"étiez";"étaient";"fusse";"fusses";"fût";"fussions";"fussiez";"fussent";"fus";"fus";"fut";"fûmes";"fûtes";"furent";"serai";"seras";"sera";"serons";"serez";"seront";"serais";"serais";"serait";"serions";"seriez";"seraient";"sois";"soyons";"soyez";"été";"étés";"étée";"étées";"étant"]; vtyp=VHabere} ;
|
||||
|
||||
avoir_V : Verb = {s=table VF ["avoir";"ai";"as";"a";"avons";"avez";"ont";"aie";"aies";"ait";"ayons";"ayez";"aient";"avais";"avais";"avait";"avions";"aviez";"avaient";"eusse";"eusses";"eût";"eussions";"eussiez";"eussent";"eus";"eus";"eut";"eûmes";"eûtes";"eurent";"aurai";"auras";"aura";"aurons";"aurez";"auront";"aurais";"aurais";"aurait";"aurions";"auriez";"auraient";"aie";"ayons";"ayez";"eu";"eus";"eue";"eues";"ayant"];vtyp=VHabere};
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
concrete LangFre of Lang =
|
||||
NounFre,
|
||||
VerbFre,
|
||||
-- AdjectiveFre,
|
||||
-- AdverbFre,
|
||||
AdjectiveFre,
|
||||
AdverbFre,
|
||||
-- NumeralFre,
|
||||
SentenceFre,
|
||||
-- QuestionFre,
|
||||
|
||||
@@ -1,8 +1,116 @@
|
||||
concrete StructuralFre of Structural = CatFre **
|
||||
open MorphoFre, Prelude in {
|
||||
open PhonoFre, MorphoFre, ParadigmsFre, Prelude in {
|
||||
|
||||
flags optimize=all ;
|
||||
|
||||
lin
|
||||
|
||||
above_Prep = {s = ["au dessus"] ; c = genitive ; isDir = False} ;
|
||||
after_Prep = mkPreposition "après" ;
|
||||
-- all_Predet = toutDet ;
|
||||
almost_AdA, almost_AdN = ss "presque" ;
|
||||
although_Subj = ss ("bien" ++ elisQue) ** {m = Conjunct} ;
|
||||
and_Conj = ss "et" ** {n = Pl} ;
|
||||
because_Subj = ss ("parce" ++ elisQue) ** {m = Indic} ;
|
||||
before_Prep = mkPreposition "avant" ;
|
||||
behind_Prep = mkPreposition "derrière" ;
|
||||
between_Prep = mkPreposition "entre" ;
|
||||
both7and_DConj = {s1,s2 = "et" ; n = Pl} ;
|
||||
by8agent_Prep = mkPreposition "par" ;
|
||||
by8means_Prep = mkPreposition "par" ;
|
||||
-- can8know_VV = mkVerbVerbDir (verbPres (conj3savoir "savoir") AHabere) ;
|
||||
-- can_VV = mkVerbVerbDir (verbPres (conj3pouvoir "pouvoir") AHabere) ;
|
||||
during_Prep = mkPreposition "pendant" ;
|
||||
either7or_DConj = {s1,s2 = "ou" ; n = Pl} ;
|
||||
-- everybody_NP = mkNameNounPhrase ["tout le monde"] Masc ;
|
||||
every_Det = {s = \\_,_ => "chaque" ; n = Sg} ;
|
||||
-- everything_NP = mkNameNounPhrase ["tout"] Masc ;
|
||||
everywhere_Adv = ss "partout" ;
|
||||
from_Prep = complGen ; ---
|
||||
he_Pron =
|
||||
mkPronoun
|
||||
"il" (elision "l") "lui" "lui" "son" (elisPoss "s") "ses"
|
||||
Masc Sg P3 Clit2 ;
|
||||
how_IAdv = ss "comment" ;
|
||||
how8many_IDet = {s = \\_ => "combien" ++ elisDe ; n = Pl} ;
|
||||
if_Subj = ss elisSi ** {m = Indic} ;
|
||||
in8front_Prep = mkPreposition "devant" ;
|
||||
i_Pron =
|
||||
mkPronoun
|
||||
(elision "j") (elision "m") (elision "m") "moi" "mon" (elisPoss "m") "mes"
|
||||
Fem Sg P1 Clit1 ;
|
||||
in_Prep = mkPreposition "dans" ;
|
||||
it_Pron =
|
||||
mkPronoun
|
||||
"il" (elision "l") "lui" "lui" "son" (elisPoss "s") "ses"
|
||||
Masc Sg P3 Clit2 ;
|
||||
-- many_Det = mkDeterminer1 plural "plusieurs" ;
|
||||
-- most8many_Det = plupartDet ;
|
||||
-- most_Det = mkDeterminer1 singular (["la plupart"] ++ elisDe) ; --- de
|
||||
-- much_Det = mkDeterminer1 singular ("beaucoup" ++ elisDe) ; --- de
|
||||
-- must_VV = mkVerbVerbDir (verbPres (conj3devoir "devoir") AHabere) ;
|
||||
no_Phr = ss "non" ; --- and also Si!
|
||||
on_Prep = mkPreposition "sur" ;
|
||||
or_Conj = {s = "ou" ; n = Sg} ;
|
||||
otherwise_PConj = ss "autrement" ;
|
||||
part_Prep = complGen ;
|
||||
possess_Prep = complGen ;
|
||||
quite_Adv = ss "assez" ;
|
||||
she_Pron =
|
||||
mkPronoun
|
||||
"elle" elisLa "lui" "elle" "son" (elisPoss "s") "ses"
|
||||
Fem Sg P3 Clit2 ;
|
||||
|
||||
so_AdA = ss "si" ;
|
||||
-- somebody_NP = mkNameNounPhrase ["quelqu'un"] Masc ;
|
||||
-- some_Det = mkDeterminer1 singular "quelque" ;
|
||||
-- some_NDet = mkDeterminerNum "quelques" "quelques" ;
|
||||
-- something_NP = mkNameNounPhrase ["quelque chose"] Masc ;
|
||||
somewhere_Adv = ss ["quelque part"] ; --- ne - pas
|
||||
-- that_Det = mkDeterminer singular (pre {"ce" ; "cet" / voyelle}) "cette" ; --- là
|
||||
-- that_NP = mkNameNounPhrase ["ça"] Masc ;
|
||||
therefore_PConj = ss "donc" ;
|
||||
-- these_NDet = mkDeterminerNum "ces" "ces" ; --- ci
|
||||
-- they_Pron = pronNounPhrase pronIls ;
|
||||
-- they8fem_Pron = pronNounPhrase pronElles ;
|
||||
-- this_Det = mkDeterminer singular (pre {"ce" ; "cet" / voyelle}) "cette" ; --- ci
|
||||
-- this_NP = mkNameNounPhrase ["ceci"] Masc ;
|
||||
-- those_NDet = mkDeterminerNum "ces" "ces" ; --- là
|
||||
thou_Pron = mkPronoun
|
||||
"tu" (elision "t") (elision "t") "toi" "ton" (elisPoss "t") "tes"
|
||||
Fem Sg P2 Clit1 ;
|
||||
through_Prep = mkPreposition "par" ;
|
||||
too_AdA = ss "trop" ;
|
||||
to_Prep = complDat ;
|
||||
under_Prep = mkPreposition "sous" ;
|
||||
very_AdA = ss "très" ;
|
||||
-- want_VV = mkVerbVerbDir (verbPres (conj3vouloir "vouloir") AHabere) ;
|
||||
we_Pron =
|
||||
mkPronoun "nous" "nous" "nous" "nous" "notre" "notre" "nos"
|
||||
Fem Pl P1 Clit3 ;
|
||||
whatSg_IP = {s = \\_ => "quoi" ; a = aagr Fem Sg} ;
|
||||
-- what8many_IP = intPronWhat plural ;
|
||||
when_IAdv = ss "quand" ;
|
||||
when_Subj = ss "quand" ** {m = Indic} ;
|
||||
where_IAdv = ss "où" ;
|
||||
-- which8many_IDet = mkDeterminerNum "quels" "quelles" ** {n = Pl} ;
|
||||
-- which8one_IDet = quelDet ;
|
||||
whoSg_IP = {s = \\_ => "qui" ; a = aagr Fem Sg} ;
|
||||
-- who8many_IP = intPronWho plural ;
|
||||
why_IAdv = ss "pourquoi" ;
|
||||
without_Prep = mkPreposition "sans" ;
|
||||
with_Prep = mkPreposition "avec" ;
|
||||
ye_Pron =
|
||||
mkPronoun
|
||||
"vous" "vous" "vous" "vous" "votre" "votre" "vos"
|
||||
Fem Pl P2 Clit3 ;
|
||||
yes_Phr = ss "oui" ; --- si
|
||||
-- you_Pron = pronNounPhrase pronVous ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
{-
|
||||
lin
|
||||
above_Prep = ss "ovanför" ;
|
||||
after_Prep = ss "efter" ;
|
||||
@@ -113,3 +221,4 @@ concrete StructuralFre of Structural = CatFre **
|
||||
|
||||
}
|
||||
|
||||
-}
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
incomplete concrete AdjectiveRomance of Adjective =
|
||||
CatRomance ** open DiffRomance, ResRomance, Prelude in {
|
||||
CatRomance ** open CommonRomance, ResRomance, Prelude in {
|
||||
|
||||
lin
|
||||
|
||||
PositA a = {
|
||||
s = \\ap => a.s ! AF (APosit ap) Nom ;
|
||||
isPre = True
|
||||
s = a.s ! Posit ;
|
||||
isPre = a.isPre
|
||||
} ;
|
||||
ComparA a np = {
|
||||
s = \\_ => a.s ! AF ACompar Nom ++ conjThan ++ np.s ! nominative ;
|
||||
s = \\af => a.s ! Compar ! af ++ conjThan ++ np.s ! Ton Nom ;
|
||||
isPre = False
|
||||
} ;
|
||||
|
||||
{-
|
||||
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
||||
|
||||
ComplA2 a np = {
|
||||
@@ -29,12 +30,12 @@ incomplete concrete AdjectiveRomance of Adjective =
|
||||
s = \\a => ap.s ! a ++ sc.s ;
|
||||
isPre = False
|
||||
} ;
|
||||
|
||||
-}
|
||||
AdAP ada ap = {
|
||||
s = \\a => ada.s ++ ap.s ! a ;
|
||||
isPre = ap.isPre
|
||||
} ;
|
||||
|
||||
UseA2 a = a ;
|
||||
UseA2 a = a ** {isPre = False} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,28 +1,26 @@
|
||||
incomplete concrete AdverbRomance of Adverb = CatRomance ** open DiffRomance, ResRomance, Prelude in {
|
||||
incomplete concrete AdverbRomance of Adverb =
|
||||
CatRomance ** open CommonRomance, ResRomance, Prelude in {
|
||||
|
||||
lin
|
||||
PositAdvAdj a = {
|
||||
s = a.s ! adverbForm
|
||||
s = a.s ! Posit ! AA
|
||||
} ;
|
||||
ComparAdvAdj cadv a np = {
|
||||
s = cadv.s ++ a.s ! adverbForm ++ conjThan ++ np.s ! nominative
|
||||
s = cadv.s ++ a.s ! Posit ! AA ++ conjThan ++ np.s ! Ton Nom
|
||||
} ;
|
||||
ComparAdvAdjS cadv a s = {
|
||||
s = cadv.s ++ a.s ! adverbForm ++ conjThan ++ s.s ! Sub
|
||||
s = cadv.s ++ a.s ! Posit ! AA ++ conjThan ++ s.s ! Conjunct --- ne
|
||||
} ;
|
||||
|
||||
PrepNP prep np = {s = prep.s ++ np.s ! accusative} ;
|
||||
PrepNP prep np = {s = prep.s ++ np.s ! Ton Acc} ;
|
||||
|
||||
AdAdv = cc2 ;
|
||||
|
||||
SubjS subj s = {
|
||||
s = subj.s ++ s.s ! Sub
|
||||
s = subj.s ++ s.s ! subj.m
|
||||
} ;
|
||||
AdvSC s = s ;
|
||||
|
||||
AdnCAdv cadv = {s = cadv.s ++ conjThan} ;
|
||||
|
||||
oper
|
||||
adverbForm : AForm = AF (APosit (Strong SgNeutr)) Nom ;
|
||||
|
||||
}
|
||||
|
||||
@@ -28,8 +28,7 @@ resource CommonRomance = ParamRomance ** open Prelude in {
|
||||
neg : Polarity => (Str * Str) ; -- ne-pas
|
||||
clit1 : Agr => Str ; -- se
|
||||
clit2 : Str ; -- lui
|
||||
comp : Agr => Str ; -- content(e) ; à ma mère
|
||||
adv : Str ; -- hier
|
||||
comp : Agr => Str ; -- content(e) ; à ma mère ; hier
|
||||
ext : Str ; -- que je dors
|
||||
} ;
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@ oper
|
||||
|
||||
partAgr : VType -> VPAgr ;
|
||||
|
||||
conjThan : Str ;
|
||||
|
||||
-- These needed above.
|
||||
|
||||
param
|
||||
|
||||
@@ -25,7 +25,7 @@ param
|
||||
|
||||
Mood = Indic | Conjunct ;
|
||||
|
||||
-- There are different types of clicic pronouns (as for position).
|
||||
-- There are different types of clitic pronouns (as for position).
|
||||
-- Examples of each: "Giovanni" ; "io" ; "lui" ; "noi".
|
||||
|
||||
ClitType = Clit0 | Clit1 | Clit2 | Clit3 ;
|
||||
|
||||
@@ -80,27 +80,50 @@ oper
|
||||
clit1 = \\a => [] ; ----
|
||||
clit2 = [] ;
|
||||
comp = \\a => [] ;
|
||||
adv = [] ;
|
||||
ext = [] ;
|
||||
} ;
|
||||
|
||||
insertObject : Compl -> Pronoun -> VP -> VP = \c,np,vp ->
|
||||
let
|
||||
cc : Str * Str * VPAgr = case <c.isDir, np.c> of {
|
||||
<False,_> | <_,Clit0> => <[], c.s ++ np.s ! Ton c.c, vp.agr> ;
|
||||
_ => <np.s ! Aton c.c, [], VPAgrClit np.a>
|
||||
}
|
||||
cc : Str * Str * VPAgr = case <c.isDir, c.c, np.c> of {
|
||||
<False,_,_> |
|
||||
<_,_,Clit0> => <[], c.s ++ np.s ! Ton c.c, vp.agr> ;
|
||||
<_,Acc,_> => <np.s ! Aton c.c, [], VPAgrClit (aagr np.a.g np.a.n)> ; --- subty
|
||||
_ => <np.s ! Aton c.c, [], vp.agr>
|
||||
} ;
|
||||
high = case np.c of { -- whether the new clitic comes closer to verb
|
||||
Clit0 | Clit1 => False ; ---- approximation; should look at the old clit too
|
||||
_ => True
|
||||
} ;
|
||||
in {
|
||||
s = vp.s ;
|
||||
agr = cc.p3 ;
|
||||
clit1 = vp.clit1 ; ---- works for one clit now
|
||||
clit2 = cc.p1 ;
|
||||
clit1 = vp.clit1 ; ---- just a reflexive
|
||||
clit2 = preOrPost high vp.clit2 cc.p1 ;
|
||||
neg = vp.neg ;
|
||||
comp = \\a => vp.comp ! a ++ cc.p2 ;
|
||||
adv = vp.adv ;
|
||||
ext = vp.ext ;
|
||||
} ;
|
||||
|
||||
insertComplement : (Agr => Str) -> VP -> VP = \co,vp -> {
|
||||
s = vp.s ;
|
||||
agr = vp.agr ;
|
||||
clit1 = vp.clit1 ;
|
||||
clit2 = vp.clit2 ;
|
||||
neg = vp.neg ;
|
||||
comp = \\a => vp.comp ! a ++ co ! a ;
|
||||
ext = vp.ext ;
|
||||
} ;
|
||||
insertAdv : Str -> VP -> VP = \co,vp -> {
|
||||
s = vp.s ;
|
||||
agr = vp.agr ;
|
||||
clit1 = vp.clit1 ;
|
||||
clit2 = vp.clit2 ;
|
||||
neg = vp.neg ;
|
||||
comp = \\a => vp.comp ! a ++ co ;
|
||||
ext = vp.ext ;
|
||||
} ;
|
||||
|
||||
mkClause : Str -> Agr -> VP ->
|
||||
{s : Tense => Anteriority => Polarity => Mood => Str} =
|
||||
\subj,agr,vp -> {
|
||||
@@ -117,7 +140,7 @@ oper
|
||||
inf = vps.inf ! (appVPAgr vp.agr (aagr agr.g agr.n)) ; --- subtype bug
|
||||
neg = vp.neg ! b ;
|
||||
clit = vp.clit1 ! agr ++ vp.clit2 ;
|
||||
compl = vp.comp ! agr ++ vp.adv ++ vp.ext
|
||||
compl = vp.comp ! agr ++ vp.ext
|
||||
in
|
||||
subj ++ neg.p1 ++ clit ++ verb ++ neg.p2 ++ inf ++ compl
|
||||
} ;
|
||||
@@ -125,3 +148,13 @@ oper
|
||||
|
||||
}
|
||||
|
||||
-- insertObject:
|
||||
-- p -cat=Cl -tr "la femme te l' envoie"
|
||||
-- PredVP (DetCN (DetSg DefSg NoOrd) (UseN woman_N))
|
||||
-- (ComplV3 send_V3 (UsePron he_Pron) (UsePron thou_Pron))
|
||||
-- la femme te l' a envoyé
|
||||
--
|
||||
-- p -cat=Cl -tr "la femme te lui envoie"
|
||||
-- PredVP (DetCN (DetSg DefSg NoOrd) (UseN woman_N))
|
||||
-- (ComplV3 send_V3 (UsePron thou_Pron) (UsePron he_Pron))
|
||||
-- la femme te lui a envoyée
|
||||
|
||||
@@ -4,7 +4,7 @@ incomplete concrete SentenceRomance of Sentence =
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
PredVP np vp = mkClause (np.s ! Ton Nom) np.a vp ;
|
||||
PredVP np vp = mkClause (np.s ! Aton Nom) np.a vp ;
|
||||
{-
|
||||
PredSCVP sc vp = mkClause sc.s (agrP3 neutrum Sg) vp ;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
incomplete concrete VerbRomance of Verb = CatRomance ** open DiffRomance, ResRomance in {
|
||||
incomplete concrete VerbRomance of Verb =
|
||||
CatRomance ** open CommonRomance, ResRomance in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
@@ -7,12 +8,9 @@ incomplete concrete VerbRomance of Verb = CatRomance ** open DiffRomance, ResRom
|
||||
|
||||
ComplV2 v np = insertObject v.c2 np (predV v) ;
|
||||
|
||||
{-
|
||||
ComplV3 v np np2 =
|
||||
insertObj
|
||||
(\\_ => v.c2 ++ np.s ! accusative ++ v.c3 ++ np2.s ! accusative)
|
||||
(predV v) ;
|
||||
ComplV3 v np np2 = insertObject v.c3 np2 (insertObject v.c2 np (predV v)) ;
|
||||
|
||||
{-
|
||||
ComplVV v vp = insertObj (\\a => v.c2 ++ infVP vp a) (predV v) ;
|
||||
ComplVS v s = insertObj (\\_ => conjThat ++ s.s ! Sub) (predV v) ;
|
||||
ComplVQ v q = insertObj (\\_ => q.s ! QIndir) (predV v) ;
|
||||
@@ -23,17 +21,18 @@ incomplete concrete VerbRomance of Verb = CatRomance ** open DiffRomance, ResRom
|
||||
insertAdv
|
||||
(ap.s ! agrAdj np.a.gn DIndef)
|
||||
(insertObj (\\_ => v.c2 ++ np.s ! accusative) (predV v)) ;
|
||||
-}
|
||||
|
||||
UseComp comp = insertObj (\\a => comp.s ! agrAdj a.gn DIndef) (predV verbBe) ;
|
||||
UseComp comp = insertComplement comp.s (predV copula) ;
|
||||
|
||||
CompAP ap = ap ;
|
||||
CompNP np = {s = \\_ => np.s ! accusative} ;
|
||||
CompAdv a = {s = \\_ => a.s} ;
|
||||
CompAP ap = {s = \\ag => ap.s ! AF ag.g ag.n} ;
|
||||
CompNP np = {s = \\_ => np.s ! Ton Acc} ;
|
||||
CompAdv a = {s = \\_ => a.s} ;
|
||||
|
||||
AdvVP vp adv = insertAdv adv.s vp ;
|
||||
AdVVP adv vp = insertAdV adv.s vp ;
|
||||
|
||||
AdVVP adv vp = insertAdv adv.s vp ;
|
||||
|
||||
{-
|
||||
ReflV2 v = insertObj (\\a => v.c2 ++ reflPron a) (predV v) ;
|
||||
|
||||
PassV2 v =
|
||||
|
||||
@@ -151,7 +151,7 @@ matchPatt cs0 (FV ts) = liftM FV $ mapM (matchPatt cs0) ts
|
||||
matchPatt cs0 trm = term2patt trm >>= match cs0 where
|
||||
match cs t =
|
||||
case cs of
|
||||
Cas ps b :_ | elem t ps -> return b
|
||||
Cas ps b :_ | elem t ps -> return b
|
||||
_:cs' -> match cs' t
|
||||
[] -> Bad $ "pattern not found for" +++ prt t
|
||||
+++ "among" ++++ unlines (map prt cs0) ---- debug
|
||||
|
||||
@@ -717,14 +717,14 @@ pattContext env typ p = case p of
|
||||
g1 <- pattContext env typ p
|
||||
g2 <- pattContext env typ q
|
||||
return $ g1 ++ g2
|
||||
PRep p' -> noBind p'
|
||||
PNeg p' -> noBind p'
|
||||
PRep p' -> noBind typeStr p'
|
||||
PNeg p' -> noBind typ p'
|
||||
|
||||
_ -> return [] ---- check types!
|
||||
where
|
||||
cnc = env
|
||||
noBind p' = do
|
||||
co <- pattContext env typeStr p'
|
||||
noBind typ p' = do
|
||||
co <- pattContext env typ p'
|
||||
if not (null co)
|
||||
then checkWarn ("no variable bound inside pattern" +++ prt p)
|
||||
>> return []
|
||||
|
||||
Reference in New Issue
Block a user