mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-20 00:22:51 -06:00
working through translator/Extensions with some reorganization and generalizations
This commit is contained in:
@@ -89,8 +89,8 @@ concrete ExtraEng of ExtraEngAbs = CatEng **
|
||||
IAdvAdv adv = {s = "how" ++ adv.s} ;
|
||||
|
||||
PartVP vp = {
|
||||
s = \\a => vp.ad ! a ++ vp.prp ++ vp.s2 ! a ;
|
||||
isPre = False ---- depends on whether there are complements
|
||||
s = \\a => vp.ad ! a ++ vp.prp ++ vp.s2 ! a ++ vp.ext ;
|
||||
isPre = vp.isSimple -- depends on whether there are complements
|
||||
} ;
|
||||
|
||||
EmbedPresPart vp = {s = infVP VVPresPart vp Simul CPos (agrP3 Sg)} ; --- agr
|
||||
@@ -162,6 +162,7 @@ lin
|
||||
inf = be.inf ;
|
||||
ad = \\_ => [] ;
|
||||
s2 = \\a => vps.ad ! a ++ ppt ++ vps.p ++ ag ++ vps.s2 ! a ++ vps.c2 ; ---- place of agent
|
||||
isSimple = False ;
|
||||
ext = vps.ext
|
||||
} ;
|
||||
|
||||
@@ -210,6 +211,36 @@ lin
|
||||
|
||||
CompoundCN a b = {s = \\n,c => a.s ! Sg ! Nom ++ b.s ! n ! c ; g = b.g} ;
|
||||
|
||||
FrontExtPredVP np vp = {
|
||||
s = \\t,a,b,o =>
|
||||
let
|
||||
subj = np.s ! npNom ;
|
||||
agr = np.a ;
|
||||
verb = vp.s ! t ! a ! b ! o ! agr ;
|
||||
compl = vp.s2 ! agr
|
||||
in
|
||||
case o of {
|
||||
ODir _ => vp.ext ++ frontComma ++ subj ++ verb.aux ++ verb.adv ++ vp.ad ! agr ++ verb.fin ++ verb.inf ++ vp.p ++ compl ;
|
||||
OQuest => verb.aux ++ subj ++ verb.adv ++ vp.ad ! agr ++ verb.fin ++ verb.inf ++ vp.p ++ compl ++ vp.ext
|
||||
}
|
||||
} ;
|
||||
|
||||
InvFrontExtPredVP np vp = {
|
||||
s = \\t,a,b,o =>
|
||||
let
|
||||
subj = np.s ! npNom ;
|
||||
agr = np.a ;
|
||||
verb = vp.s ! t ! a ! b ! o ! agr ;
|
||||
compl = vp.s2 ! agr
|
||||
in
|
||||
case o of {
|
||||
ODir _ => vp.ext ++ verb.aux ++ verb.adv ++ vp.ad ! agr ++ verb.fin ++ subj ++ verb.inf ++ vp.p ++ compl ;
|
||||
OQuest => verb.aux ++ subj ++ verb.adv ++ vp.ad ! agr ++ verb.fin ++ verb.inf ++ vp.p ++ compl ++ vp.ext
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
oper
|
||||
unc : CPolarity -> CPolarity = \x -> case x of {
|
||||
CNeg _ => CNeg False ;
|
||||
|
||||
@@ -237,7 +237,8 @@ param
|
||||
inf : Str ; -- the infinitive form ; VerbForms would be the logical place
|
||||
ad : Agr => Str ; -- sentence adverb (can be Xself, hence Agr)
|
||||
s2 : Agr => Str ; -- complement
|
||||
ext : Str -- extreposed field such as S, QS, VP
|
||||
ext : Str ; -- extreposed field such as S, QS, VP
|
||||
isSimple : Bool -- regulates the place of participle used as adjective
|
||||
} ;
|
||||
|
||||
|
||||
@@ -293,6 +294,7 @@ param
|
||||
inf = verb.s ! VInf ;
|
||||
ad = \\_ => [] ;
|
||||
ext = [] ;
|
||||
isSimple = True ; ---- but really depends on whether p == []
|
||||
s2 = \\a => if_then_Str verb.isRefl (reflPron ! a) []
|
||||
} ;
|
||||
|
||||
@@ -351,6 +353,7 @@ param
|
||||
inf = verb.inf ;
|
||||
ad = \\_ => [] ;
|
||||
ext = [] ;
|
||||
isSimple = True ;
|
||||
s2 = \\_ => []
|
||||
} ;
|
||||
|
||||
@@ -374,6 +377,7 @@ param
|
||||
inf = vp.inf ;
|
||||
ad = vp.ad ;
|
||||
s2 = \\a => vp.s2 ! a ++ obj ! a ;
|
||||
isSimple = False ;
|
||||
ext = vp.ext
|
||||
} ;
|
||||
|
||||
@@ -385,6 +389,7 @@ param
|
||||
inf = vp.inf ;
|
||||
ad = vp.ad ;
|
||||
s2 = \\a => obj ! a ++ vp.s2 ! a ;
|
||||
isSimple = False ;
|
||||
ext = vp.ext
|
||||
} ;
|
||||
|
||||
@@ -402,6 +407,7 @@ param
|
||||
inf = vp.inf ;
|
||||
ad = vp.ad ;
|
||||
s2 = \\a => obj ! a ++ vp.s2 ! a ++ vp.p ; -- and put it here ; corresponds to insertObjPre
|
||||
isSimple = False ;
|
||||
ext = vp.ext
|
||||
} ;
|
||||
|
||||
@@ -417,6 +423,7 @@ param
|
||||
inf = vp.inf ;
|
||||
ad = \\a => vp.ad ! a ++ ad ! a ;
|
||||
s2 = \\a => vp.s2 ! a ;
|
||||
isSimple = False ;
|
||||
ext = vp.ext
|
||||
} ;
|
||||
|
||||
@@ -428,6 +435,7 @@ param
|
||||
inf = vp.inf ;
|
||||
ad = vp.ad ;
|
||||
s2 = vp.s2 ;
|
||||
isSimple = False ;
|
||||
ext = vp.ext ++ e --- there should be at most one, one might think; but: I would say that it will be raining if I saw clouds
|
||||
} ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user