add definite forms for IAdv,IDet,IP, etc

This commit is contained in:
krasimir
2008-06-15 11:23:36 +00:00
parent 06b527283e
commit 1ab4f13416
7 changed files with 39 additions and 37 deletions

View File

@@ -39,10 +39,10 @@ concrete CatBul of Cat = open ResBul, Prelude, (R = ParamX) in {
-- Question
QCl = {s : ResBul.Tense => Anteriority => Polarity => QForm => Str} ;
IP = {s : Role => Str; gn : GenNum} ;
IComp = {s1,s2 : Str} ;
IDet = {s : DGender => Str; n : Number ; nonEmpty : Bool} ;
IQuant = {s : GenNum => Str} ;
IP = {s : Role => Species => Str; gn : GenNum} ;
IComp = {s : Species => Str} ;
IDet = {s : DGender => Species => Str; n : Number ; nonEmpty : Bool} ;
IQuant = {s : GenNum => Species => Str} ;
-- Relative
@@ -65,7 +65,7 @@ concrete CatBul of Cat = open ResBul, Prelude, (R = ParamX) in {
Adv = {s : Str} ;
CAdv = {s : Str; sn : Str} ;
IAdv = {s1,s2 : Str} ;
IAdv = {s : Species => Str} ;
AdA = {s : Str} ;
-- Noun

View File

@@ -48,8 +48,8 @@ concrete IdiomBul of Idiom = CatBul ** open Prelude, ParadigmsBul, ResBul in {
} ;
ExistIP ip =
mkQuestion {s1=ip.s ! RSubj; s2=ip.s ! RSubj}
(mkClause "òóê" (agrP3 ip.gn) (predV verbBe)) ;
mkQuestion {s = ip.s ! RSubj}
(mkClause "òóê" (agrP3 ip.gn) (predV verbBe)) ;
ProgrVP vp = {
s = \\_ => vp.s ! Imperf ;

View File

@@ -178,5 +178,5 @@ oper
--
mkIAdv : Str -> IAdv ;
mkIAdv s = {s1 = s; s2 = s + "ňî"; lock_IAdv = <>} ;
mkIAdv s = {s = table {Indef=>s;Def=>s+"ňî"}; lock_IAdv = <>} ;
}

View File

@@ -9,8 +9,8 @@ concrete PhraseBul of Phrase = CatBul ** open Prelude, ResBul in {
UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! GPl} ;
UttImpPol pol imp = {s = pol.s ++ imp.s ! pol.p ! GPl} ;
UttIP ip = {s = ip.s ! RSubj} ;
UttIAdv iadv = {s = iadv.s1} ;
UttIP ip = {s = ip.s ! RSubj ! Indef} ;
UttIAdv iadv = {s = iadv.s ! Indef} ;
UttNP np = {s = np.s ! RSubj} ;
UttVP vp = {s = daComplex vp ! Perf ! agrP3 (GSg Neut)} ;
UttAdv adv = adv ;

View File

@@ -13,12 +13,13 @@ concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
} ---- "whether" in ExtEng
} ;
QuestVP ip vp =
let cl = mkClause (ip.s ! RSubj) {gn = ip.gn ; p = P3} vp
in {s = \\t,a,b,_ => cl.s ! t ! a ! b ! Main} ;
QuestVP ip vp = {
s = \\t,a,b,qform =>
(mkClause (ip.s ! RSubj ! (case qform of {QDir=>Indef; QIndir=>Def})) {gn = ip.gn ; p = P3} vp).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)}
mkQuestion {s = \\spec => slash.c2.s ++ ip.s ! (RObj slash.c2.c) ! spec}
{s = slash.s ! (agrP3 ip.gn) } ;
QuestIAdv iadv cl = mkQuestion iadv cl ;
@@ -26,37 +27,35 @@ concrete QuestionBul of Question = CatBul ** open ResBul, Prelude in {
QuestIComp icomp np =
mkQuestion icomp (mkClause (np.s ! RSubj) np.a (predV verbBe)) ;
PrepIP p ip = {s1 = p.s ++ ip.s ! RSubj; s2 = p.s ++ ip.s ! RSubj} ;
PrepIP p ip = {s = \\spec => p.s ++ ip.s ! RSubj ! spec} ;
AdvIP ip adv = {
s = \\c => ip.s ! c ++ adv.s ;
s = \\role,spec => ip.s ! role ! spec ++ adv.s ;
gn = ip.gn
} ;
CompIAdv a = a ;
IdetCN idet cn = {
s = \\c => let nf = case <idet.n, idet.nonEmpty> of {
<Pl,True> => NFPlCount ;
_ => NF idet.n Indef
}
in idet.s ! cn.g ++ cn.s ! nf ;
s = \\_,spec => let nf = case <idet.n, idet.nonEmpty> of {
<Pl,True> => NFPlCount ;
_ => NF idet.n Indef
}
in idet.s ! cn.g ! spec ++ cn.s ! nf ;
gn = gennum cn.g idet.n
} ;
IdetIP idet = {
s = \\c => idet.s ! DNeut ;
s = \\_ => idet.s ! DNeut ;
gn = gennum DNeut idet.n
} ;
IdetQuant iquant num = {
s = \\g => iquant.s ! gennum g num.n ++
num.s ! dgenderSpecies g Indef RSubj ;
s = \\g,spec => iquant.s ! gennum g num.n ! spec ++
num.s ! dgenderSpecies g Indef RSubj ;
n = num.n ;
nonEmpty = num.nonEmpty
} ;
---- what should there be in s1,s2 ? AR
CompIP ip = {s1 = ip.s ! RSubj ; s2 = []} ;
CompIP ip = {s = ip.s ! RSubj} ;
}

