mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
Merge pull request #212 from inariksit/persian
Persian: passive + defVV
This commit is contained in:
@@ -369,7 +369,6 @@ concrete LexiconPes of Lexicon = CatPes **
|
||||
uncertain_A = mkA "نامعلوم" ["با تردید"];
|
||||
|
||||
oper
|
||||
doVerb = mkV "کردن" "کن" ;
|
||||
takeVerb = mkV "گرفتن" "گیر" ;
|
||||
hitVerb = mkV "زدن" "زن" ;
|
||||
giveVerb = mkV "دادن" "ده" ;
|
||||
|
||||
@@ -179,6 +179,8 @@ param
|
||||
| VImp Polarity Number -- bekon,bekonid/nakon,nakonid
|
||||
;
|
||||
|
||||
Passive = Add -- ateš zadan -> ateš zade šodan
|
||||
| Replace ; -- gom kardan -> gom ∅ šodan
|
||||
oper
|
||||
impRoot : Str -> Str = \root -> case root of {
|
||||
st + "ی" => st ;
|
||||
@@ -203,7 +205,8 @@ oper
|
||||
VImp Pos Pl => addBh imp + "ید" ;
|
||||
VImp Neg Sg => addN imp ;
|
||||
VImp Neg Pl => addN imp + "ید" } ;
|
||||
prefix = [] -- For compound verbs
|
||||
prefix = [] ;-- For compound verbs
|
||||
passive = Add ;
|
||||
} where {
|
||||
kard = tk 1 kardan ;
|
||||
kardeh = kard + "ه" ;
|
||||
@@ -227,7 +230,7 @@ oper
|
||||
} ;
|
||||
--
|
||||
oper
|
||||
Verb = {s : VerbForm => Str ; prefix : Str} ;
|
||||
Verb = {s : VerbForm => Str ; prefix : Str ; passive : Passive} ;
|
||||
|
||||
-- Verbs that end in یدن, ادن or ودن
|
||||
-- Also some verbs that don't: دانستن with stem دان
|
||||
@@ -329,4 +332,8 @@ oper
|
||||
vf => beRegV.s ! vf }
|
||||
} where { beRegV = mkVerb "بودن" "باش" } ;
|
||||
|
||||
doVerb = mkVerb "کردن" "کن" ** {passive=Replace} ;
|
||||
|
||||
becomeVerb : Verb = mkVerb "شدن" "شو" ;
|
||||
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ oper
|
||||
Mod : Type ; -- Argument to mkDet and mkPrep
|
||||
ezafe : Mod ; -- e.g. mkPrep "برای" ezafe
|
||||
-- poss : Mod ; -- TODO is this needed?
|
||||
--clitic : Mod ; -- TODO is this needed?
|
||||
-- clitic : Mod ; -- TODO is this needed?
|
||||
--2 Nouns
|
||||
|
||||
mkN : overload {
|
||||
@@ -112,6 +112,8 @@ oper
|
||||
= lin V M.haveVerb ;
|
||||
beVerb : V -- The verb "be", to be used for light verb constructions: e.g. compoundV "عاشق" beVerb.
|
||||
= lin V M.beVerb ;
|
||||
doVerb : V -- The verb "do", to be used for light verb constructions. In passive, is replaced by شدن.
|
||||
= lin V M.doVerb ;
|
||||
|
||||
mkV2 : overload {
|
||||
mkV2 : Str -> V2 ; -- Predictable V2 out of string. No preposition, را for direct object.
|
||||
@@ -162,6 +164,8 @@ oper
|
||||
= \isAux,vvf,v -> v ** {isAux = isAux ; compl = vvf ; isDef = False}
|
||||
} ;
|
||||
|
||||
defVV : VV -> VV = \vv -> vv ** {isDef=True} ;
|
||||
|
||||
mkV2V = overload {
|
||||
mkV2V : V -> (cN : Str) -> (isAux : Bool) -> V2V -- Verb, complementiser for the noun, whether it's auxiliary.
|
||||
= \v,s,b -> let vv : VV = mkVV b subjunctive v in
|
||||
|
||||
@@ -131,7 +131,14 @@ oper
|
||||
predVc : (Verb ** {c2 : Compl}) -> VPHSlash = \verb ->
|
||||
predV verb ** vs verb.c2 ;
|
||||
|
||||
---------------------
|
||||
passV : Verb -> VPH = \v -> predV v ** {
|
||||
s = becomeVerb.s ;
|
||||
prefix = case v.passive of {
|
||||
Add => v.s ! PerfStem ++ v.prefix ;
|
||||
Replace => v.prefix
|
||||
} ;
|
||||
} ;
|
||||
-- ---------------------
|
||||
-- VP complementation
|
||||
---------------------
|
||||
appComp : Compl -> (Mod=>Str) -> Str = \c2,obj ->
|
||||
|
||||
@@ -7,7 +7,7 @@ concrete StructuralPes of Structural = CatPes **
|
||||
lin
|
||||
above_Prep = mkPrep "بالای" ;
|
||||
after_Prep = mkPrep ["بعد از"] ;
|
||||
all_Predet = ss ["همه ی"] ;
|
||||
all_Predet = ss (zwnj "همه" "ی") ;
|
||||
almost_AdA, almost_AdN = ss "تقریباً" ;
|
||||
although_Subj = mkSubj "با وجود این" ;
|
||||
always_AdV = ss "همیشه" ;
|
||||
|
||||
@@ -52,12 +52,12 @@ concrete VerbPes of Verb = CatPes ** open ResPes,Prelude in {
|
||||
|
||||
AdvVP vp adv = insertAdV adv.s vp ;
|
||||
AdVVP adv vp = insertAdV adv.s vp ;
|
||||
ReflVP v = insertCompPre reflPron v ;
|
||||
PassV2 v = predV v ; -- need to be fixed
|
||||
ReflVP = insertCompPre reflPron ;
|
||||
PassV2 = passV ;
|
||||
|
||||
UseComp comp = insertComp comp.s (predV beVerb) ;
|
||||
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/
|
||||
CompCN cn = {
|
||||
|
||||
Reference in New Issue
Block a user