1
0
forked from GitHub/gf-rgl

Merge branch 'master' of https://github.com/Nasrin63/gf-rgl into persian-nasrin

This commit is contained in:
Inari Listenmaa
2019-02-20 17:32:19 +01:00
25 changed files with 179 additions and 169 deletions

View File

@@ -7,14 +7,14 @@ concrete AdjectivePes of Adjective = CatPes ** open ResPes, Prelude in {
UseComparA a = a; UseComparA a = a;
ComparA a np = { ComparA a np = {
s =\\ez => a.s ! ez ++ "تر" ++ "از" ++ np.s ! NPC bEzafa ; s =\\ez => a.s ! ez ++ "تر" ++ "از" ++ np.s ! Bare ;
adv = a.adv adv = a.adv
} ; } ;
---- $SuperlA$ belongs to determiner syntax in $Noun$. ---- $SuperlA$ belongs to determiner syntax in $Noun$.
ComplA2 a np = { ComplA2 a np = {
s =\\ez => np.s ! NPC bEzafa ++ a.c2 ++ a.s ! ez ; s =\\ez => np.s ! Bare ++ a.c2 ++ a.s ! ez ;
adv = a.adv adv = a.adv
} ; } ;
@@ -36,7 +36,7 @@ concrete AdjectivePes of Adjective = CatPes ** open ResPes, Prelude in {
UseA2 a = a ; UseA2 a = a ;
CAdvAP cadv ap np = { CAdvAP cadv ap np = {
s =\\ez => cadv.s ++ np.s ! NPC bEzafa ++ ap.s ! ez ; s =\\ez => cadv.s ++ np.s ! Bare ++ ap.s ! ez ;
adv = ap.adv adv = ap.adv
}; };

View File

@@ -2,16 +2,16 @@ concrete AdverbPes of Adverb = CatPes ** open ResPes, Prelude in {
flags coding = utf8; flags coding = utf8;
lin lin
-- PositAdvAdj a = {s = a.s ! bEzafa } ; -- PositAdvAdj a = {s = a.s ! Bare } ;
PositAdvAdj a = {s = a.adv } ; PositAdvAdj a = {s = a.adv } ;
ComparAdvAdj cadv a np = { ComparAdvAdj cadv a np = {
s = a.adv ++ cadv.p ++ cadv.s ++ np.s ! NPC bEzafa ; s = a.adv ++ cadv.p ++ cadv.s ++ np.s ! Bare ;
} ; } ;
ComparAdvAdjS cadv a s = { ComparAdvAdjS cadv a s = {
s = a.adv ++ cadv.p ++ cadv.s ++ s.s; s = a.adv ++ cadv.p ++ cadv.s ++ s.s;
} ; } ;
PrepNP prep np = {s = prep.s ++ np.s ! NPC bEzafa } ; PrepNP prep np = {s = prep.s ++ np.s ! Bare } ;
AdAdv ada adv = { s = ada.s ++ adv.s} ; AdAdv ada adv = { s = ada.s ++ adv.s} ;

View File

@@ -62,7 +62,7 @@ concrete CatPes of Cat = CommonX - [Adv] ** open ResPes, Prelude in {
Num = {s : Str ; n : Number ; isNum : Bool} ; Num = {s : Str ; n : Number ; isNum : Bool} ;
Card = {s : Str; n : Number} ; Card = {s : Str; n : Number} ;
Ord = {s : Str; n : Number ; isNum : Bool} ; Ord = {s : Str; n : Number ; isNum : Bool} ;
Quant = {s: Number => Str ; a:Agr ; fromPron : Bool}; Quant = {s: Number => Str ; a:Agr ; mod : Mod};
Art = {s : Str} ; Art = {s : Str} ;
---- Numeral ---- Numeral

View File

@@ -12,12 +12,12 @@ concrete ConjunctionPes of Conjunction =
ConjAdv = conjunctDistrSS ; ConjAdv = conjunctDistrSS ;
-- ConjAdv conj advs = conjunctDistrTable Gender conj advs ; -- ConjAdv conj advs = conjunctDistrTable Gender conj advs ;
ConjNP conj ss = ss ** conjunctDistrTable NPCase conj ss ** { ConjNP conj ss = ss ** conjunctDistrTable Mod conj ss ** {
a = conjAgr (agrP3 conj.n) ss.a ; a = conjAgr (agrP3 conj.n) ss.a ;
animacy = ss.animacy ; animacy = ss.animacy ;
} ; } ;
ConjAP conj ss = conjunctDistrTable Ezafa conj ss ** {adv = ss.adv}; ConjAP conj ss = conjunctDistrTable Mod conj ss ** {adv = ss.adv};
ConjRS conj rs = conjunctDistrTable Agr conj rs ** { c = rs.c}; ConjRS conj rs = conjunctDistrTable Agr conj rs ** { c = rs.c};
---- These fun's are generated from the list cat's. ---- These fun's are generated from the list cat's.
@@ -28,19 +28,19 @@ concrete ConjunctionPes of Conjunction =
-- BaseAdv x y = twoTable Gender x y ; -- BaseAdv x y = twoTable Gender x y ;
ConsAdv = consrSS comma ; ConsAdv = consrSS comma ;
-- ConsAdv xs x = consrTable Gender comma xs x ; -- ConsAdv xs x = consrTable Gender comma xs x ;
BaseNP x y = y ** twoTable NPCase x y ** {a = conjAgr x.a y.a ; animacy = y.animacy } ; -- check animacy 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}; BaseRS x y = twoTable Agr x y ** {c = x.c};
ConsNP xs x = xs ** consrTable NPCase comma xs x ** {a = conjAgr xs.a x.a ; animacy = xs.animacy } ; -- InaandB xs.animacy x.animacy} ; ConsNP xs x = xs ** consrTable Mod comma xs x ** {a = conjAgr xs.a x.a ; animacy = xs.animacy } ; -- InaandB xs.animacy x.animacy} ;
ConsRS xs x = consrTable Agr comma xs x ** { c = xs.c}; ConsRS xs x = consrTable Agr comma xs x ** { c = xs.c};
-- BaseAP x y = twoTable3 Number Gender Case x y ; -- ** {isPre = andB x.isPre y.isPre} ; -- BaseAP x y = twoTable3 Number Gender Case x y ; -- ** {isPre = andB x.isPre y.isPre} ;
BaseAP x y = twoTable Ezafa x y ** {adv = x.adv}; BaseAP x y = twoTable Mod x y ** {adv = x.adv};
ConsAP xs x = consrTable Ezafa comma xs x ** {adv = x.adv}; -- Table3 Number Gender Case comma xs x ;-- ** {isPre = andB xs.isPre x.isPre} ; 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 lincat
[S] = {s1,s2 : Str} ; [S] = {s1,s2 : Str} ;
[Adv] = {s1,s2 : Str} ; [Adv] = {s1,s2 : Str} ;
[NP] = {s1,s2 : NPCase => Str ; a : Agr ; animacy : Animacy ; hasAdj : Bool} ; [NP] = {s1,s2 : Mod => Str ; a : Agr ; animacy : Animacy ; hasAdj : Bool} ;
[AP] = {s1,s2 : Ezafa => Str ; adv : Str} ; [AP] = {s1,s2 : Mod => Str ; adv : Str} ;
[RS] = {s1,s2 : Agr => Str }; [RS] = {s1,s2 : Agr => Str };
} }

View File

