mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-26 19:28:54 -06:00
unbounded dep in resource with SlashVS
This commit is contained in:
@@ -32,6 +32,7 @@ abstract Cat = Common ** {
|
||||
RS ; -- relative e.g. "in which she lived"
|
||||
Cl ; -- declarative clause, with all tenses e.g. "she looks at this"
|
||||
Slash ; -- clause missing NP (S/NP in GPSG) e.g. "she looks at"
|
||||
SlashS ;-- sentence missing NP e.g. "she has looked at"
|
||||
Imp ; -- imperative e.g. "look at this"
|
||||
|
||||
--2 Questions and interrogatives
|
||||
|
||||
@@ -33,6 +33,8 @@ abstract Sentence = Cat ** {
|
||||
AdvSlash : Slash -> Adv -> Slash ; -- (whom) he sees tomorrow
|
||||
SlashPrep : Cl -> Prep -> Slash ; -- (with whom) he walks
|
||||
|
||||
SlashVS : NP -> VS -> SlashS -> Slash ; -- (whom) he says that she loves
|
||||
|
||||
--2 Imperatives
|
||||
|
||||
-- An imperative is straightforwardly formed from a verb phrase.
|
||||
@@ -60,6 +62,7 @@ abstract Sentence = Cat ** {
|
||||
UseCl : Tense -> Ant -> Pol -> Cl -> S ;
|
||||
UseQCl : Tense -> Ant -> Pol -> QCl -> QS ;
|
||||
UseRCl : Tense -> Ant -> Pol -> RCl -> RS ;
|
||||
UseSlash : Tense -> Ant -> Pol -> Slash -> SlashS ;
|
||||
|
||||
-- An adverb can be added to the beginning of a sentence.
|
||||
|
||||
|
||||
@@ -66,11 +66,11 @@ oper
|
||||
let
|
||||
paccp = case acc of {
|
||||
CRefl => <reflPron n p Acc, p,True> ;
|
||||
CPron a => <argPron a.g a.n a.p Acc, a.p,True> ;
|
||||
CPron ag an ap => <argPron ag an ap Acc, ap,True> ;
|
||||
_ => <[],P2,False>
|
||||
} ;
|
||||
pdatp = case dat of {
|
||||
CPron a => <argPron a.g a.n a.p dative, a.p,True> ;
|
||||
CPron ag an ap => <argPron ag an ap dative, ap,True> ;
|
||||
_ => <[],P2,False>
|
||||
}
|
||||
in case <paccp.p2, pdatp.p2> of {
|
||||
|
||||
@@ -27,7 +27,7 @@ lin
|
||||
-- can_VV = mkVV (verbV (poder_58 "poder")) ;
|
||||
during_Prep = mkPreposition "durant" ; ----
|
||||
either7or_DConj = {s1,s2 = "o" ; n = Sg} ;
|
||||
everybody_NP = mkNP ["tothom"] Masc Sg ;
|
||||
everybody_NP = makeNP ["tothom"] Masc Sg ;
|
||||
every_Det = {s = \\_,_ => "cada" ; n = Sg} ;
|
||||
everything_NP = pn2np (mkPN ["tot"] Masc) ;
|
||||
everywhere_Adv = ss ["a tot arreu"] ;
|
||||
@@ -91,12 +91,12 @@ lin
|
||||
Pl => \\g,c => prepCase c ++ genForms "aquells" "aquelles" ! g
|
||||
}
|
||||
} ;
|
||||
that_NP = mkNP ["alló"] Masc Sg ;
|
||||
that_NP = makeNP ["alló"] Masc Sg ;
|
||||
there_Adv = mkAdv "allà" ; -- allá
|
||||
there7to_Adv = mkAdv ["cap a allà"] ;
|
||||
there7from_Adv = mkAdv ["d'allà"] ;
|
||||
therefore_PConj = ss ["per tant"] ;
|
||||
these_NP = mkNP ["aquestes"] Fem Pl ;
|
||||
these_NP = makeNP ["aquestes"] Fem Pl ;
|
||||
they_Pron = mkPronoun
|
||||
"elles" "les" "les" "elles"
|
||||
["el seu"] ["la seva"] ["llurs"] ["llurs"]
|
||||
@@ -108,7 +108,7 @@ lin
|
||||
}
|
||||
} ;
|
||||
this_NP = pn2np (mkPN ["això"] Masc) ;
|
||||
those_NP = mkNP ["aquelles"] Fem Pl ;
|
||||
those_NP = makeNP ["aquelles"] Fem Pl ;
|
||||
through_Prep = mkPreposition "mitjançant" ;
|
||||
too_AdA = ss "massa" ;
|
||||
to_Prep = complDat ;
|
||||
|
||||
@@ -9,6 +9,7 @@ concrete CatEng of Cat = CommonX ** open ResEng, Prelude in {
|
||||
S = {s : Str} ;
|
||||
QS = {s : QForm => Str} ;
|
||||
RS = {s : Agr => Str ; c : Case} ; -- c for it clefts
|
||||
SlashS = {s : Str ; c2 : Str} ;
|
||||
|
||||
-- Sentence
|
||||
|
||||
|
||||
@@ -37,16 +37,29 @@ concrete SentenceEng of Sentence = CatEng ** open Prelude, ResEng in {
|
||||
|
||||
SlashPrep cl prep = cl ** {c2 = prep.s} ;
|
||||
|
||||
SlashVS np vs slash =
|
||||
mkClause (np.s ! Nom) np.a
|
||||
(insertObj (\\_ => conjThat ++ slash.s) (predV vs)) **
|
||||
{c2 = slash.c2} ;
|
||||
|
||||
EmbedS s = {s = conjThat ++ s.s} ;
|
||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||
EmbedVP vp = {s = infVP False vp (agrP3 Sg)} ; --- agr
|
||||
|
||||
UseCl t a p cl = {s = t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! ctr p.p ! ODir} ;
|
||||
UseQCl t a p cl = {s = \\q => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! ctr p.p ! q} ;
|
||||
UseCl t a p cl = {
|
||||
s = t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! ctr p.p ! ODir
|
||||
} ;
|
||||
UseQCl t a p cl = {
|
||||
s = \\q => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! ctr p.p ! q
|
||||
} ;
|
||||
UseRCl t a p cl = {
|
||||
s = \\r => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! ctr p.p ! r ;
|
||||
c = cl.c
|
||||
} ;
|
||||
} ;
|
||||
UseSlash t a p cl = {
|
||||
s = t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! ctr p.p ! ODir ;
|
||||
c2 = cl.c2
|
||||
} ;
|
||||
|
||||
AdvS a s = {s = a.s ++ "," ++ s.s} ;
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ concrete CatFin of Cat = CommonX ** open ResFin, Prelude in {
|
||||
S = {s : Str} ;
|
||||
QS = {s : Str} ;
|
||||
RS = {s : Agr => Str ; c : NPForm} ;
|
||||
SlashS = {s : Str ; c2 : Compl} ;
|
||||
|
||||
-- Sentence
|
||||
|
||||
|
||||
@@ -53,6 +53,16 @@ concrete SentenceFin of Sentence = CatFin ** open Prelude, ResFin in {
|
||||
c2 = prep
|
||||
} ;
|
||||
|
||||
SlashVS np vs slash = {
|
||||
s = \\t,a,p =>
|
||||
(mkClause (subjForm np vs.sc) np.a
|
||||
(insertExtrapos ("että" ++ slash.s)
|
||||
(predV vs))
|
||||
).s ! t ! a ! p ! SDecl ;
|
||||
c2 = slash.c2
|
||||
} ;
|
||||
|
||||
|
||||
EmbedS s = {s = "että" ++ s.s} ;
|
||||
EmbedQS qs = {s = qs.s} ;
|
||||
EmbedVP vp = {s = infVP (NPCase Nom) Pos (agrP3 Sg) vp} ; --- case,pol,agr
|
||||
@@ -63,7 +73,11 @@ concrete SentenceFin of Sentence = CatFin ** open Prelude, ResFin in {
|
||||
s = \\r => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! r ;
|
||||
c = cl.c
|
||||
} ;
|
||||
UseSlash t a p cl = {
|
||||
s = t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ;
|
||||
c2 = cl.c2
|
||||
} ;
|
||||
|
||||
AdvS a s = {s = a.s ++ "," ++ s.s} ;
|
||||
AdvS a s = {s = a.s ++ s.s} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ concrete CatGer of Cat =
|
||||
S = {s : Order => Str} ;
|
||||
QS = {s : QForm => Str} ;
|
||||
RS = {s : GenNum => Str ; c : Case} ;
|
||||
SlashS = {s : Order => Str} ** {c2 : Preposition} ;
|
||||
|
||||
-- Sentence
|
||||
|
||||
|
||||
@@ -39,11 +39,16 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer, Prelude in {
|
||||
|
||||
SlashPrep cl prep = cl ** {c2 = prep} ;
|
||||
|
||||
SlashVS np vs slash =
|
||||
mkClause (np.s ! Nom) np.a
|
||||
(insertExtrapos (conjThat ++ slash.s ! Sub) (predV vs)) **
|
||||
{c2 = slash.c2} ;
|
||||
|
||||
EmbedS s = {s = conjThat ++ s.s ! Sub} ;
|
||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||
EmbedVP vp = {s = useInfVP False vp} ;
|
||||
|
||||
UseCl t a p cl = {
|
||||
UseCl t a p cl = {
|
||||
s = \\o => t.s ++ a.s ++ p.s ++ cl.s ! t.m ! t.t ! a.a ! p.p ! o
|
||||
} ;
|
||||
UseQCl t a p cl = {
|
||||
@@ -53,7 +58,11 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer, Prelude in {
|
||||
s = \\r => t.s ++ a.s ++ p.s ++ cl.s ! t.m ! t.t ! a.a ! p.p ! r ;
|
||||
c = cl.c
|
||||
} ;
|
||||
UseSlash t a p cl = {
|
||||
s = \\o => t.s ++ a.s ++ p.s ++ cl.s ! t.m ! t.t ! a.a ! p.p ! o ;
|
||||
c2 = cl.c2
|
||||
} ;
|
||||
|
||||
AdvS a s = {s = \\o => a.s ++ "," ++ s.s ! o} ;
|
||||
AdvS a s = {s = \\o => a.s ++ s.s ! Inv} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -11,6 +11,11 @@ incomplete concrete CatRomance of Cat =
|
||||
S = {s : Mood => Str} ;
|
||||
QS = {s : QForm => Str} ;
|
||||
RS = {s : Mood => Agr => Str ; c : Case} ;
|
||||
SlashS = {
|
||||
s : AAgr => Mood => Str ;
|
||||
c2 : Compl
|
||||
} ;
|
||||
|
||||
|
||||
-- Sentence
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ incomplete concrete NounRomance of Noun =
|
||||
g = cn.g ;
|
||||
n = det.n
|
||||
in {
|
||||
s = \\c => det.s ! g ! npform2case c ++ cn.s ! n ;
|
||||
s = \\c => let cs = npform2case c in
|
||||
prepCase cs ++ det.s ! g ! cs ++ cn.s ! n ;
|
||||
a = agrP3 g n ;
|
||||
hasClit = False
|
||||
} ;
|
||||
|
||||
@@ -43,16 +43,35 @@ incomplete concrete SentenceRomance of Sentence =
|
||||
c2 = {s = prep.s ; c = prep.c ; isDir = False}
|
||||
} ;
|
||||
|
||||
SlashVS np vs slash =
|
||||
{s = \\d,ag =>
|
||||
(mkClause
|
||||
(np.s ! Aton Nom) np.hasClit np.a
|
||||
(insertExtrapos (\\b => conjThat ++ slash.s ! ag ! (vs.m ! b)) --- ag?
|
||||
(predV vs))
|
||||
).s ! d ;
|
||||
c2 = slash.c2
|
||||
} ;
|
||||
|
||||
EmbedS s = {s = conjThat ++ s.s ! Indic} ; --- mood
|
||||
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 ! 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} ;
|
||||
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 ;
|
||||
c = cl.c
|
||||
} ;
|
||||
UseSlash t a p cl = {
|
||||
s = \\agr,mo =>
|
||||
t.s ++ a.s ++ p.s ++ cl.s ! DDir ! agr ! t.t ! a.a ! p.p ! mo ;
|
||||
c2 = cl.c2
|
||||
} ;
|
||||
|
||||
AdvS a s = {s = \\o => a.s ++ "," ++ s.s ! o} ;
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ concrete CatRus of Cat = CommonX ** open ResRus, Prelude in {
|
||||
S = {s : Str} ;
|
||||
QS = {s : QForm => Str} ;
|
||||
RS = {s : GenNum => Case => Animacy => Str} ;
|
||||
SlashS = {s : Str; s2: Str ; c: Case} ;
|
||||
|
||||
-- Sentence
|
||||
-- clause (variable tense) e.g. "John walks"/"John walked"
|
||||
|
||||
@@ -55,6 +55,17 @@ concrete SentenceRus of Sentence = CatRus ** open Prelude, ResRus in {
|
||||
|
||||
SlashPrep cl p = {s=cl.s; s2=p.s; c=p.c} ;
|
||||
|
||||
--- AR 3/11/2007
|
||||
SlashVS ivan vidit tuUlubaeshsya = {
|
||||
s=\\b,clf => ivan.s ! PF Nom No NonPoss ++
|
||||
vidit.s! (getActVerbForm clf (pgen2gen ivan.g) ivan.n ivan.p) ++
|
||||
[", что"] ++ tuUlubaeshsya.s ;
|
||||
s2=tuUlubaeshsya.s2;
|
||||
c=tuUlubaeshsya.c
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
ImpVP inf = {s = \\pol, g,n =>
|
||||
let
|
||||
dont = case pol of {
|
||||
@@ -83,6 +94,16 @@ concrete SentenceRus of Sentence = CatRus ** open Prelude, ResRus in {
|
||||
Cond => [", "] ++ rcl.s! p.p ! ClCondit ! gn !c !anim ; --# notpresent
|
||||
_ => [", "] ++ rcl.s! p.p ! ClIndic (getTense t.t) a.a !gn !c !anim}};
|
||||
|
||||
UseSlash t a p cl = {
|
||||
s = case t.t of {
|
||||
Cond => cl.s! p.p ! ClCondit ; --# notpresent
|
||||
_ => cl.s! p.p ! ClIndic (getTense t.t) a.a
|
||||
} ;
|
||||
s2 = cl.s2 ;
|
||||
c = cl.c
|
||||
};
|
||||
|
||||
|
||||
AdvS a s = {s = a.s ++ "," ++ s.s} ; ---- AR 19/6/2007
|
||||
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ incomplete concrete CatScand of Cat =
|
||||
S = {s : Order => Str} ;
|
||||
QS = {s : QForm => Str} ;
|
||||
RS = {s : Agr => Str ; c : NPForm} ;
|
||||
SlashS = {s : Order => Str} ** {c2 : Str} ;
|
||||
|
||||
-- Sentence
|
||||
|
||||
|
||||
@@ -36,16 +36,30 @@ incomplete concrete SentenceScand of Sentence =
|
||||
|
||||
SlashPrep cl prep = cl ** {c2 = prep.s} ;
|
||||
|
||||
SlashVS np vs slash =
|
||||
mkClause
|
||||
(np.s ! nominative) np.a
|
||||
(insertObj (\\_ => conjThat ++ slash.s ! Sub) (predV vs)) **
|
||||
{c2 = slash.c2} ;
|
||||
|
||||
EmbedS s = {s = conjThat ++ s.s ! Sub} ;
|
||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||
EmbedVP vp = {s = infMark ++ infVP vp (agrP3 utrum Sg)} ; --- agr
|
||||
|
||||
UseCl t a p cl = {s = \\o => t.s ++ a.s ++ p.s ++ cl.s ! 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} ;
|
||||
UseCl t a p cl = {
|
||||
s = \\o => t.s ++ a.s ++ p.s ++ cl.s ! 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 => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! r ;
|
||||
c = cl.c
|
||||
} ;
|
||||
} ;
|
||||
UseSlash t a p cl = {
|
||||
s = \\o => t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! o ;
|
||||
c2 = cl.c2
|
||||
} ;
|
||||
|
||||
AdvS a s = {s = \\o => a.s ++ "," ++ s.s ! o} ;
|
||||
AdvS a s = {s = \\o => a.s ++ s.s ! Inv} ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user