1
0
forked from GitHub/gf-rgl

(Ara) Improve documentation for verb constructors + add reflV

This commit is contained in:
Inari Listenmaa
2018-11-19 15:23:37 +01:00
parent 7b51bb6638
commit fe4bec4e58
3 changed files with 32 additions and 39 deletions

View File

@@ -49,14 +49,12 @@ concrete IdiomAra of Idiom = CatAra ** open
-- : VP -> VP ; -- is at home himself; is himself at home
SelfAdvVP,
SelfAdVVP = \vp -> vp ** {
s = \\pgn,vf => let pron : ResAra.NP = pgn2pron pgn in
vp.s ! pgn ! vf ++ refl ! Nom ++ pron.s ! Gen
s = \\pgn,vf => vp.s ! pgn ! vf ++ reflPron Nom pgn
} ;
-- : NP -> NP ; -- the president himself (is at home)
SelfNP np = np ** {
s = let pron : ResAra.NP = np2pron np ;
in \\c => np.s ! c ++ refl ! c ++ pron.s ! Gen
s = \\c => np.s ! c ++ reflPron c (np.a.pgn)
} ;
}

View File

@@ -185,51 +185,33 @@ resource ParadigmsAra = open
-- Overloaded operations
mkV : overload {
mkV : (imperfect : Str) -> V ;
mkV : (imperfect : Str) -> V ; -- The verb in Per3 Sg Masc imperfect tense gives the most information
mkV : (root : Str) -> (perf,impf : Vowel) -> V ; -- verb form I ; vowel = a|i|u
mkV : (root : Str) -> VerbForm -> V ; -- FormI .. FormX (no VII, IX) ; default vowels a u for I
mkV : V -> (particle : Str) -> V -- V with a non-inflecting particle/phrasal verb
} ;
-- The verb in the imperfect tense gives the most information
-- regV : Str -> V ;
regV : Str -> V ;
reflV : V -> V ; -- نَفْس in the proper case and with possessive suffix, e.g. نَفْسَكِ
--Verb Form I : fa`ala, fa`ila, fa`ula
v1 : Str -> Vowel -> Vowel -> V ; --Verb Form I : fa`ala, fa`ila, fa`ula
v1 : Str -> Vowel -> Vowel -> V ;
v2 : Str -> V ; --Verb Form II : fa``ala
--Verb Form II : fa``ala
v3 : Str -> V ; --Verb Form III : faa`ala
v2 : Str -> V ;
v4 : Str -> V ; --Verb Form IV : 'af`ala
--Verb Form III : faa`ala
v5 : Str -> V ; --Verb Form V : tafa``ala
v3 : Str -> V ;
v6 : Str -> V ; --Verb Form VI : tafaa`ala
--Verb Form IV : 'af`ala
v7 : Str -> V ; --Verb Form VII : infa`ala
v4 : Str -> V ;
v8 : Str -> V ; --Verb Form VIII ifta`ala
--Verb Form V : tafa``ala
v5 : Str -> V ;
--Verb Form VI : tafaa`ala
v6 : Str -> V ;
--Verb Form VII : tafaa`ala
v7 : Str -> V ;
--Verb Form VIII infa`ala
v8 : Str -> V ;
-- Verb Form X 'istaf`ala
v10 : Str -> V ;
v10 : Str -> V ; -- Verb Form X 'istaf`ala
--3 Two-place verbs
@@ -359,8 +341,9 @@ resource ParadigmsAra = open
mkN : N -> (attr : Str) -> N -- Compound nouns
= \n,attr -> n ** {s2 = \\n,s,c => attr} ;
mkN : N -> N -> N -- Compound nouns
= \n1,n2 -> n1 ** {s2 =
\\n,s,c => n1.s2 ! n ! s ! c
= \n1,n2 -> n1 ** {
s = \\n,_,c => n1.s ! n ! Const ! c ;
s2 = \\n,s,c => n1.s2 ! n ! s ! c
++ n2.s ! n ! s ! c
++ n2.s2 ! n ! s ! c} ;
} ;
@@ -497,6 +480,8 @@ resource ParadigmsAra = open
_ => v10sound }
} in lin V (v10fun rbT) ;
reflV v = lin V (ResAra.reflV v) ;
mkFullN nsc gen spec = lin N
{ s = nsc; --NTable
s2 = emptyNTable;

View File

@@ -1354,8 +1354,18 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
a = np.a ** {isPron=False} -- hack, sometimes we *don't* want prodrop
} ;
refl : Case => Str = \\c => "نَفْس" + caseTbl ! c ;
reflPron : Case -> PerGenNum -> Str = \c,pgn ->
let pron : NP = pgn2pron pgn
in "نَفْس" + caseTbl ! c ++ pron.s ! Gen ;
reflV : Verb -> Verb = \v -> v ** {
s = \\vf => case vf of {
VPerf _ pgn => v.s ! vf ++ reflPron Acc pgn ;
VImpf _ _ pgn => v.s ! vf ++ reflPron Acc pgn ;
VImp g n => v.s ! vf ++ reflPron Acc (Per2 g n) ;
VPPart => v.s ! vf ++ reflPron Acc (Per3 Masc Sg) ----
}
} ;
-----------------------------------------------------------------------------
-- IP, questions