forked from GitHub/gf-core
ResEng.mkS to mkClause
This commit is contained in:
@@ -6,19 +6,19 @@ concrete ExtEng of ExtEngAbs = CatEng ** open ResEng in {
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
|
|
||||||
PredAux np aux vp = mkS (np.s ! Nom) np.a
|
PredAux np aux vp = mkClause (np.s ! Nom) np.a {
|
||||||
(\\t,ant,b,ord,agr =>
|
s = \\t,ant,b,ord,agr =>
|
||||||
let
|
let
|
||||||
fin = aux.s ! b ;
|
fin = aux.s ! b ;
|
||||||
vf : Str -> Str -> {fin, inf : Str} = \x,y ->
|
vf : Str -> Str -> {fin, inf : Str} = \x,y ->
|
||||||
{fin = x ; inf = y} ;
|
{fin = x ; inf = y} ;
|
||||||
in
|
in
|
||||||
case ant of {
|
case ant of {
|
||||||
Simul => vf fin [] ;
|
Simul => vf fin [] ;
|
||||||
Anter => vf fin "have"
|
Anter => vf fin "have"
|
||||||
}
|
} ;
|
||||||
)
|
s2 = \\agr => infVP vp agr
|
||||||
(\\agr => infVP vp agr) ;
|
} ;
|
||||||
|
|
||||||
can_Aux = {s = \\p => posneg p "can"} ; ---- cannt
|
can_Aux = {s = \\p => posneg p "can"} ; ---- cannt
|
||||||
must_Aux = {s = \\p => posneg p "must"} ;
|
must_Aux = {s = \\p => posneg p "must"} ;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ concrete QuestionEng of Question = CatEng ** open ResEng in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
QuestVP qp vp =
|
QuestVP qp vp =
|
||||||
let cl = mkS (qp.s ! Nom) {n = qp.n ; p = P3} vp.s vp.s2
|
let cl = mkClause (qp.s ! Nom) {n = qp.n ; p = P3} vp
|
||||||
in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! ODir} ;
|
in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! ODir} ;
|
||||||
|
|
||||||
QuestSlash ip slash = {
|
QuestSlash ip slash = {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ concrete RelativeEng of Relative = CatEng ** open ResEng in {
|
|||||||
RNoAg => ag ;
|
RNoAg => ag ;
|
||||||
RAg a => a
|
RAg a => a
|
||||||
} ;
|
} ;
|
||||||
cl = mkS (rp.s ! Nom) agr vp.s vp.s2
|
cl = mkClause (rp.s ! Nom) agr vp
|
||||||
in
|
in
|
||||||
cl.s ! t ! ant ! b ! ODir
|
cl.s ! t ! ant ! b ! ODir
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -232,12 +232,12 @@ resource ResEng = ParamEng ** open Prelude in {
|
|||||||
s : Tense => Anteriority => Polarity => Ord => Str
|
s : Tense => Anteriority => Polarity => Ord => Str
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkS : Str -> Agr -> VerbForms -> (Agr => Str) -> Clause =
|
mkClause : Str -> Agr -> VP -> Clause =
|
||||||
\subj,agr,verb,compl0 -> {
|
\subj,agr,vp -> {
|
||||||
s = \\t,a,b,o =>
|
s = \\t,a,b,o =>
|
||||||
let
|
let
|
||||||
verb = verb ! t ! a ! b ! o ! agr ;
|
verb = vp.s ! t ! a ! b ! o ! agr ;
|
||||||
compl = compl0 ! agr
|
compl = vp.s2 ! agr
|
||||||
in
|
in
|
||||||
case o of {
|
case o of {
|
||||||
ODir => subj ++ verb.fin ++ verb.inf ++ compl ;
|
ODir => subj ++ verb.fin ++ verb.inf ++ compl ;
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ concrete SentenceEng of Sentence = CatEng ** open ResEng in {
|
|||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
PredVP np vp = mkS (np.s ! Nom) np.a vp.s vp.s2 ;
|
PredVP np vp = mkClause (np.s ! Nom) np.a vp ;
|
||||||
|
|
||||||
PredSCVP sc vp = mkS sc.s (agrP3 Sg) vp.s vp.s2 ;
|
PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp ;
|
||||||
|
|
||||||
ImpVP vp = {
|
ImpVP vp = {
|
||||||
s = \\pol,n =>
|
s = \\pol,n =>
|
||||||
@@ -20,11 +20,11 @@ concrete SentenceEng of Sentence = CatEng ** open ResEng in {
|
|||||||
dont ++ verb
|
dont ++ verb
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SlashV2 np v2 = mkS (np.s ! Nom) np.a (predV v2).s (\\_ => []) **
|
SlashV2 np v2 =
|
||||||
{c2 = v2.c2} ;
|
mkClause (np.s ! Nom) np.a (predV v2) ** {c2 = v2.c2} ;
|
||||||
|
|
||||||
SlashVVV2 np vv v2 =
|
SlashVVV2 np vv v2 =
|
||||||
mkS (np.s ! Nom) np.a (predV vv).s (\\_ => "to" ++ v2.s ! VInf) **
|
mkClause (np.s ! Nom) np.a (insertObj (\\_ => "to" ++ v2.s ! VInf) (predV vv)) **
|
||||||
{c2 = v2.c2} ;
|
{c2 = v2.c2} ;
|
||||||
|
|
||||||
AdvSlash slash adv = {
|
AdvSlash slash adv = {
|
||||||
|
|||||||
Reference in New Issue
Block a user