@@ -10,8 +10,8 @@ concrete ExtendPes of Extend =
lin lin
-- NP -> Quant ; -- this man's -- NP -> Quant ; -- this man's
GenNP np = np ** { GenNP np = np ** {
s = \\num => np.s ! NPC bEzafa ; -- the possessed will get aEzafa, possesser is just unmarked; https://sites.la.utexas.edu/persian_online_resources/language-specific-grammar/ezfe/ mod = Ezafe ; -- the possessed will get Ezafe
fromPron = True -- not necessarily from Pron, but it should come after the noun, and if fromPron=True, then DetCN places determiner after cn. s = \\num => np.s ! Bare -- possesser is unmarked; https://sites.la.utexas.edu/persian_online_resources/language-specific-grammar/ezfe/
} ; } ;
} }

View File

@@ -4,7 +4,7 @@ concrete ExtraPes of ExtraPesAbs = CatPes **
flags coding = utf8; flags coding = utf8;
lin lin
GenNP np = {s = \\_ => np.s ! NPC aEzafa ; a = np.a ; fromPron = True} ; -- changed from fromPron=False for Phrasebook GenNP np = {s = \\_ => np.s ! Ezafe ; a = np.a ; mod = True} ; -- changed from mod=False for Phrasebook
-- each_Det = mkDet "هر کwی" "هر کwی" "هر کwی" "هر کwی" Sg ; -- each_Det = mkDet "هر کwی" "هر کwی" "هر کwی" "هر کwی" Sg ;
-- have_V = mkV "رکh-ن"; -- have_V = mkV "رکh-ن";

View File

@@ -9,7 +9,7 @@ lin
GenericCl vp = mkSClause "آدم" (agrP3 Sg) vp ; GenericCl vp = mkSClause "آدم" (agrP3 Sg) vp ;
CleftNP np rs = CleftNP np rs =
let cl = mkSClause (np.s ! NPC bEzafa) (np.a) (predAux auxBe); let cl = mkSClause (np.s ! Bare) (np.a) (predAux auxBe);
in in
{s = \\t,p,o => cl.s ! t ! p ! o ++ rs.s ! np.a }; {s = \\t,p,o => cl.s ! t ! p ! o ++ rs.s ! np.a };
@@ -17,7 +17,7 @@ lin
ExistNP np = ExistNP np =
mkSClause " " (agrP3 (fromAgr np.a).n) mkSClause " " (agrP3 (fromAgr np.a).n)
(insertObj (\\_ => np.s ! NPC bEzafa) (predAux auxBe)) ; (insertObj (\\_ => np.s ! Bare) (predAux auxBe)) ;
ExistIP ip = ExistIP ip =
let cl = mkSClause ( ip.s ) (agrP3 ip.n) (predAux auxBe); let cl = mkSClause ( ip.s ) (agrP3 ip.n) (predAux auxBe);
@@ -32,7 +32,7 @@ lin
ProgrVP vp = predProg vp ; ProgrVP vp = predProg vp ;
ImpPl1 vp = {s = "بیایید" ++ vp.s ! VVForm (agrP1 Pl)} ; ImpPl1 vp = {s = "بیایید" ++ vp.s ! VVForm (agrP1 Pl)} ;
ImpP3 np vp = {s = "بگذارید" ++ np.s!NPC bEzafa ++ vp.s ! VVForm np.a}; ImpP3 np vp = {s = "بگذارید" ++ np.s!Bare ++ vp.s ! VVForm np.a};
} }

View File

