diff --git a/src/persian/AdverbPes.gf b/src/persian/AdverbPes.gf index cba51938c..2fe6cacc9 100644 --- a/src/persian/AdverbPes.gf +++ b/src/persian/AdverbPes.gf @@ -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 ++ "از"} ; } diff --git a/src/persian/CatPes.gf b/src/persian/CatPes.gf index d97c2a769..cc282512e 100644 --- a/src/persian/CatPes.gf +++ b/src/persian/CatPes.gf @@ -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 ; diff --git a/src/persian/ConjunctionPes.gf b/src/persian/ConjunctionPes.gf index 4d79b8a5d..27f6dd2e5 100644 --- a/src/persian/ConjunctionPes.gf +++ b/src/persian/ConjunctionPes.gf @@ -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} ; diff --git a/src/persian/IdiomPes.gf b/src/persian/IdiomPes.gf index db1c5013c..ae64fea5c 100644 --- a/src/persian/IdiomPes.gf +++ b/src/persian/IdiomPes.gf @@ -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) diff --git a/src/persian/ParadigmsPes.gf b/src/persian/ParadigmsPes.gf index 3405887c6..2b8ce4f81 100644 --- a/src/persian/ParadigmsPes.gf +++ b/src/persian/ParadigmsPes.gf @@ -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 diff --git a/src/persian/PhrasePes.gf b/src/persian/PhrasePes.gf index 9b1ad0024..ff53f7de3 100644 --- a/src/persian/PhrasePes.gf +++ b/src/persian/PhrasePes.gf @@ -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, diff --git a/src/persian/SentencePes.gf b/src/persian/SentencePes.gf index 06d076416..b80db77fb 100644 --- a/src/persian/SentencePes.gf +++ b/src/persian/SentencePes.gf @@ -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}; } diff --git a/src/persian/StructuralPes.gf b/src/persian/StructuralPes.gf index ef921bd34..0c39ff613 100644 --- a/src/persian/StructuralPes.gf +++ b/src/persian/StructuralPes.gf @@ -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} ; diff --git a/src/persian/SymbolPes.gf b/src/persian/SymbolPes.gf index bcce24df5..6012cf555 100644 --- a/src/persian/SymbolPes.gf +++ b/src/persian/SymbolPes.gf @@ -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} ; diff --git a/src/persian/VerbPes.gf b/src/persian/VerbPes.gf index 799da98d7..9792d2dc6 100644 --- a/src/persian/VerbPes.gf +++ b/src/persian/VerbPes.gf @@ -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 = []}} ;