View File

@@ -522,13 +522,13 @@ resource ResBul = ParamX ** open Prelude in {
DNeutDef => addDef dve
} ;
mkIP : Str -> Str -> GenNum -> {s : Role => Str ; gn : GenNum} =
mkIP : Str -> Str -> GenNum -> {s : Role => Species => Str ; gn : GenNum} =
\koi,kogo,gn -> {
s = table {
RSubj => koi ;
RObj Acc => kogo ;
RObj Dat => "íà" ++ kogo ;
RVoc => koi
RSubj => table {Indef=>koi; Def=>koi+"òî"} ;
RObj Acc => table {Indef=>kogo; Def=>kogo+"òî"} ;
RObj Dat => table {Indef=>"íà" ++ kogo; Def=>"íà" ++ kogo+"òî"} ;
RVoc => table {Indef=>koi; Def=>koi+"òî"}
} ;
gn = gn
} ;
@@ -575,14 +575,14 @@ resource ResBul = ParamX ** open Prelude in {
Preposition : Type = {s : Str; c : Case};
mkQuestion :
{s1,s2 : Str} -> Clause ->
{s : Species => Str} -> Clause ->
{s : Tense => Anteriority => Polarity => QForm => Str} = \wh,cl ->
{
s = \\t,a,p =>
let cls = cl.s ! t ! a ! p ;
in table {
QDir => wh.s1 ++ cls ! Inv ;
QIndir => wh.s2 ++ cls ! Main
QDir => wh.s ! Indef ++ cls ! Inv ;
QIndir => wh.s ! Def ++ cls ! Main
}
} ;

View File

@@ -35,7 +35,7 @@ concrete StructuralBul of Structural = CatBul **
here7to_Adv = ss ["äî òóê"] ;
here7from_Adv = ss ["îò òóê"] ;
how_IAdv = mkIAdv "êàê" ;
how8many_IDet = {s = \\_ => "êîëêî"; n = Pl; nonEmpty = False} ;
how8many_IDet = {s = \\_ => table Species ["êîëêî";"êîëêîòî"]; n = Pl; nonEmpty = False} ;
if_Subj = ss "àêî" ;
in8front_Prep = mkPrep "ïðåä" Acc ;
i_Pron = mkPron "àç" "ìåí" "ìè" "ìîé" "ìîÿ" "ìîÿò" "ìîÿ" "ìîÿòà" "ìîå" "ìîåòî" "ìîè" "ìîèòå" (GSg Masc) P1 ;
@@ -101,7 +101,10 @@ concrete StructuralBul of Structural = CatBul **
when_IAdv = mkIAdv "êîãà" ;
when_Subj = ss "êîãàòî" ;
where_IAdv = mkIAdv "êúäå" ;
which_IQuant = {s = table GenNum ["êîé";"êîÿ";"êîå";"êîè"]} ;
which_IQuant = {s = table GenNum [table Species ["êîé";"êîéòî"];
table Species ["êîÿ";"êîÿòî"];
table Species ["êîå";"êîåòî"];
table Species ["êîè";"êîèòî"]]} ;
whoSg_IP = mkIP "êîé" "êîãî" (GSg Masc) ;
whoPl_IP = mkIP "êîè" "êîè" GPl ;
why_IAdv = mkIAdv "çàùî" ;