forked from GitHub/gf-rgl
@@ -1,4 +1,4 @@
|
||||
concrete CatPes of Cat = CommonX - [Adv] ** open ResPes, Prelude in {
|
||||
concrete CatPes of Cat = CommonX ** open ResPes, Prelude in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
@@ -44,9 +44,6 @@ concrete CatPes of Cat = CommonX - [Adv] ** open ResPes, Prelude in {
|
||||
VPSlash = ResPes.VPHSlash ;
|
||||
Comp = {s : Agr => Str} ;
|
||||
|
||||
---- Adv
|
||||
Adv = {s : Str} ;
|
||||
|
||||
---- Adjective
|
||||
|
||||
AP = ResPes.Adjective ;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
concrete ExtendPes of Extend =
|
||||
CatPes ** ExtendFunctor - [
|
||||
GenNP, ApposNP, ICompAP
|
||||
,GerundNP,GerundCN,GerundAdv
|
||||
]
|
||||
with (Grammar=GrammarPes)
|
||||
** open Prelude, ResPes in {
|
||||
@@ -20,4 +21,13 @@ lin
|
||||
} ;
|
||||
|
||||
ICompAP ap = {s = "چقدر" ++ ap.s ! Bare} ;
|
||||
-- : VP -> CN ; -- publishing of the document (can get a determiner)
|
||||
GerundCN vp = useN (indeclN (showVPH Inf defaultAgr vp)) ;
|
||||
|
||||
-- : VP -> NP ; -- publishing the document (by nature definite)
|
||||
GerundNP vp = indeclNP (showVPH Inf defaultAgr vp) ;
|
||||
|
||||
-- : VP -> Adv ; -- publishing the document (prepositionless adverb)
|
||||
GerundAdv vp = lin Adv {s = showVPH Inf defaultAgr vp} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--# -path=.:../abstract:../common:../prelude
|
||||
|
||||
concrete GrammarPes of Grammar =
|
||||
NounPes,
|
||||
VerbPes,
|
||||
concrete GrammarPes of Grammar =
|
||||
NounPes,
|
||||
VerbPes,
|
||||
AdjectivePes,
|
||||
AdverbPes,
|
||||
NumeralPes,
|
||||
@@ -10,16 +10,14 @@
|
||||
QuestionPes,
|
||||
RelativePes,
|
||||
ConjunctionPes,
|
||||
|
||||
|
||||
PhrasePes,
|
||||
TextPes - [Adv],
|
||||
TextPes,
|
||||
StructuralPes,
|
||||
TenseX - [Adv],
|
||||
IdiomPes
|
||||
TenseX,
|
||||
IdiomPes
|
||||
** {
|
||||
|
||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ oper
|
||||
isCmpd : CmpdStatus -- Affects possession: awkward to use poss. suff. with compound nouns
|
||||
} ;
|
||||
|
||||
mkN : (x1,x2 : Str) -> Animacy -> Noun = \sg,pl,ani -> {
|
||||
mkN : (x1,x2 : Str) -> Animacy -> Noun = \sg,pl,ani -> indeclN sg ** {
|
||||
s = table {
|
||||
Sg => table {Bare => sg ;
|
||||
Ezafe => mkEzafe sg ;
|
||||
@@ -106,10 +106,13 @@ oper
|
||||
Pl => table {Bare => pl ;
|
||||
Ezafe => mkEzafe pl ;
|
||||
Clitic => mkEnclic pl ;
|
||||
Poss => mkPossStem pl }
|
||||
} ;
|
||||
animacy = ani ; isCmpd = NotCmpd
|
||||
} ;
|
||||
Poss => mkPossStem pl }}
|
||||
} ;
|
||||
|
||||
indeclN : Str -> Noun = \s -> {
|
||||
s = \\_,_ => s ;
|
||||
animacy = Inanimate ; isCmpd = NotCmpd
|
||||
} ;
|
||||
|
||||
-- masculine nouns end with alif, choTi_hay, ain Translitration: (a, h, e)
|
||||
-- Arabic nouns ends with h. also taken as Masc
|
||||
|
||||
@@ -12,8 +12,8 @@ concrete NounPes of Noun = CatPes ** open ResPes, Prelude in {
|
||||
<IsCmpd,Poss> => Ezafe ; -- If CN is compound and Det is poss.pron, don't use poss.suff but Ezafe and full form of pronoun
|
||||
_ => det.mod } ;
|
||||
detStr : Str = case cn.isCmpd of {
|
||||
IsCmpd => det.sp ;
|
||||
NotCmpd => det.sp } ;
|
||||
NotCmpd => det.s ; -- possessive suffix
|
||||
IsCmpd => det.sp } ; -- full form
|
||||
in case mod of {
|
||||
Bare => detStr ++ cn.s ! num ! m ; -- det doesn't require a special form, keep the Mod=>Str table
|
||||
x => cn.s ! num ! x ++ detStr } ; -- det requires a special form
|
||||
@@ -42,7 +42,7 @@ concrete NounPes of Noun = CatPes ** open ResPes, Prelude in {
|
||||
|
||||
DetQuantOrd quant num ord = {
|
||||
s = quant.s ! num.n ! NotCmpd ++ num.s ++ ord.s ;
|
||||
sp = quant.s ! num.n ! IsCmpd ; -- only matters for PossPron
|
||||
sp = quant.s ! num.n ! IsCmpd ++ num.s ++ ord.s ; -- only matters for PossPron
|
||||
isNum = orB num.isNum ord.isNum ;
|
||||
mod = quant.mod ;
|
||||
n = num.n
|
||||
@@ -50,7 +50,7 @@ concrete NounPes of Noun = CatPes ** open ResPes, Prelude in {
|
||||
|
||||
DetQuant quant num = {
|
||||
s = quant.s ! num.n ! NotCmpd ++ num.s ;
|
||||
sp = quant.s ! num.n ! IsCmpd ; -- only matters for PossPron
|
||||
sp = quant.s ! num.n ! IsCmpd ++ num.s ; -- only matters for PossPron
|
||||
isNum = num.isNum;
|
||||
mod = quant.mod ;
|
||||
n = num.n
|
||||
|
||||
Reference in New Issue
Block a user