mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-28 20:36:29 -06:00
changes in conjunction and sentences
to accomodate if _ then conjuction with jiu "就"
This commit is contained in:
+30
-14
@@ -1,4 +1,4 @@
|
||||
concrete SentenceChi of Sentence = CatChi **
|
||||
concrete SentenceChi of Sentence = CatChi **
|
||||
open Prelude, ResChi in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
@@ -12,39 +12,55 @@ concrete SentenceChi of Sentence = CatChi **
|
||||
ImpVP vp = {
|
||||
s = table {
|
||||
Pos => infVP vp ;
|
||||
Neg => neg_s ++ infVP vp
|
||||
Neg => neg_s ++ infVP vp
|
||||
}
|
||||
} ;
|
||||
|
||||
SlashVP np vp =
|
||||
SlashVP np vp =
|
||||
mkClauseCompl np.s vp []
|
||||
** {c2 = vp.c2} ;
|
||||
|
||||
SlashVS np vs sslash = <mkClause np.s vs sslash.s : Clause> ** {c2 = sslash.c2} ;
|
||||
|
||||
|
||||
|
||||
-- yet another reason for discontinuity of clauses
|
||||
AdvSlash slash adv = slash ** {vp = insertAdv adv slash.vp} ;
|
||||
---- parser loops with unknown tokens if this version is used AR 20/4/2014
|
||||
---- mkClauseCompl slash.np <insertAdv adv slash.vp : VP> []
|
||||
---- ** {c2 = slash.c2} ;
|
||||
|
||||
|
||||
SlashPrep cl prep = cl ** {c2 = prep} ;
|
||||
|
||||
EmbedS s = ss (conjThat ++ s.s) ;
|
||||
|
||||
EmbedS s = ss (conjThat ++ linS s) ;
|
||||
EmbedQS qs = ss (qs.s ! False) ;
|
||||
EmbedVP vp = ss (infVP vp) ;
|
||||
|
||||
UseCl t p cl = {s = t.s ++ p.s ++ cl.s ! p.p ! t.t} ;
|
||||
UseQCl t p cl = {s = \\isDir => t.s ++ p.s ++ cl.s ! isDir ! p.p ! t.t} ;
|
||||
UseRCl t p cl = {s = t.s ++ p.s ++ cl.s ! p.p ! t.t} ;
|
||||
UseCl t p cl = {
|
||||
preJiu = cl.np ;
|
||||
postJiu = t.s ++ p.s ++ cl.postJiu ! p.p ! t.t} ;
|
||||
|
||||
UseQCl t p cl = {s = \\isDir => t.s ++ p.s ++ cl.s ! isDir ! p.p ! t.t} ;
|
||||
UseRCl t p cl = {s = t.s ++ p.s ++ cl.s ! p.p ! t.t} ;
|
||||
UseSlash t p cl = {s = t.s ++ p.s ++ cl.s ! p.p ! t.t ; c2 = cl.c2} ;
|
||||
|
||||
AdvS a s = ss (a.s ++ s.s) ;
|
||||
ExtAdvS a s = ss (a.s ++ chcomma ++ s.s) ;
|
||||
AdvS a s = s ** {
|
||||
preJiu = a.s ++ s.preJiu -- tomorrow she
|
||||
} ;
|
||||
|
||||
RelS s r = ss (s.s ++ r.s) ;
|
||||
ExtAdvS a s = s ** {
|
||||
preJiu = a.s ++ chcomma ++ s.preJiu -- tomorrow, she
|
||||
} ;
|
||||
|
||||
SSubjS a subj b = ss (a.s ++ subj.prePart ++ b.s ++ subj.sufPart) ;
|
||||
RelS s r = s ** {
|
||||
postJiu = s.postJiu ++ r.s ;
|
||||
} ;
|
||||
|
||||
-- a="she walks", b="I die"
|
||||
-- result: preJiu="if she walks, I", postJiu="die"
|
||||
SSubjS a subj b = {
|
||||
preJiu = linS a ++ subj.prePart -- if she walks,
|
||||
++ b.preJiu ; -- I
|
||||
postJiu = b.postJiu ++ subj.sufPart -- die
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user