fix the agreement for ClSlash & SSlash

This commit is contained in:
krasimir
2008-06-13 20:32:33 +00:00
parent 7679730d0f
commit 610574e845
5 changed files with 27 additions and 20 deletions

View File

@@ -25,13 +25,13 @@ concrete CatBul of Cat = open ResBul, Prelude, (R = ParamX) in {
QS = {s : QForm => Str} ;
RS = {s : GenNum => Str} ;
SC = {s : Str} ;
SSlash = {s : Str ; c2 : Preposition} ;
SSlash = {s : Agr => Str ; c2 : Preposition} ;
-- Sentence
Cl = {s : ResBul.Tense => Anteriority => Polarity => Order => Str} ;
ClSlash = {
s : ResBul.Tense => Anteriority => Polarity => Order => Str ;
s : Agr => ResBul.Tense => Anteriority => Polarity => Order => Str ;
c2 : Preposition
} ;
Imp = {s : Polarity => GenNum => Str} ;

View File

@@ -18,7 +18,8 @@ concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! Main} ;
QuestSlash ip slash =
mkQuestion {s1 = slash.c2.s ++ ip.s ! (RObj slash.c2.c); s2 = slash.c2.s ++ ip.s ! (RObj slash.c2.c)} slash ;
mkQuestion {s1 = slash.c2.s ++ ip.s ! (RObj slash.c2.c); s2 = slash.c2.s ++ ip.s ! (RObj slash.c2.c)}
{s = slash.s ! (agrP3 ip.gn) } ;
QuestIAdv iadv cl = mkQuestion iadv cl ;

View File

@@ -18,7 +18,7 @@ concrete RelativeBul of Relative = CatBul ** open ResBul in {
} ;
RelSlash rp slash = {
s = \\t,a,p,gn => slash.c2.s ++ (rp.s ! gn) ++ slash.s ! t ! a ! p ! Main ;
s = \\t,a,p,gn => slash.c2.s ++ rp.s ! gn ++ slash.s ! (agrP3 gn) ! t ! a ! p ! Main ;
role = RObj Acc
} ;

View File

@@ -412,20 +412,23 @@ resource ResBul = ParamX ** open Prelude in {
s : Tense => Anteriority => Polarity => Order => Str
} ;
mkClause : Str -> Agr -> VP -> Clause =
\subj,agr,vp -> {
mkClSlash : Str -> Agr -> Agr -> VP -> Clause =
\subj,agr_vp,agr_compl,vp -> {
s = \\t,a,p,o =>
let
verb : Bool => Str
= \\q => vp.ad ! q ++ vp.s ! t ! a ! p ! agr ! q ! Perf ;
compl = vp.s2 ! agr
= \\q => vp.ad ! q ++ vp.s ! t ! a ! p ! agr_vp ! q ! Perf ;
compl = vp.s2 ! agr_compl
in case o of {
Main => subj ++ verb ! False ++ compl ;
Inv => verb ! False ++ compl ++ subj ;
Quest => subj ++ verb ! True ++ compl
}
} ;
mkClause : Str -> Agr -> VP -> Clause =
\subj,agr,vp -> mkClSlash subj agr agr vp ;
-- For $Numeral$.
mkDigit : Str -> Str -> Str -> Str -> Str -> {s : DForm => CardOrd => Str} =

View File

@@ -16,20 +16,23 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
verb ++ compl
} ;
SlashVP np vp =
mkClause (np.s ! RSubj) np.a vp ** {c2 = vp.c2} ;
AdvSlash slash adv = {
s = \\t,a,b,o => slash.s ! t ! a ! b ! o ++ adv.s ;
SlashVP np slash = {
s = \\agr => (mkClSlash (np.s ! RSubj) np.a agr slash).s ;
c2 = slash.c2
} ;
SlashPrep cl prep = cl ** {c2 = prep} ;
AdvSlash slash adv = {
s = \\agr,t,a,b,o => slash.s ! agr ! t ! a ! b ! o ++ adv.s ;
c2 = slash.c2
} ;
SlashPrep cl prep = {s = \\_ => cl.s; c2 = prep} ;
SlashVS np vs slash =
mkClause (np.s ! RSubj) np.a
(insertObj (\\_ => "֌" ++ slash.s) (predV vs)) **
{c2 = slash.c2} ;
SlashVS np vs slash = {
s = \\agr => (mkClause (np.s ! RSubj) np.a
(insertObj (\\_ => "֌" ++ slash.s ! agr) (predV vs))).s ;
c2 = slash.c2
} ;
EmbedS s = {s = "," ++ "֌" ++ s.s} ;
EmbedQS qs = {s = qs.s ! QIndir} ;
@@ -46,7 +49,7 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in {
role = cl.role
} ;
UseSlash t a p cl = {
s = t.s ++ a.s ++ p.s ++ cl.s ! t.t ! a.a ! p.p ! Main ;
s = \\agr => t.s ++ a.s ++ p.s ++ cl.s ! agr ! t.t ! a.a ! p.p ! Main ;
c2 = cl.c2
} ;