mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-12 06:19:33 -06:00
Romance inverted questions
This commit is contained in:
@@ -381,7 +381,9 @@ Finnish
|
||||
|
||||
French
|
||||
- multiple clitics (with V3) not always right
|
||||
- no pronominal questions with inverted word order
|
||||
- third person pronominal questions with inverted word order
|
||||
have wrong form and position w.r.t. "pas"
|
||||
(e.g. "comment ne fera-t-il pas " becomes "comment ne fera pas il")
|
||||
|
||||
|
||||
German
|
||||
|
||||
@@ -14,7 +14,8 @@ concrete IdiomFre of Idiom = CatFre **
|
||||
ExistIP ip = {
|
||||
s = \\t,a,p,_ =>
|
||||
ip.s ! Nom ++
|
||||
(mkClause "il" (agrP3 Masc Sg) (insertClit2 "y" (predV avoir_V))).s ! t ! a ! p ! Indic
|
||||
(mkClause "il" (agrP3 Masc Sg) (insertClit2 "y" (predV avoir_V))).s
|
||||
! DDir ! t ! a ! p ! Indic ---- DInv
|
||||
} ;
|
||||
|
||||
CleftNP np rs = mkClause elisCe (agrP3 Masc Sg)
|
||||
|
||||
@@ -26,7 +26,7 @@ concrete IdiomIta of Idiom = CatIta **
|
||||
ip.s ! Nom ++
|
||||
(mkClause [] (agrP3 ip.a.g ip.a.n)
|
||||
(insertClit2 (elision "ci" "c'" "ci")
|
||||
(predV copula))).s ! t ! a ! p ! Indic
|
||||
(predV copula))).s ! DDir ! t ! a ! p ! Indic
|
||||
} ;
|
||||
|
||||
ProgrVP vp =
|
||||
|
||||
@@ -14,9 +14,9 @@ incomplete concrete CatRomance of Cat =
|
||||
|
||||
-- Sentence
|
||||
|
||||
Cl = {s : RTense => Anteriority => Polarity => Mood => Str} ;
|
||||
Cl = {s : Direct => RTense => Anteriority => Polarity => Mood => Str} ;
|
||||
Slash = {
|
||||
s : AAgr => RTense => Anteriority => Polarity => Mood => Str ;
|
||||
s : Direct => AAgr => RTense => Anteriority => Polarity => Mood => Str ;
|
||||
c2 : Compl
|
||||
} ;
|
||||
Imp = {s : Polarity => ImpForm => Gender => Str} ;
|
||||
|
||||
@@ -21,6 +21,8 @@ param
|
||||
|
||||
Mood = Indic | Conjunct ;
|
||||
|
||||
Direct = DDir | DInv ;
|
||||
|
||||
-- Adjectives are inflected in gender and number, and there is also an
|
||||
-- adverbial form (e.g. "infiniment"), which has different paradigms and
|
||||
-- can even be irregular ("bien").
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
incomplete concrete QuestionRomance of Question =
|
||||
CatRomance ** open CommonRomance, ResRomance in {
|
||||
CatRomance ** open CommonRomance, ResRomance, Prelude in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
@@ -7,7 +7,7 @@ incomplete concrete QuestionRomance of Question =
|
||||
|
||||
QuestCl cl = {
|
||||
s = \\t,a,p =>
|
||||
let cls = cl.s ! t ! a ! p
|
||||
let cls = cl.s ! DDir ! t ! a ! p ---- DInv?
|
||||
in table {
|
||||
QDir => cls ! Indic ;
|
||||
QIndir => subjIf ++ cls ! Indic
|
||||
@@ -19,24 +19,25 @@ incomplete concrete QuestionRomance of Question =
|
||||
let
|
||||
cl = mkClause (qp.s ! Nom) (agrP3 qp.a.g qp.a.n) vp
|
||||
in
|
||||
cl.s ! t ! a ! b ! Indic
|
||||
cl.s ! DDir ! t ! a ! b ! Indic
|
||||
} ;
|
||||
|
||||
QuestSlash ip slash = {
|
||||
s = \\t,a,p =>
|
||||
let
|
||||
cls = slash.s ! ip.a ! t ! a ! p ! Indic ;
|
||||
cls : Direct -> Str =
|
||||
\d -> slash.s ! d ! ip.a ! t ! a ! p ! Indic ;
|
||||
who = slash.c2.s ++ ip.s ! slash.c2.c
|
||||
in table {
|
||||
QDir => who ++ cls ;
|
||||
QIndir => partQIndir ++ who ++ cls
|
||||
QDir => who ++ cls DInv ;
|
||||
QIndir => partQIndir ++ who ++ cls DDir
|
||||
}
|
||||
} ;
|
||||
|
||||
QuestIAdv iadv cl = {
|
||||
s = \\t,a,p,_ =>
|
||||
let
|
||||
cls = cl.s ! t ! a ! p ! Indic ;
|
||||
cls = cl.s ! DInv ! t ! a ! p ! Indic ;
|
||||
why = iadv.s
|
||||
in why ++ cls
|
||||
} ;
|
||||
@@ -45,7 +46,8 @@ incomplete concrete QuestionRomance of Question =
|
||||
s = \\t,a,p,_ =>
|
||||
let
|
||||
vp = predV copula ;
|
||||
cls = (mkClause (np.s ! Aton Nom) np.a vp).s ! t ! a ! p ! Indic ;
|
||||
cls = (mkClause (np.s ! Aton Nom) np.a vp).s !
|
||||
DInv ! t ! a ! p ! Indic ;
|
||||
why = icomp.s ! {g = np.a.g ; n = np.a.n}
|
||||
in why ++ cls
|
||||
} ;
|
||||
|
||||
@@ -6,7 +6,8 @@ incomplete concrete RelativeRomance of Relative =
|
||||
lin
|
||||
|
||||
RelCl cl = {
|
||||
s = \\ag,t,a,p,m => pronSuch ! ag ++ conjThat ++ cl.s ! t ! a ! p ! m ;
|
||||
s = \\ag,t,a,p,m => pronSuch ! ag ++ conjThat ++
|
||||
cl.s ! DDir ! t ! a ! p ! m ;
|
||||
c = Nom
|
||||
} ;
|
||||
|
||||
@@ -16,12 +17,12 @@ incomplete concrete RelativeRomance of Relative =
|
||||
(mkClause
|
||||
(rp.s ! False ! {g = ag.g ; n = ag.n} ! Nom)
|
||||
{g = rp.a.g ; n = rp.a.n ; p = P3}
|
||||
vp).s ; c = Nom} ;
|
||||
vp).s ! DDir ; c = Nom} ;
|
||||
False => {s = \\ag =>
|
||||
(mkClause
|
||||
(rp.s ! False ! {g = ag.g ; n = ag.n} ! Nom)
|
||||
ag
|
||||
vp).s ; c = Nom
|
||||
vp).s ! DDir ; c = Nom
|
||||
}
|
||||
} ;
|
||||
|
||||
@@ -31,7 +32,7 @@ incomplete concrete RelativeRomance of Relative =
|
||||
in
|
||||
slash.c2.s ++
|
||||
rp.s ! False ! aag ! slash.c2.c ++
|
||||
slash.s ! aag ! t ! a ! p ! m ; --- ragr
|
||||
slash.s ! DDir ! aag ! t ! a ! p ! m ; --- ragr
|
||||
c = Acc
|
||||
} ;
|
||||
|
||||
|
||||
@@ -195,9 +195,9 @@ oper
|
||||
} ;
|
||||
|
||||
mkClause : Str -> Agr -> VP ->
|
||||
{s : RTense => Anteriority => Polarity => Mood => Str} =
|
||||
{s : Direct => RTense => Anteriority => Polarity => Mood => Str} =
|
||||
\subj,agr,vp -> {
|
||||
s = \\t,a,b,m =>
|
||||
s = \\d,t,a,b,m =>
|
||||
let
|
||||
tm = case t of {
|
||||
RPast => VImperf m ; --# notpresent
|
||||
@@ -213,8 +213,17 @@ oper
|
||||
clpr = pronArg agr.n agr.p vp.clAcc vp.clDat ;
|
||||
compl = clpr.p2 ++ vp.comp ! agr ++ vp.ext ! b
|
||||
in
|
||||
subj ++ neg.p1 ++ clpr.p1 ++ vp.clit2 ++ verb ++ neg.p2 ++ inf ++ compl
|
||||
case d of {
|
||||
DDir =>
|
||||
subj ++ neg.p1 ++ clpr.p1 ++ vp.clit2 ++ verb ++ neg.p2 ++ inf ;
|
||||
DInv =>
|
||||
neg.p1 ++ clpr.p1 ++ vp.clit2 ++ verb ++ neg.p2 ++ inf ++ subj
|
||||
}
|
||||
++ compl
|
||||
} ;
|
||||
--- in French, pronouns should be before neg.v2 in inverted clauses
|
||||
--- and have a "-" with possibly a special verb form with "t":
|
||||
--- "comment ne fera-t-il pas" vs. "comment ne fera pas Pierre"
|
||||
|
||||
infVP : VP -> Agr -> Str = \vp,agr ->
|
||||
let
|
||||
|
||||
@@ -15,31 +15,31 @@ incomplete concrete SentenceRomance of Sentence =
|
||||
} ;
|
||||
|
||||
SlashV2 np v2 =
|
||||
{s = \\ag =>case <v2.c2.c,v2.c2.isDir> of {
|
||||
{s = \\d,ag =>case <v2.c2.c,v2.c2.isDir> of {
|
||||
<Acc,True> =>
|
||||
(mkClause (np.s ! Aton Nom) np.a
|
||||
(insertAgr ag (predV v2))).s ;
|
||||
_ => (mkClause (np.s ! Aton Nom) np.a (predV v2)).s
|
||||
(insertAgr ag (predV v2))).s ! d ;
|
||||
_ => (mkClause (np.s ! Aton Nom) np.a (predV v2)).s ! d
|
||||
} ;
|
||||
c2 = v2.c2
|
||||
} ;
|
||||
|
||||
SlashVVV2 np vv v2 =
|
||||
{s = \\_ =>
|
||||
{s = \\d,_ =>
|
||||
(mkClause
|
||||
(np.s ! Aton Nom) np.a
|
||||
(insertComplement
|
||||
(\\a => prepCase vv.c2.c ++ v2.s ! VInfin False) (predV vv))).s ;
|
||||
(\\a => prepCase vv.c2.c ++ v2.s ! VInfin False) (predV vv))).s ! d;
|
||||
c2 = v2.c2
|
||||
} ;
|
||||
|
||||
AdvSlash slash adv = {
|
||||
s = \\ag,t,a,b,m => slash.s ! ag ! t ! a ! b ! m ++ adv.s ;
|
||||
s = \\d,ag,t,a,b,m => slash.s ! d! ag ! t ! a ! b ! m ++ adv.s ;
|
||||
c2 = slash.c2
|
||||
} ;
|
||||
|
||||
SlashPrep cl prep = {
|
||||
s = \\_ => cl.s ;
|
||||
s = \\d,_ => cl.s ! d ;
|
||||
c2 = {s = prep.s ; c = prep.c ; isDir = False}
|
||||
} ;
|
||||
|
||||
@@ -47,7 +47,7 @@ incomplete concrete SentenceRomance of Sentence =
|
||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||
EmbedVP vp = {s = infVP vp (agrP3 Masc Sg)} ; --- agr ---- compl
|
||||
|
||||
UseCl t a p cl = {s = \\o => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! o} ;
|
||||
UseCl t a p cl = {s = \\o => t.s ++ a.s ++ p.s ++ cl.s ! DDir ! t.t ! a.a ! p.p ! o} ;
|
||||
UseQCl t a p cl = {s = \\q => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! q} ;
|
||||
UseRCl t a p cl = {
|
||||
s = \\r,ag => t.s ++ a.s ++ p.s ++ cl.s ! ag ! t.t ! a.a ! p.p ! r ;
|
||||
|
||||
@@ -22,7 +22,7 @@ concrete IdiomSpa of Idiom = CatSpa **
|
||||
ExistIP ip = {
|
||||
s = \\t,a,p,_ =>
|
||||
ip.s ! Nom ++
|
||||
(mkClause [] (agrP3 Masc Sg) (predV (verboV (hay_3 "haber")))).s ! t ! a ! p ! Indic
|
||||
(mkClause [] (agrP3 Masc Sg) (predV (verboV (hay_3 "haber")))).s ! DDir ! t ! a ! p ! Indic
|
||||
} ;
|
||||
|
||||
ProgrVP vp =
|
||||
|
||||
Reference in New Issue
Block a user