@@ -24,7 +24,7 @@ oper
---- Nouns ---- Nouns
param param
Animacy = Animate | Inanimate ; Animacy = Animate | Inanimate ;
Ezafa = bEzafa | aEzafa | enClic ; Mod = Bare | Ezafe | Clitic | Poss ;
Agr = Ag Number Person ; Agr = Ag Number Person ;
------------------------------------------ ------------------------------------------
@@ -50,12 +50,25 @@ oper
agrP1 : Number -> Agr = \n -> Ag n P1 ; agrP1 : Number -> Agr = \n -> Ag n P1 ;
------------------------- -------------------------
-- Ezafa construction -- Ezafe construction
------------------------ ------------------------
oper oper
mkEzafa : Str -> Str = \str ->
--let kasre = "ِ" in -- TODO: Eventually use this mkPossStem : Str -> Str = \str ->
case str of {
_+ "اه" => str ;
_+ "او" => str ;
_+ "وه" => str ;
_+ ("ا"|"و") => str + "ی" ;
_+ "ه" => zwnj str "ا" ;
_ => str } ;
mkEzafe : Str -> Str = \str ->
--let kasre = "ِ" in -- TODO: Eventually use this
let kasre = "" in let kasre = "" in
case str of { case str of {
st + "اه" => str + kasre ; st + "اه" => str + kasre ;
@@ -71,28 +84,25 @@ oper
mkEnclic : Str -> Str ; mkEnclic : Str -> Str ;
mkEnclic str = case str of { mkEnclic str = case str of {
st + ("ا"|"و") => zwnj str "یی" ; -- ی after a long vowel to help pronunciation st + ("ا"|"و") => zwnj str "یی" ; -- ی after a long vowel to help pronunciation
st + "اه" => zwnj str "ی" ; -- here ه is a consonant, so single ی st + "اه" => str + "ی" ; -- here ه is a consonant, so single ی
-- st + "اه" => str + "ی" ; -- old version, no ZWNJ
st + ("ی"|"ه") => zwnj str "ای" ; -- after ی or ه as a vowel, add an alif to help pronunciation st + ("ی"|"ه") => zwnj str "ای" ; -- after ی or ه as a vowel, add an alif to help pronunciation
_ => str + "ی" -- any other case: just a single ی _ => str + "ی" -- any other case: just a single ی
} ; } ;
Noun = {s : Ezafa => Number => Str ; animacy : Animacy ; definitness : Bool } ; Noun = {s : Number => Mod => Str ; animacy : Animacy} ;
mkN : (x1,x2 : Str) -> Animacy -> Noun = \sg,pl,ani -> { mkN : (x1,x2 : Str) -> Animacy -> Noun = \sg,pl,ani -> {
s = table { s = table {
bEzafa => table { Sg => sg ; Sg => table {Bare => sg ;
Pl => pl Ezafe => mkEzafe sg ;
} ; Clitic => mkEnclic sg ;
aEzafa => table { Sg => mkEzafa sg ; Poss => mkPossStem sg } ;
Pl => mkEzafa pl Pl => table {Bare => pl ;
} ; Ezafe => mkEzafe pl ;
enClic => table { Sg => mkEnclic sg ; Clitic => mkEnclic pl ;
Pl => mkEnclic pl Poss => mkPossStem pl }
} } ;
}; animacy = ani
animacy = ani ; } ;
definitness = True
} ;
-- masculine nouns end with alif, choTi_hay, ain Translitration: (a, h, e) -- masculine nouns end with alif, choTi_hay, ain Translitration: (a, h, e)
-- Arabic nouns ends with h. also taken as Masc -- Arabic nouns ends with h. also taken as Masc
@@ -100,29 +110,30 @@ oper
--------------------- ---------------------
--Determiners --Determiners
-------------------- --------------------
Determiner : Type = {s : Str ; n :Number ; isNum : Bool ; fromPron : Bool} ; Determiner : Type = {s : Str ; n :Number ; isNum : Bool ; mod : Mod} ;
makeDet : Str -> Number -> Bool -> Determiner = \str,n,b -> { makeDet : Str -> Number -> Bool -> Determiner = \str,n,b -> {
s = str; s = str;
isNum = b; isNum = b;
fromPron = False ; mod = Bare ;
n = n n = n
}; };
makeQuant : Str -> Str -> {s : Number => Str ; a : Agr; fromPron : Bool } = \sg,pl -> { makeQuant : Str -> Str -> {s : Number => Str ; a : Agr; mod : Mod } = \sg,pl -> {
s = table {Sg => sg ; Pl => pl} ; s = table {Sg => sg ; Pl => pl} ;
fromPron = False ; mod = Bare ;
a = agrP3 Sg a = agrP3 Sg
}; };
--------------------------- ---------------------------
-- Adjectives -- Adjectives
-------------------------- --------------------------
Adjective : Type = {s : Ezafa => Str ; adv : Str} ; Adjective : Type = {s : Mod => Str ; adv : Str} ;
mkAdj : Str -> Str -> Adjective = \adj,adv -> { mkAdj : Str -> Str -> Adjective = \adj,adv -> {
s = table { bEzafa => adj; s = table { Bare => adj;
aEzafa => mkEzafa adj ; Ezafe => mkEzafe adj ;
enClic => mkEnclic adj Clitic => mkEnclic adj ;
Poss => mkPossStem adj
} ; } ;
adv = adv adv = adv
}; };

View File

@@ -3,12 +3,12 @@ concrete NounPes of Noun = CatPes ** open ResPes, Prelude in {
flags optimize=all_subs ; flags optimize=all_subs ;
lin lin
DetCN det cn = cn ** {s = \\npc => DetCN det cn = cn ** {s = \\mod =>
case <det.isNum,det.fromPron,npc> of { case <det.isNum,det.mod> of {
<False,False,NPC ez> => det.s ++ cn.s ! ez ! det.n ; -- det is not from Pron, retain NPForm. <False,Bare> => det.s ++ cn.s ! det.n ! mod ; -- det is not from Pron, retain NPForm.
<False,True> => cn.s ! aEzafa ! det.n ++ det.s ; -- det is from Pron, cn is in aEzafa. <False,X> => cn.s ! det.n ! X ++ det.s ; -- det is from Pron, cn is in Ezafe.
<True,False,NPC ez> => det.s ++ cn.s ! ez ! Sg ; -- noun modified by a number is invariably singular <True,Bare> => det.s ++ cn.s ! Sg ! mod ; -- noun modified by a number is invariably singular
<True,True> => cn.s ! aEzafa ! Sg ++ det.s <True,X> => cn.s ! Sg ! X ++ det.s
} ; } ;
a = agrP3 det.n ; a = agrP3 det.n ;
} ; } ;
@@ -29,20 +29,20 @@ concrete NounPes of Noun = CatPes ** open ResPes, Prelude in {
} ; } ;
AdvNP np adv = np ** { AdvNP np adv = np ** {
s = \\ez => np.s ! NPC aEzafa ++ adv.s s = \\ez => np.s ! Ezafe ++ adv.s
} ; } ;
DetQuantOrd quant num ord = { DetQuantOrd quant num ord = {
s = quant.s ! num.n ++ num.s ++ ord.s ; s = quant.s ! num.n ++ num.s ++ ord.s ;
isNum = orB num.isNum ord.isNum ; isNum = orB num.isNum ord.isNum ;
fromPron = quant.fromPron ; mod = quant.mod ;
n = num.n n = num.n
} ; } ;
DetQuant quant num = { DetQuant quant num = {
s = quant.s ! num.n ++ num.s; s = quant.s ! num.n ++ num.s;
isNum = num.isNum; isNum = num.isNum;
fromPron = quant.fromPron ; mod = quant.mod ;
n = num.n n = num.n
} ; } ;
@@ -53,7 +53,7 @@ concrete NounPes of Noun = CatPes ** open ResPes, Prelude in {
animacy = Inanimate animacy = Inanimate
} ; } ;
PossPron p = {s = \\_ => p.ps ; a = p.a ; fromPron = True} ; PossPron p = {s = \\_ => BIND ++ p.ps ; a = p.a ; mod = Poss} ;
NumSg = {s = [] ; n = Sg ; isNum = False} ; NumSg = {s = [] ; n = Sg ; isNum = False} ;
NumPl = {s = [] ; n = Pl ; isNum = False} ; NumPl = {s = [] ; n = Pl ; isNum = False} ;
@@ -68,17 +68,14 @@ concrete NounPes of Noun = CatPes ** open ResPes, Prelude in {
-- to here -- to here
AdNum adn num = num ** {s = adn.s ++ num.s} ; AdNum adn num = num ** {s = adn.s ++ num.s} ;
OrdSuperl a = {s = a.s ! bEzafa ++ taryn; n = Sg ; isNum=False} ; -- check the form of adjective OrdSuperl a = {s = a.s ! Bare ++ taryn; n = Sg ; isNum=False} ; -- check the form of adjective
DefArt = {s = \\_ => [] ; a = defaultAgr ; fromPron = False} ; DefArt = {s = \\_ => [] ; a = defaultAgr ; mod = Bare} ;
IndefArt = {s = table { Sg => IndefArticle ; Pl => []} ; a =defaultAgr ; fromPron = False} ; IndefArt = {s = table { Sg => IndefArticle ; Pl => []} ; a =defaultAgr ; mod = Bare} ;
MassNP cn = cn ** {s =\\c => case c of { MassNP cn = cn ** {
NPC bEzafa => cn.s ! bEzafa ! Sg ; s = cn.s ! Sg ;
NPC aEzafa => cn.s ! aEzafa ! Sg ; a = agrP3 Sg
NPC enClic => cn.s ! enClic ! Sg
};
a = agrP3 Sg ;
} ; } ;
UseN n = n ** {hasAdj=False}; UseN n = n ** {hasAdj=False};
@@ -95,29 +92,29 @@ concrete NounPes of Noun = CatPes ** open ResPes, Prelude in {
} ; } ;
ComplN2 f x = f ** { ComplN2 f x = f ** {
s = \\ez,n => f.s ! ez ! n ++ f.c ++ x.s ! NPC ez ; s = \\n,ez => f.s ! n ! Ezafe ++ f.c ++ x.s ! ez ;
definitness = True ; definitness = True ;
hasAdj = False ; hasAdj = False ;
}; };
ComplN3 f x = f ** { ComplN3 f x = f ** {
s = \\ez,n => f.s ! ez ! n ++ f.c2 ++ x.s ! NPC ez ; s = \\n,ez => f.s ! n ! Ezafe ++ f.c2 ++ x.s ! ez ;
c = f.c3; c = f.c3;
definitness = True; definitness = True;
} ; } ;
AdjCN ap cn = cn ** { AdjCN ap cn = cn ** {
s = \\ez,n => cn.s ! aEzafa ! n ++ ap.s ! ez ; -- check the form of adjective and also cn.s!ez!n changed from cn.s!aEzafa!n to have correct enclicitic form other wise it creats wrong enclictic form of old man s = \\n,ez => cn.s! n! Ezafe ++ ap.s ! ez ; -- check the form of adjective and also cn.s!ez!n changed from cn.s!Ezafe!n to have correct enclicitic form other wise it creats wrong enclictic form of old man
hasAdj = True hasAdj = True
} ; } ;
RelCN cn rs = cn ** { RelCN cn rs = cn ** {
s = \\ez,n => cn.s ! enClic ! n ++ rs.s ! agrP3 n ; s = \\n,ez => cn.s ! n! Clitic ++ rs.s ! agrP3 n ;
} ; } ;
AdvCN cn ad = cn ** {s = \\ez,n => cn.s ! aEzafa ! n ++ ad.s} ; AdvCN cn ad = cn ** {s = \\n,ez => cn.s ! n ! Ezafe ++ ad.s} ;
SentCN cn sc = cn ** {s = \\ez,n => cn.s ! ez ! n ++ sc.s} ; SentCN cn sc = cn ** {s = \\n,ez => cn.s ! n ! ez ++ sc.s} ;
ApposCN cn np = cn ** {s = \\ez,n => cn.s ! ez ! n ++ np.s ! NPC aEzafa ; definitness = True} ; -- ezafa form of city to be used ApposCN cn np = cn ** {s = \\n,ez => cn.s ! n ! ez ++ np.s ! Ezafe ; definitness = True} ; -- ezafa form of city to be used
} }

