forked from GitHub/gf-rgl
(Pes) make Subj take indicative or subjunctive
This commit is contained in:
@@ -8,7 +8,7 @@ concrete AdverbPes of Adverb = CatPes ** open ResPes, Prelude in {
|
||||
s = a.adv ++ cadv.p ++ cadv.s ++ np.s ! Bare ;
|
||||
} ;
|
||||
ComparAdvAdjS cadv a s = {
|
||||
s = a.adv ++ cadv.p ++ cadv.s ++ s.s;
|
||||
s = a.adv ++ cadv.p ++ cadv.s ++ s.s ! Indic;
|
||||
} ;
|
||||
|
||||
PrepNP prep np = {s = prep.s ++ np.s ! Bare } ;
|
||||
@@ -16,7 +16,7 @@ concrete AdverbPes of Adverb = CatPes ** open ResPes, Prelude in {
|
||||
AdAdv ada adv = { s = ada.s ++ adv.s} ;
|
||||
|
||||
-- SubjS = cc2 ;
|
||||
SubjS sub snt = {s = sub.s ++ "که" ++ snt.s } ;
|
||||
SubjS sub snt = {s = sub.s ++ "که" ++ snt.s ! sub.compl} ;
|
||||
AdnCAdv cadv = {s = cadv.s ++ "از"} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@ concrete CatPes of Cat = CommonX - [Adv] ** open ResPes, Prelude in {
|
||||
lincat
|
||||
------ Tensed/Untensed
|
||||
|
||||
S = {s : Str} ;
|
||||
S = {s : VVForm => Str} ; -- as a complement to Subj
|
||||
QS = {s : QForm => Str} ;
|
||||
RS = {s : Agr => Str } ; -- c for it clefts
|
||||
SSlash = {s : Str ; c2 : ResPes.Compl} ;
|
||||
SSlash = {s : VVForm => Str ; c2 : ResPes.Compl} ;
|
||||
|
||||
---- Sentence
|
||||
|
||||
@@ -75,7 +75,7 @@ concrete CatPes of Cat = CommonX - [Adv] ** open ResPes, Prelude in {
|
||||
Conj = {s1,s2 : Str ; n : Number} ;
|
||||
-----b Conj = {s : Str ; n : Number} ;
|
||||
-----b DConj = {s1,s2 : Str ; n : Number} ;
|
||||
Subj = {s : Str} ;
|
||||
Subj = {s : Str ; compl : VVForm} ; -- subjunctive or indicative
|
||||
Prep = {s : Str};
|
||||
---- Open lexical classes, e.g. Lexicon
|
||||
V, VS, VQ, VA = ResPes.Verb ;
|
||||
|
||||
@@ -7,7 +7,7 @@ concrete ConjunctionPes of Conjunction =
|
||||
|
||||
lin
|
||||
|
||||
ConjS = conjunctDistrSS ;
|
||||
ConjS = conjunctDistrTable VVForm ;
|
||||
|
||||
ConjAdv = conjunctDistrSS ;
|
||||
-- ConjAdv conj advs = conjunctDistrTable Gender conj advs ;
|
||||
@@ -22,12 +22,12 @@ concrete ConjunctionPes of Conjunction =
|
||||
|
||||
---- These fun's are generated from the list cat's.
|
||||
|
||||
BaseS = twoSS ;
|
||||
ConsS = consrSS comma ;
|
||||
BaseS = twoTable VVForm ;
|
||||
ConsS = consrTable VVForm comma ;
|
||||
|
||||
BaseAdv = twoSS ;
|
||||
-- BaseAdv x y = twoTable Gender x y ;
|
||||
ConsAdv = consrSS comma ;
|
||||
-- ConsAdv xs x = consrTable Gender comma xs x ;
|
||||
|
||||
BaseNP x y = y ** twoTable Mod x y ** {a = conjAgr x.a y.a ; animacy = y.animacy } ; -- check animacy
|
||||
BaseRS x y = twoTable Agr x y ** {c = x.c};
|
||||
ConsNP xs x = xs ** consrTable Mod comma xs x ** {a = conjAgr xs.a x.a ; animacy = xs.animacy } ; -- InaandB xs.animacy x.animacy} ;
|
||||
@@ -37,7 +37,7 @@ concrete ConjunctionPes of Conjunction =
|
||||
ConsAP xs x = consrTable Mod comma xs x ** {adv = x.adv}; -- Table3 Number Gender Case comma xs x ;-- ** {isPre = andB xs.isPre x.isPre} ;
|
||||
|
||||
lincat
|
||||
[S] = {s1,s2 : Str} ;
|
||||
[S] = {s1,s2 : VVForm => Str} ;
|
||||
[Adv] = {s1,s2 : Str} ;
|
||||
[NP] = {s1,s2 : Mod => Str ; a : Agr ; animacy : Animacy ; hasAdj : Bool; compl:Str} ;
|
||||
[AP] = {s1,s2 : Mod => Str ; adv : Str} ;
|
||||
|
||||
@@ -13,7 +13,7 @@ lin
|
||||
in
|
||||
{s = \\t,p,o => cl.s ! t ! p ! o ++ rs.s ! np.a };
|
||||
|
||||
CleftAdv ad ss = { s = \\t,b,o => ad.s ++ ss.s};
|
||||
CleftAdv ad ss = { s = \\t,b,o => ad.s ++ ss.s ! Indic};
|
||||
|
||||
ExistNP np =
|
||||
mkSClause " " (agrP3 (fromAgr np.a).n)
|
||||
|
||||
@@ -158,7 +158,12 @@ oper
|
||||
= mk2Conj
|
||||
} ;
|
||||
|
||||
|
||||
mkSubj = overload {
|
||||
mkSubj : Str -> Subj -- Takes its verbal complement in indicative.
|
||||
= \s -> lin Subj {s=s ; compl=indicative} ;
|
||||
mkSubj : VVForm -> Str -> Subj -- Specify whether it takes complement in subjunctive or indicative.
|
||||
= \vvf,s -> lin Subj {s=s ; compl=vvf}
|
||||
} ;
|
||||
|
||||
--.
|
||||
--2 Definitions of paradigms
|
||||
|
||||
@@ -2,13 +2,12 @@ concrete PhrasePes of Phrase = CatPes ** open Prelude, ResPes in {
|
||||
|
||||
lin
|
||||
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
||||
|
||||
UttS s = {s = s.s ! Indic} ;
|
||||
UttQS qs = {s = qs.s ! QDir} ;
|
||||
UttImpSg pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Sg False} ;
|
||||
UttImpPl pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Pl False} ;
|
||||
UttImpPol pol imp = {s = pol.s ++ imp.s ! pol.p ! ImpF Sg True} ;
|
||||
|
||||
UttS,
|
||||
UttIP, --- Acc also
|
||||
UttAdv,
|
||||
UttIAdv,
|
||||
|
||||
@@ -32,17 +32,19 @@ concrete SentencePes of Sentence = CatPes ** open Prelude, ResPes,Predef in {
|
||||
} ;
|
||||
|
||||
SlashVS np vs slash =
|
||||
mkSlClause np
|
||||
(embComp (conjThat ++ slash.s) (predV vs)) **
|
||||
mkSlClause np
|
||||
(embComp (conjThat ++ slash.s ! Indic) (predV vs)) **
|
||||
{c2 = slash.c2} ;
|
||||
|
||||
EmbedS s = {s = conjThat ++ s.s} ;
|
||||
EmbedS s = {s = conjThat ++ s.s ! Indic} ;
|
||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||
EmbedVP vp = {s = showVPH Inf defaultAgr vp} ; --- agr
|
||||
|
||||
|
||||
UseCl temp p cl = let vt = TA temp.t temp.a in {
|
||||
s = temp.s ++ p.s ++ cl.s ! vt ! p.p ! ODir
|
||||
UseCl temp p cl = {
|
||||
s = \\vvf => temp.s ++ p.s ++ case vvf of {
|
||||
Indic => cl.s ! TA temp.t temp.a ! p.p ! ODir ;
|
||||
Subj => cl.s ! TA Cond temp.a ! p.p ! ODir }
|
||||
} ;
|
||||
|
||||
UseQCl temp p qcl = let vt = TA temp.t temp.a in {
|
||||
@@ -53,13 +55,15 @@ concrete SentencePes of Sentence = CatPes ** open Prelude, ResPes,Predef in {
|
||||
s = \\q => temp.s ++ p.s ++ rcl.s ! vt ! p.p ! ODir ! q
|
||||
} ;
|
||||
|
||||
UseSlash temp p cls = let vt = TA temp.t temp.a in cls ** {
|
||||
s = temp.s ++ p.s ++ cls.subj ++ cls.vp ! vt ! p.p ! ODir
|
||||
UseSlash temp p cls = cls ** {
|
||||
s = \\vvf => temp.s ++ p.s ++ cls.subj ++ case vvf of {
|
||||
Indic => cls.vp ! TA temp.t temp.a ! p.p ! ODir ;
|
||||
Subj => cls.vp ! TA Cond temp.a ! p.p ! ODir }
|
||||
} ;
|
||||
|
||||
AdvS a s = {s = a.s ++ s.s} ;
|
||||
AdvS a s = {s = \\vvf => a.s ++ s.s ! vvf} ;
|
||||
|
||||
RelS s r = {s = s.s ++ r.s ! agrP3 Sg} ;
|
||||
SSubjS s1 sj s2 = { s = s1.s ++ sj.s ++ s2.s};
|
||||
RelS s r = {s = \\vvf => s.s ! vvf ++ r.s ! agrP3 Sg} ;
|
||||
SSubjS s1 sj s2 = {s = \\vvf => s1.s ! vvf ++ sj.s ++ s2.s ! sj.compl};
|
||||
|
||||
}
|
||||
|
||||
@@ -9,10 +9,10 @@ concrete StructuralPes of Structural = CatPes **
|
||||
after_Prep = ss ["بعد از"] ;
|
||||
all_Predet = ss ["همه ی"] ;
|
||||
almost_AdA, almost_AdN = ss "تقریباً" ;
|
||||
although_Subj = ss ["با وجود این"] ;
|
||||
although_Subj = mkSubj "با وجود این" ;
|
||||
always_AdV = ss "همیشه" ;
|
||||
and_Conj = sd2 [] "و" ** {n = Pl} ;
|
||||
because_Subj = ss ["برای این"] ;
|
||||
because_Subj = mkSubj "برای این" ;
|
||||
before_Prep = ss ["قبل از"] ;
|
||||
behind_Prep = ss "پشت" ;
|
||||
between_Prep = ss "بین" ;
|
||||
@@ -39,7 +39,7 @@ concrete StructuralPes of Structural = CatPes **
|
||||
how_IAdv = ss "چطور" ;
|
||||
how8many_IDet = {s = "چند" ; n = Pl ; isNum = True} ;
|
||||
how8much_IAdv = ss "چقدر" ;
|
||||
if_Subj = ss "اگر" ;
|
||||
if_Subj = mkSubj subjunctive "اگر" ;
|
||||
in8front_Prep = ss "جلوی" ;
|
||||
i_Pron = personalPron "من" "م" Sg P1;
|
||||
in_Prep = ss "در" ;
|
||||
@@ -70,7 +70,7 @@ concrete StructuralPes of Structural = CatPes **
|
||||
-- something_NP = MassNP (UseN (MorphoPnb.mkN11 "چیزی"));
|
||||
somewhere_Adv = ss "جایی" ;
|
||||
that_Quant = mkQuant "آن" "آن";
|
||||
that_Subj = ss "آن";
|
||||
that_Subj = mkSubj "آن";
|
||||
there_Adv = ss "آنجا" ;
|
||||
there7to_Adv = ss "آنجا" ;
|
||||
there7from_Adv = ss "آنجا" ;
|
||||
@@ -87,7 +87,7 @@ concrete StructuralPes of Structural = CatPes **
|
||||
whatSg_IP = {s = ["چه چیزی"] ; n = Sg } ;
|
||||
whatPl_IP = {s = ["چه چیزهایی"] ; n = Pl } ;
|
||||
when_IAdv = ss "کی" ;
|
||||
when_Subj = ss "وقتی" ;
|
||||
when_Subj = mkSubj "وقتی" ;
|
||||
where_IAdv = ss "کجا" ;
|
||||
which_IQuant = {s = "کدام" ; n = Sg} ;
|
||||
whichPl_IDet = {s = "کدام" ; n = Pl ; isNum = False} ;
|
||||
|
||||
@@ -26,7 +26,7 @@ concrete SymbolPes of Symbol = CatPes ** open Prelude, ResPes in {
|
||||
compl = cn.compl ! Sg
|
||||
} ;
|
||||
|
||||
SymbS sy = sy ;
|
||||
SymbS sy = {s = \\_ => sy.s} ;
|
||||
SymbNum sy = { s = sy.s ; n = Pl } ;
|
||||
SymbOrd sy = { s = sy.s ++ "wN" ; n = Pl; isNum=False} ;
|
||||
|
||||
|
||||
@@ -13,12 +13,12 @@ concrete VerbPes of Verb = CatPes ** open ResPes,Prelude in {
|
||||
ComplSlash = complSlash ;
|
||||
|
||||
ComplVV = insertVV ;
|
||||
ComplVS v s = embComp (conjThat ++ s.s) (predV v) ;
|
||||
ComplVS v s = embComp (conjThat ++ s.s ! Indic) (predV v) ;
|
||||
ComplVQ v q = embComp (conjThat ++ q.s ! QIndir) (predV v) ;
|
||||
ComplVA v ap = insertObj (ap.s ! Bare) (predV v) ; -- check form of adjective
|
||||
|
||||
SlashVV vv vps = vps ** insertVV vv vps ;
|
||||
SlashV2S v s = v ** embComp (conjThat ++ s.s) (predV v) ;
|
||||
SlashV2S v s = v ** embComp (conjThat ++ s.s ! Indic) (predV v) ;
|
||||
SlashV2Q v q = v ** embComp (q.s ! QIndir) (predV v) ;
|
||||
SlashV2A v ap = v ** insertObj (ap.s ! Bare) (predV v) ; ---- paint it red , check form of adjective
|
||||
SlashV2V v vp = insertVV v vp ** {c2 = {s = v.c1 ; ra = []}} ;
|
||||
|
||||
Reference in New Issue
Block a user