1
0
forked from GitHub/gf-rgl

mkA and mkV in arabic

This commit is contained in:
Aarne Ranta
2018-06-13 07:55:33 +02:00
parent 6c70ccf0a1
commit 350adb704a

View File

@@ -102,16 +102,18 @@ resource ParadigmsAra = open
mkA = overload { mkA = overload {
mkA : (root,patt : Str) -> A mkA : (root,patt : Str) -> A
= sndA ; = sndA ;
mkA : (root : Str) -> A mkA : (root : Str) -> A -- forms adjectives with positive form aFCal
= clrA ; = clrA ;
mkA : (posit,compar,plur : Str) -> A
= degrA ;
} ; } ;
--Takes a root string and a pattern string --Takes a root string and a pattern string
sndA : Str -> Str -> A ; sndA : (root,patt : Str) -> A ;
--Takes a root string only --Takes a root string only
clrA : Str -> A ; clrA : (root : Str) -> A ; -- forms adjectives of type aFCal
--3 Two-place adjectives --3 Two-place adjectives
-- --
@@ -136,12 +138,25 @@ resource ParadigmsAra = open
-- A preposition as used for rection in the lexicon, as well as to -- A preposition as used for rection in the lexicon, as well as to
-- build $PP$s in the resource API, just requires a string. -- build $PP$s in the resource API, just requires a string.
mkPreposition : Str -> Preposition ; mkPrep : Str -> Prep
= \s -> lin Prep {s = mkPreposition s} ; -- preposition in the sense of RGL abstract syntax
mkPreposition : Str -> Preposition ; -- just a string, for internal use
-- (These two functions are synonyms.)
--2 Verbs --2 Verbs
-- Overloaded operations
mkV = overload {
mkV : (imperfect : Str) -> V
= regV ;
mkV : (root : Str) -> (perf,impf : Vowel) -> V -- verb form I ; vowel = a|i|u
= v1 ;
mkV : (root : Str) -> VerbForm -> V -- FormI .. FormVIII (no VII) ; default vowels a u for I
= formV ;
} ;
-- The verb in the imperfect tense gives the most information -- The verb in the imperfect tense gives the most information
regV : Str -> V ; regV : Str -> V ;
@@ -441,6 +456,9 @@ resource ParadigmsAra = open
lock_Quant = <> lock_Quant = <>
}; };
degrA : (posit,compar,plur : Str) -> A
= \posit,compar,plur -> lin A {s = clr posit compar plur} ;
sndA root pat = sndA root pat =
let raw = sndA' root pat in { let raw = sndA' root pat in {
s = \\af => s = \\af =>
@@ -517,4 +535,18 @@ smartPN : Str -> PN = \s -> case last s of {
_ => mkFullPN s Masc Hum _ => mkFullPN s Masc Hum
} ; } ;
formV : (root : Str) -> VerbForm -> V = \s,f -> case f of {
FormI => v1 s a u ;
FormII => v2 s ;
FormIII => v3 s ;
FormIV => v4 s ;
FormV => v5 s ;
FormVI => v6 s ;
--- FormVII => v7 s ;
FormVIII => v8 s
} ;
param VerbForm =
FormI | FormIII | FormIII | FormIV | FormV | FormVI | FormVIII ;
} ; } ;