View File

@@ -197,8 +197,8 @@ oper
-- Personal Pronouns -- Personal Pronouns
personalPN : Str -> Number -> Person -> Pron -- Hidden from public API, confusing naming. /IL personalPron : (nom:Str) -> (poss:Str) -> Number -> Person -> Pron -- Hidden from public API, confusing naming. /IL
= \str,nn,p -> lin Pron {s = str ; a = Ag nn p ; ps = str}; = \nom,poss,nn,p -> lin Pron {s = nom ; a = Ag nn p ; ps = poss};
{- {-
-- Demonstrative Pronouns -- Demonstrative Pronouns
demoPN : Str -> Str -> Str -> Quant = demoPN : Str -> Str -> Str -> Quant =

View File

@@ -11,17 +11,17 @@ concrete PhrasePes of Phrase = CatPes ** open Prelude, ResPes in {
UttIP ip = {s = ip.s } ; --- Acc also UttIP ip = {s = ip.s } ; --- Acc also
UttIAdv iadv = iadv ; UttIAdv iadv = iadv ;
UttNP np = {s = np.s ! NPC bEzafa} ; UttNP np = {s = np.s ! Bare} ;
UttVP vp = {s = vp.ad ++ vp.comp ! Ag Sg P3 ++ vp.obj.s ++ vp.inf ++ vp.vComp ! Ag Sg P3 ++ vp.embComp} ; UttVP vp = {s = vp.ad ++ vp.comp ! Ag Sg P3 ++ vp.obj.s ++ vp.inf ++ vp.vComp ! Ag Sg P3 ++ vp.embComp} ;
UttAdv adv = {s = adv.s } ; UttAdv adv = {s = adv.s } ;
UttCN cn = {s = cn.s ! bEzafa ! Sg }; UttCN cn = {s = cn.s ! Sg ! Bare };
UttCard n = n ; UttCard n = n ;
UttAP ap = {s = ap.s ! bEzafa} ; UttAP ap = {s = ap.s ! Bare} ;
NoPConj = {s = []} ; NoPConj = {s = []} ;
PConjConj conj = {s = conj.s2} ; --- PConjConj conj = {s = conj.s2} ; ---
NoVoc = {s = []} ; NoVoc = {s = []} ;
VocNP np = {s = np.s ! NPC bEzafa} ; VocNP np = {s = np.s ! Bare} ;
} }

View File

@@ -32,7 +32,7 @@ concrete QuestionPes of Question = CatPes ** open ResPes, Prelude in {
}; };
QuestIComp icomp np = QuestIComp icomp np =
let cl = mkSClause (np.s ! NPC bEzafa ++ icomp.s) np.a (predAux auxBe); let cl = mkSClause (np.s ! Bare ++ icomp.s) np.a (predAux auxBe);
in { in {
s = \\t,p,qf => case qf of { s = \\t,p,qf => case qf of {
QDir => cl.s ! t ! p ! ODir; QDir => cl.s ! t ! p ! ODir;
@@ -48,7 +48,9 @@ concrete QuestionPes of Question = CatPes ** open ResPes, Prelude in {
} ; } ;
IdetCN idet cn = { IdetCN idet cn = {
s = case idet.isNum of {False => idet.s ++ cn.s ! bEzafa ! idet.n ; True => idet.s ++ cn.s ! bEzafa ! Sg} ; s = case idet.isNum of {
False => idet.s ++ cn.s ! idet.n ! Bare ;
True => idet.s ++ cn.s ! Sg ! Bare} ;
n = idet.n; n = idet.n;
} ; } ;

View File

@@ -42,7 +42,7 @@ concrete RelativePes of Relative = CatPes ** open ResPes in {
} ; } ;
FunRP p np rp = { FunRP p np rp = {
s = np.s ! NPC enClic ++ rp.s ++ p.s ++ getPron np.animacy (fromAgr np.a).n ; -- need to make a special form of relative np by addY s = np.s ! Clitic ++ rp.s ++ p.s ++ getPron np.animacy (fromAgr np.a).n ; -- need to make a special form of relative np by addY
a = RAg np.a a = RAg np.a
} ; } ;

View File

@@ -14,7 +14,6 @@ resource ResPes = MorphoPes ** open Prelude,Predef in {
Order = ODir | OQuest ; Order = ODir | OQuest ;
PMood = Del | Imper | PCond ; PMood = Del | Imper | PCond ;
NPCase = NPC Ezafa ;
CardOrd = NCard | NOrd ; CardOrd = NCard | NOrd ;
RAgr = RNoAg | RAg Agr ; RAgr = RNoAg | RAg Agr ;
-- RCase = RC Number Case ; -- RCase = RC Number Case ;
@@ -26,7 +25,7 @@ resource ResPes = MorphoPes ** open Prelude,Predef in {
Compl : Type = {s : Str ; ra : Str ; c : VType} ; Compl : Type = {s : Str ; ra : Str ; c : VType} ;
CN : Type = Noun ** {hasAdj : Bool} ; -- for getting the right form when NP/CN is a predicate CN : Type = Noun ** {hasAdj : Bool} ; -- for getting the right form when NP/CN is a predicate
NP : Type = {s : NPCase => Str ; a : Agr ; animacy : Animacy ; hasAdj : Bool} ; NP : Type = {s : Mod => Str ; a : Agr ; animacy : Animacy ; hasAdj : Bool} ;
VPHSlash : Type = VPH ** {c2 : Compl} ; VPHSlash : Type = VPH ** {c2 : Compl} ;
oper oper
@@ -191,8 +190,8 @@ oper
conjThat : Str = "که" ; conjThat : Str = "که" ;
{- checkPron : NP -> Str -> Str = \np,str -> case (np.isPron) of { {- checkPron : NP -> Str -> Str = \np,str -> case (np.isPron) of {
True => np.s ! NPC Obl; True => np.s ! Obl;
False => np.s ! NPC Obl ++ str} ; False => np.s ! Obl ++ str} ;
insertEmbCompl : VPH -> Str -> VPH = \vp,emb -> vp ** { insertEmbCompl : VPH -> Str -> VPH = \vp,emb -> vp ** {
embComp = vp.embComp ++ emb; embComp = vp.embComp ++ emb;
@@ -248,7 +247,7 @@ oper
quest = table quest = table
{ ODir => []; { ODir => [];
OQuest => "آیا" } ; OQuest => "آیا" } ;
subj = np.s ! NPC bEzafa ; subj = np.s ! Bare ;
vp = \\vt,b,ord => vp = \\vt,b,ord =>
let vps = clTable vp ! np.a ! vt ! b let vps = clTable vp ! np.a ! vt ! b
in vp.ad ++ vp.comp ! np.a ++ vp.obj.s ++ vps ++ vp.vComp ! np.a ++ vp.embComp in vp.ad ++ vp.comp ! np.a ++ vp.obj.s ++ vps ++ vp.vComp ! np.a ++ vp.embComp
@@ -361,8 +360,8 @@ taryn = "ترین" ;
----------------------------- -----------------------------
-- Noun Phrase -- Noun Phrase
----------------------------- -----------------------------
{-toNP : Str -> Str = \pn, npc -> case npc of { {-toNP : Str -> Str = \pn, -> case of {
NPC c => pn ! c ; c => pn ! c ;
NPObj => pn ! Dir ; NPObj => pn ! Dir ;
NPErg => pn ! Obl NPErg => pn ! Obl
} ; } ;

View File

@@ -32,7 +32,7 @@ concrete StructuralPes of Structural = CatPes **
-- first_Ord = {s = "اولین" ; n = Sg} ; --DEPRECATED -- first_Ord = {s = "اولین" ; n = Sg} ; --DEPRECATED
for_Prep = ss "برای" ; for_Prep = ss "برای" ;
from_Prep = ss "از" ; from_Prep = ss "از" ;
he_Pron = personalPN "او" Sg P3 ; he_Pron = personalPron "او" "ش" Sg P3 ;
here_Adv = ss "اینجا" ; here_Adv = ss "اینجا" ;
here7to_Adv = ss "اینجا" ; here7to_Adv = ss "اینجا" ;
here7from_Adv = ss "اینجا" ; here7from_Adv = ss "اینجا" ;
@@ -41,9 +41,9 @@ concrete StructuralPes of Structural = CatPes **
how8much_IAdv = ss "چقدر" ; how8much_IAdv = ss "چقدر" ;
if_Subj = ss "اگر" ; if_Subj = ss "اگر" ;
in8front_Prep = ss "جلوی" ; in8front_Prep = ss "جلوی" ;
i_Pron = personalPN "من" Sg P1; i_Pron = personalPron "من" "م" Sg P1;
in_Prep = ss "در" ; in_Prep = ss "در" ;
it_Pron = personalPN "آن" Sg P3; it_Pron = personalPron "آن" "ش" Sg P3;
less_CAdv = {s = "کمتر" ; p = ""} ; less_CAdv = {s = "کمتر" ; p = ""} ;
many_Det = mkDet ["تعداد زیادی"] Pl True; -- check many_Det = mkDet ["تعداد زیادی"] Pl True; -- check
more_CAdv = {s = "بیشتر" ; p = "" } ; more_CAdv = {s = "بیشتر" ; p = "" } ;
@@ -75,7 +75,7 @@ concrete StructuralPes of Structural = CatPes **
please_Voc = ss "لطفاً" ; please_Voc = ss "لطفاً" ;
possess_Prep = ss "" ; -- will be handeled in Ezafeh possess_Prep = ss "" ; -- will be handeled in Ezafeh
quite_Adv = ss "کاملاً" ; quite_Adv = ss "کاملاً" ;
she_Pron = personalPN "او" Sg P3 ; she_Pron = personalPron "او" "ش" Sg P3 ;
so_AdA = ss "بسیار" ; so_AdA = ss "بسیار" ;
-- somebody_NP = MassNP (UseN (MorphoPnb.mkN11 "کwی" )); -- somebody_NP = MassNP (UseN (MorphoPnb.mkN11 "کwی" ));
someSg_Det = mkDet "مقداری" Sg True ; someSg_Det = mkDet "مقداری" Sg True ;
@@ -88,7 +88,7 @@ concrete StructuralPes of Structural = CatPes **
there7to_Adv = ss "آنجا" ; there7to_Adv = ss "آنجا" ;
there7from_Adv = ss "آنجا" ; there7from_Adv = ss "آنجا" ;
therefore_PConj = ss ["به همین دلیل"] ; therefore_PConj = ss ["به همین دلیل"] ;
they_Pron = personalPN ["آن ها"] Pl P3 ; they_Pron = personalPron "آن ها" "شان" Pl P3 ;
this_Quant = mkQuant "این" "این" ; this_Quant = mkQuant "این" "این" ;
through_Prep = ss ["از طریق"] ; through_Prep = ss ["از طریق"] ;
too_AdA = ss "خیلی" ; too_AdA = ss "خیلی" ;
@@ -96,7 +96,7 @@ concrete StructuralPes of Structural = CatPes **
under_Prep = ss "زیر" ** {lock_Prep = <>}; under_Prep = ss "زیر" ** {lock_Prep = <>};
very_AdA = ss "خیلی" ; very_AdA = ss "خیلی" ;
want_VV = mkV "خواستن" "خواه" ** { isAux = False} ; want_VV = mkV "خواستن" "خواه" ** { isAux = False} ;
we_Pron = personalPN "ما" Pl P1 ; we_Pron = personalPron "ما" "مان" Pl P1 ;
whatSg_IP = {s = ["چه چیزی"] ; n = Sg } ; whatSg_IP = {s = ["چه چیزی"] ; n = Sg } ;
whatPl_IP = {s = ["چه چیزهایی"] ; n = Pl } ; whatPl_IP = {s = ["چه چیزهایی"] ; n = Pl } ;
when_IAdv = ss "کی" ; when_IAdv = ss "کی" ;
@@ -112,9 +112,9 @@ concrete StructuralPes of Structural = CatPes **
with_Prep = ss "با"; with_Prep = ss "با";
-- yes_Phr = ss "بله" ; -- yes_Phr = ss "بله" ;
yes_Utt = ss "بله" ; yes_Utt = ss "بله" ;
youSg_Pron = personalPN "تو" Sg P2 ; youSg_Pron = personalPron "تو" "ت" Sg P2 ;
youPl_Pron = personalPN "شما" Pl P2 ; youPl_Pron = personalPron "شما" "تان" Pl P2 ;
youPol_Pron = personalPN "شما" Pl P2 ; youPol_Pron = personalPron "شما" "تان" Pl P2 ;
-- no_Quant = demoPN "هیچ" ; -- no_Quant = demoPN "هیچ" ;
not_Predet = {s="نه"} ; not_Predet = {s="نه"} ;
if_then_Conj = sd2 "اگر" "آنگاه" ** {n = Sg} ; if_then_Conj = sd2 "اگر" "آنگاه" ** {n = Sg} ;

View File

@@ -11,15 +11,15 @@ concrete SymbolPes of Symbol = CatPes ** open Prelude, ResPes in {
FloatPN i = {s = i.s ; animacy = Inanimate} ; FloatPN i = {s = i.s ; animacy = Inanimate} ;
NumPN i = {s = i.s ; animacy = Inanimate} ; NumPN i = {s = i.s ; animacy = Inanimate} ;
CNIntNP cn i = cn ** { CNIntNP cn i = cn ** {
s = \\ez => cn.s ! aEzafa ! Sg ++ i.s ; s = \\ez => cn.s ! Sg ! Ezafe ++ i.s ;
a = agrP3 Sg a = agrP3 Sg
} ; } ;
CNSymbNP det cn xs = cn ** { CNSymbNP det cn xs = cn ** {
s = \\ez => det.s ++ cn.s ! aEzafa ! det.n ++ xs.s ; s = \\ez => det.s ++ cn.s ! det.n ! Ezafe ++ xs.s ;
a = agrP3 det.n a = agrP3 det.n
} ; } ;
CNNumNP cn i = cn ** { CNNumNP cn i = cn ** {
s = \\ez => cn.s ! aEzafa ! Sg ++ i.s ; s = \\ez => cn.s ! Sg ! Ezafe ++ i.s ;
a = agrP3 Sg a = agrP3 Sg
} ; } ;

View File

@@ -7,28 +7,28 @@ concrete VerbPes of Verb = CatPes ** open ResPes,Prelude in {
UseV v = predV v ; UseV v = predV v ;
SlashV2a v = predV v ** {c2 = {s = v.c2.s ; ra = v.c2.ra ; c = VTrans}} ; SlashV2a v = predV v ** {c2 = {s = v.c2.s ; ra = v.c2.ra ; c = VTrans}} ;
Slash2V3 v np = Slash2V3 v np =
insertObjc (\\_ => np.s ! NPC bEzafa ++ v.c2 ) (predV v ** {c2 = {s = [] ; ra = v.c3 ; c = VTrans}}) ; insertObjc (\\_ => np.s ! Bare ++ v.c2 ) (predV v ** {c2 = {s = [] ; ra = v.c3 ; c = VTrans}}) ;
Slash3V3 v np = Slash3V3 v np =
insertObjc (\\_ => v.c3 ++ np.s ! NPC bEzafa) (predV v ** {c2 = {s = [] ; ra = v.c2 ; c = VTrans}}) ; insertObjc (\\_ => v.c3 ++ np.s ! Bare) (predV v ** {c2 = {s = [] ; ra = v.c2 ; c = VTrans}}) ;
ComplVV v vp = insertVV (infVV v.isAux vp).s (predV v) ; ComplVV v vp = insertVV (infVV v.isAux vp).s (predV v) ;
ComplVS v s = insertObj2 (conjThat ++ s.s) (predV v) ; ComplVS v s = insertObj2 (conjThat ++ s.s) (predV v) ;
ComplVQ v q = insertObj2 (conjThat ++ q.s ! QIndir) (predV v) ; ComplVQ v q = insertObj2 (conjThat ++ q.s ! QIndir) (predV v) ;
ComplVA v ap = insertObj (\\_ => ap.s ! bEzafa) (predV v) ; -- check form of adjective ComplVA v ap = insertObj (\\_ => ap.s ! Bare) (predV v) ; -- check form of adjective
SlashV2V v vp = insertVV (infVV v.isAux vp).s (predV v) **{c2 = {s = v.c1 ; ra = [] ; c = VTransPost}} ; SlashV2V v vp = insertVV (infVV v.isAux vp).s (predV v) **{c2 = {s = v.c1 ; ra = [] ; c = VTransPost}} ;
SlashV2S v s = insertObjc2 (conjThat ++ s.s) (predV v ** {c2 = {s = v.c2.s ;ra = [] ; c = VTransPost}}) ; SlashV2S v s = insertObjc2 (conjThat ++ s.s) (predV v ** {c2 = {s = v.c2.s ;ra = [] ; c = VTransPost}}) ;
SlashV2Q v q = insertObjc2 ( q.s ! QIndir) (predV v ** {c2 = {s = v.c2.s ; ra = [] ;c = VTransPost}}) ; SlashV2Q v q = insertObjc2 ( q.s ! QIndir) (predV v ** {c2 = {s = v.c2.s ; ra = [] ;c = VTransPost}}) ;
SlashV2A v ap = insertObjc3 ( ap.s ! bEzafa) (predV v ** {c2 = {s = [] ; ra = v.c2.ra ;c = VTransPost}}) ; ---- paint it red , check form of adjective SlashV2A v ap = insertObjc3 ( ap.s ! Bare) (predV v ** {c2 = {s = [] ; ra = v.c2.ra ;c = VTransPost}}) ; ---- paint it red , check form of adjective
ComplSlash vp np = insertObjPre (\\_ => np.s ! NPC bEzafa ) vp ; ComplSlash vp np = insertObjPre (\\_ => np.s ! Bare ) vp ;
SlashVV vv vp = SlashVV vv vp =
-- insertObj (infVV vv.isAux vp).s (predV vv) ** -- insertObj (infVV vv.isAux vp).s (predV vv) **
insertVV (infVV vv.isAux vp).s (predV vv) ** insertVV (infVV vv.isAux vp).s (predV vv) **
{c2 = vp.c2} ; {c2 = vp.c2} ;
SlashV2VNP vv np vp = SlashV2VNP vv np vp =
insertObjPre (\\_ => np.s ! NPC bEzafa ) insertObjPre (\\_ => np.s ! Bare )
-- (insertObjc (infVV vv.isAux vp).s (predVc vv)) ** -- (insertObjc (infVV vv.isAux vp).s (predVc vv)) **
(insertVVc (infVV vv.isAux vp).s (predVc vv)) ** (insertVVc (infVV vv.isAux vp).s (predVc vv)) **
{c2 = vp.c2} ; {c2 = vp.c2} ;
@@ -40,21 +40,22 @@ concrete VerbPes of Verb = CatPes ** open ResPes,Prelude in {
AdVVP adv vp = insertAdV adv.s vp ; AdVVP adv vp = insertAdV adv.s vp ;
ReflVP v = insertObjPre (\\a => reflPron ! a) v ; ReflVP v = insertObjPre (\\a => reflPron ! a) v ;
PassV2 v = predV v ; -- need to be fixed PassV2 v = predV v ; -- need to be fixed
CompAP ap ={s = \\_ => ap.s ! bEzafa} ; -- check form of adjective CompAP ap ={s = \\_ => ap.s ! Bare} ; -- check form of adjective
CompAdv adv = {s = \\_ => adv.s } ; CompAdv adv = {s = \\_ => adv.s } ;
-- see https://sites.la.utexas.edu/persian_online_resources/nouns/noun-in-a-predicative-position/ -- see https://sites.la.utexas.edu/persian_online_resources/nouns/noun-in-a-predicative-position/
CompCN cn = { CompCN cn = {
s = \\a => s = \\a => cn.s ! giveNumber a
case cn.hasAdj of { ! case cn.hasAdj of {
False => cn.s ! bEzafa ! Sg ; False => Bare ;
True => cn.s ! enClic ! giveNumber a } True => Clitic }
} ; } ;
CompNP np = { CompNP np = {
s = \\a => np.s ! case np.hasAdj of { s = \\a => np.s ! case np.hasAdj of {
False => NPC bEzafa ; False => Bare ;
True => NPC enClic } True => Clitic }
} ; } ;
} }

View File

@@ -7,14 +7,14 @@ concrete AdjectivePes of Adjective = CatPes ** open ResPes, Prelude in {
UseComparA a = a; UseComparA a = a;
ComparA a np = { ComparA a np = {
s =\\ez => a.s ! ez ++ "tr" ++ "Az" ++ np.s ! NPC bEzafa ; s =\\ez => a.s ! ez ++ "tr" ++ "Az" ++ np.s ! Bare ;
adv = a.adv adv = a.adv
} ; } ;
---- $SuperlA$ belongs to determiner syntax in $Noun$. ---- $SuperlA$ belongs to determiner syntax in $Noun$.
ComplA2 a np = { ComplA2 a np = {
s =\\ez => np.s ! NPC bEzafa ++ a.c2 ++ a.s ! ez ; s =\\ez => np.s ! Bare ++ a.c2 ++ a.s ! ez ;
adv = a.adv adv = a.adv
} ; } ;
@@ -36,7 +36,7 @@ concrete AdjectivePes of Adjective = CatPes ** open ResPes, Prelude in {
UseA2 a = a ; UseA2 a = a ;
CAdvAP cadv ap np = { CAdvAP cadv ap np = {
s =\\ez => cadv.s ++ np.s ! NPC bEzafa ++ ap.s ! ez ; s =\\ez => cadv.s ++ np.s ! Bare ++ ap.s ! ez ;
adv = ap.adv adv = ap.adv
}; };

View File

@@ -2,16 +2,16 @@ concrete AdverbPes of Adverb = CatPes ** open ResPes, Prelude in {
flags coding = utf8; flags coding = utf8;
lin lin
-- PositAdvAdj a = {s = a.s ! bEzafa } ; -- PositAdvAdj a = {s = a.s ! Bare } ;
PositAdvAdj a = {s = a.adv } ; PositAdvAdj a = {s = a.adv } ;
ComparAdvAdj cadv a np = { ComparAdvAdj cadv a np = {
s = a.adv ++ cadv.p ++ cadv.s ++ np.s ! NPC bEzafa ; s = a.adv ++ cadv.p ++ cadv.s ++ np.s ! Bare ;
} ; } ;
ComparAdvAdjS cadv a s = { ComparAdvAdjS cadv a s = {
s = a.adv ++ cadv.p ++ cadv.s ++ s.s; s = a.adv ++ cadv.p ++ cadv.s ++ s.s;
} ; } ;
PrepNP prep np = {s = prep.s ++ np.s ! NPC bEzafa } ; PrepNP prep np = {s = prep.s ++ np.s ! Bare } ;
AdAdv ada adv = { s = ada.s ++ adv.s} ; AdAdv ada adv = { s = ada.s ++ adv.s} ;

View File

@@ -9,7 +9,7 @@ concrete IdiomPes of Idiom = CatPes ** open Prelude,Predef, ResPes in {
GenericCl vp = mkSClause "A:dm" (agrPesP3 Sg) vp ; GenericCl vp = mkSClause "A:dm" (agrPesP3 Sg) vp ;
CleftNP np rs = CleftNP np rs =
let cl = mkSClause (np.s ! NPC bEzafa) (np.a) (predAux auxBe); let cl = mkSClause (np.s ! Bare) (np.a) (predAux auxBe);
in in
{s = \\t,p,o => cl.s ! t ! p ! o ++ rs.s ! np.a }; {s = \\t,p,o => cl.s ! t ! p ! o ++ rs.s ! np.a };
@@ -17,7 +17,7 @@ concrete IdiomPes of Idiom = CatPes ** open Prelude,Predef, ResPes in {
ExistNP np = ExistNP np =
mkSClause " " (agrPesP3 (fromAgr np.a).n) mkSClause " " (agrPesP3 (fromAgr np.a).n)
(insertObj (\\_ => np.s ! NPC bEzafa) (predAux auxBe)) ; (insertObj (\\_ => np.s ! Bare) (predAux auxBe)) ;
ExistIP ip = ExistIP ip =
let cl = mkSClause ( ip.s ) (agrPesP3 ip.n) (predAux auxBe); let cl = mkSClause ( ip.s ) (agrPesP3 ip.n) (predAux auxBe);
@@ -33,7 +33,7 @@ concrete IdiomPes of Idiom = CatPes ** open Prelude,Predef, ResPes in {
ImpPl1 vp = {s = "byAyyd" ++ (vp.s ! VVForm (agrPesP1 Pl)).inf} ; ImpPl1 vp = {s = "byAyyd" ++ (vp.s ! VVForm (agrPesP1 Pl)).inf} ;
ImpP3 np vp = {s = "bgWAryd" ++ np.s!NPC bEzafa ++ (vp.s ! VVForm (AgPes (fromAgr np.a).n (fromAgr np.a).p)).inf}; ImpP3 np vp = {s = "bgWAryd" ++ np.s!Bare ++ (vp.s ! VVForm (AgPes (fromAgr np.a).n (fromAgr np.a).p)).inf};
} }

View File

@@ -20,10 +20,10 @@ oper
mkN : (x1,x2 : Str) -> Animacy -> Noun = mkN : (x1,x2 : Str) -> Animacy -> Noun =
\sg,pl,ani -> { \sg,pl,ani -> {
s = table { s = table {
bEzafa => table { Sg => sg ; Bare => table { Sg => sg ;
Pl => pl Pl => pl
} ; } ;
aEzafa => table { Sg => mkEzafa sg ; Ezafe => table { Sg => mkEzafa sg ;
Pl => mkEzafa pl Pl => mkEzafa pl
} ; } ;
enClic => table { Sg => mkEnclic sg ; enClic => table { Sg => mkEnclic sg ;
@@ -483,23 +483,23 @@ addBh str =
--Determiners --Determiners
-------------------- --------------------
makeDet : Str -> Number -> Bool -> {s: Str ; n : Number ; isNum : Bool ; fromPron : Bool} =\str,n,b -> { makeDet : Str -> Number -> Bool -> {s: Str ; n : Number ; isNum : Bool ; mod : Bool} =\str,n,b -> {
s = str; s = str;
isNum = b; isNum = b;
fromPron = False ; mod = False ;
n = n n = n
}; };
makeQuant : Str -> Str -> {s : Number => Str ; a : AgrPes ; fromPron : Bool } = \sg,pl -> { makeQuant : Str -> Str -> {s : Number => Str ; a : AgrPes ; mod : Bool } = \sg,pl -> {
s = table {Sg => sg ; Pl => pl} ; s = table {Sg => sg ; Pl => pl} ;
fromPron = False ; mod = False ;
a = agrPesP3 Sg a = agrPesP3 Sg
}; };
--------------------------- ---------------------------
-- Adjectives -- Adjectives
-------------------------- --------------------------
mkAdj : Str -> Str -> Adjective = \adj,adv -> { mkAdj : Str -> Str -> Adjective = \adj,adv -> {
s = table { bEzafa => adj; s = table { Bare => adj;
aEzafa => mkEzafa adj ; Ezafe => mkEzafa adj ;
enClic => mkEnclic adj enClic => mkEnclic adj
} ; } ;
adv = adv adv = adv

View File

@@ -57,7 +57,7 @@ oper
-- Personal Pronouns -- Personal Pronouns
personalPN : Str -> Number -> PPerson -> Pron = personalPron : Str -> Number -> PPerson -> Pron =
\str,nn,p -> {s = str ; a = AgPes nn p ; ps = str ; lock_Pron = <>}; \str,nn,p -> {s = str ; a = AgPes nn p ; ps = str ; lock_Pron = <>};
{- {-
-- Demonstration Pronouns -- Demonstration Pronouns

View File

@@ -42,7 +42,7 @@ concrete RelativePes of Relative = CatPes ** open ResPes in {
} ; } ;
FunRP p np rp = { FunRP p np rp = {
s = np.s ! NPC enClic ++ rp.s ++ p.s ++ getPron np.animacy (fromAgr np.a).n ; -- need to make a special form of relative np by addY s = np.s ! enClic ++ rp.s ++ p.s ++ getPron np.animacy (fromAgr np.a).n ; -- need to make a special form of relative np by addY
a = RAg np.a a = RAg np.a
} ; } ;

View File

@@ -32,8 +32,8 @@ resource ResPes = ParamX ** open Prelude,Predef in {
InfrAspect = InfrPerf | InfrImperf ; InfrAspect = InfrPerf | InfrImperf ;
AgrPes = AgPes Number PPerson; AgrPes = AgPes Number PPerson;
Ezafa = bEzafa | aEzafa | enClic; Ezafa = Bare | Ezafe | enClic;
NPCase = NPC Ezafa ; NPCase = Ezafa ;
CardOrd = NCard | NOrd ; CardOrd = NCard | NOrd ;
RAgr = RNoAg | RAg AgrPes ; RAgr = RNoAg | RAg AgrPes ;
-- RCase = RC Number Case ; -- RCase = RC Number Case ;
@@ -53,7 +53,7 @@ resource ResPes = ParamX ** open Prelude,Predef in {
Adjective = {s:Ezafa => Str ; adv : Str} ; Adjective = {s:Ezafa => Str ; adv : Str} ;
NP : Type = {s : NPCase => Str ; a : AgrPes ; animacy : Animacy } ; NP : Type = {s : NPCase => Str ; a : AgrPes ; animacy : Animacy } ;
Determiner = {s : Str ; n :Number ; isNum : Bool ; fromPron : Bool} ; Determiner = {s : Str ; n :Number ; isNum : Bool ; mod : Bool} ;
VPHSlash = VPH ** {c2 : Compl} ; VPHSlash = VPH ** {c2 : Compl} ;
oper oper
@@ -260,8 +260,8 @@ oper
conjThat : Str = "kh" ; conjThat : Str = "kh" ;
{- checkPron : NP -> Str -> Str = \np,str -> case (np.isPron) of { {- checkPron : NP -> Str -> Str = \np,str -> case (np.isPron) of {
True => np.s ! NPC Obl; True => np.s ! Obl;
False => np.s ! NPC Obl ++ str} ; False => np.s ! Obl ++ str} ;
insertEmbCompl : VPH -> Str -> VPH = \vp,emb -> { insertEmbCompl : VPH -> Str -> VPH = \vp,emb -> {
s = vp.s ; s = vp.s ;
@@ -292,7 +292,7 @@ Clause : Type = {s : VPHTense => Polarity => Order => Str} ;
mkClause : NP -> VPH -> Clause = \np,vp -> { mkClause : NP -> VPH -> Clause = \np,vp -> {
s = \\vt,b,ord => s = \\vt,b,ord =>
let let
subj = np.s ! NPC bEzafa; subj = np.s ! Bare;
agr = np.a ; agr = np.a ;
n = (fromAgr agr).n; n = (fromAgr agr).n;
p = (fromAgr agr).p; p = (fromAgr agr).p;
@@ -795,7 +795,7 @@ addBh2 str1 =
-- Noun Phrase -- Noun Phrase
----------------------------- -----------------------------
{-toNP : Str -> Str = \pn, npc -> case npc of { {-toNP : Str -> Str = \pn, npc -> case npc of {
NPC c => pn ! c ; c => pn ! c ;
NPObj => pn ! Dir ; NPObj => pn ! Dir ;
NPErg => pn ! Obl NPErg => pn ! Obl
} ; } ;

View File

@@ -31,7 +31,7 @@ concrete StructuralPes of Structural = CatPes **
-- first_Ord = {s = "Avlyn" ; n = Sg} ; --DEPRECATED -- first_Ord = {s = "Avlyn" ; n = Sg} ; --DEPRECATED
for_Prep = ss "brAy" ; for_Prep = ss "brAy" ;
from_Prep = ss "Az" ; from_Prep = ss "Az" ;
he_Pron = personalPN "Av" Sg PPers3 ; he_Pron = personalPron "Av" Sg PPers3 ;
here_Adv = ss "AynjA" ; here_Adv = ss "AynjA" ;
here7to_Adv = ss "AynjA" ; here7to_Adv = ss "AynjA" ;
here7from_Adv = ss "AynjA" ; here7from_Adv = ss "AynjA" ;
@@ -40,9 +40,9 @@ concrete StructuralPes of Structural = CatPes **
how8much_IAdv = ss "c^qdr" ; how8much_IAdv = ss "c^qdr" ;
if_Subj = ss "Agr" ; if_Subj = ss "Agr" ;
in8front_Prep = ss "jlvy" ; in8front_Prep = ss "jlvy" ;
i_Pron = personalPN "mn" Sg PPers1; i_Pron = personalPron "mn" Sg PPers1;
in_Prep = ss "dr" ; in_Prep = ss "dr" ;
it_Pron = personalPN "A:n" Sg PPers3; it_Pron = personalPron "A:n" Sg PPers3;
less_CAdv = {s = "kmtr" ; p = ""} ; less_CAdv = {s = "kmtr" ; p = ""} ;
many_Det = mkDet ["tcdAd zyAdy"] Pl True; -- check many_Det = mkDet ["tcdAd zyAdy"] Pl True; -- check
more_CAdv = {s = "byCtr" ; p = "" } ; more_CAdv = {s = "byCtr" ; p = "" } ;
@@ -73,7 +73,7 @@ concrete StructuralPes of Structural = CatPes **
please_Voc = ss "lTfAa." ; please_Voc = ss "lTfAa." ;
possess_Prep = ss "" ; -- will be handeled in Ezafeh possess_Prep = ss "" ; -- will be handeled in Ezafeh
quite_Adv = ss "kAmlAa." ; quite_Adv = ss "kAmlAa." ;
she_Pron = personalPN "Av" Sg PPers3 ; she_Pron = personalPron "Av" Sg PPers3 ;
so_AdA = ss "bsyAr" ; so_AdA = ss "bsyAr" ;
-- somebody_NP = MassNP (UseN (MorphoPnb.mkN11 "kwy" )); -- somebody_NP = MassNP (UseN (MorphoPnb.mkN11 "kwy" ));
someSg_Det = mkDet "mqdAry" Sg True ; someSg_Det = mkDet "mqdAry" Sg True ;
@@ -86,7 +86,7 @@ concrete StructuralPes of Structural = CatPes **
there7to_Adv = ss "A:njA" ; there7to_Adv = ss "A:njA" ;
there7from_Adv = ss "A:njA" ; there7from_Adv = ss "A:njA" ;
therefore_PConj = ss ["bh hmyn dlyl"] ; therefore_PConj = ss ["bh hmyn dlyl"] ;
they_Pron = personalPN ["A:n hA"] Pl PPers3 ; they_Pron = personalPron ["A:n hA"] Pl PPers3 ;
this_Quant = mkQuant "Ayn" "Ayn" ; this_Quant = mkQuant "Ayn" "Ayn" ;
through_Prep = ss ["Az Tryq"] ; through_Prep = ss ["Az Tryq"] ;
too_AdA = ss "Kyly" ; too_AdA = ss "Kyly" ;
@@ -94,7 +94,7 @@ concrete StructuralPes of Structural = CatPes **
under_Prep = ss "zyr" ** {lock_Prep = <>}; under_Prep = ss "zyr" ** {lock_Prep = <>};
very_AdA = ss "Kyly" ; very_AdA = ss "Kyly" ;
want_VV = mkV "KvAstn" "KvAh" ** { isAux = False} ; want_VV = mkV "KvAstn" "KvAh" ** { isAux = False} ;
we_Pron = personalPN "mA" Pl PPers1 ; we_Pron = personalPron "mA" Pl PPers1 ;
whatSg_IP = {s = ["c^h c^yzy"] ; n = Sg } ; whatSg_IP = {s = ["c^h c^yzy"] ; n = Sg } ;
whatPl_IP = {s = ["c^h c^yzhAyy"] ; n = Pl } ; whatPl_IP = {s = ["c^h c^yzhAyy"] ; n = Pl } ;
when_IAdv = ss "ky" ; when_IAdv = ss "ky" ;
@@ -110,9 +110,9 @@ concrete StructuralPes of Structural = CatPes **
with_Prep = ss "bA"; with_Prep = ss "bA";
-- yes_Phr = ss "blh" ; -- yes_Phr = ss "blh" ;
yes_Utt = ss "blh" ; yes_Utt = ss "blh" ;
youSg_Pron = personalPN "tv" Sg PPers2 ; youSg_Pron = personalPron "tv" Sg PPers2 ;
youPl_Pron = personalPN "CmA" Pl PPers2 ; youPl_Pron = personalPron "CmA" Pl PPers2 ;
youPol_Pron = personalPN "CmA" Pl PPers2 ; youPol_Pron = personalPron "CmA" Pl PPers2 ;
-- no_Quant = demoPN "hyc^" ; -- no_Quant = demoPN "hyc^" ;
not_Predet = {s="nh"} ; not_Predet = {s="nh"} ;
if_then_Conj = sd2 "Agr" "A:ngAh" ** {n = Sg} ; if_then_Conj = sd2 "Agr" "A:ngAh" ** {n = Sg} ;