forked from GitHub/gf-rgl
(Ara) Prepositions + improve Paradigms API functions
This commit is contained in:
@@ -21,7 +21,7 @@ concrete AdjectiveAra of Adjective = CatAra ** open ResAra, Prelude in {
|
||||
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
||||
--
|
||||
ComplA2 a np = {
|
||||
s = \\sp,g,n,st,c => a.s ! APosit g n st c ++ a.c2 ++ np.s ! Gen ;
|
||||
s = \\sp,g,n,st,c => a.s ! APosit g n st c ++ a.c2.s ++ np.s ! a.c2.c ;
|
||||
} ;
|
||||
--
|
||||
-- ReflA2 a = {
|
||||
|
||||
@@ -10,7 +10,7 @@ concrete AdverbAra of Adverb = CatAra ** open ResAra, Prelude in {
|
||||
-- s = cadv.s ++ a.s ! AAdv ++ "تهَن" ++ s.s
|
||||
-- } ;
|
||||
|
||||
PrepNP prep np = {s = prep.s ++ np.s ! Gen} ;
|
||||
PrepNP prep np = {s = prep.s ++ np.s ! prep.c} ;
|
||||
|
||||
-- AdAdv = cc2 ;
|
||||
--
|
||||
|
||||
@@ -36,7 +36,7 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in {
|
||||
-- Verb
|
||||
|
||||
VP = ResAra.VP ;
|
||||
VPSlash = ResAra.VPSlash ; -- VP ** {c2:Str}
|
||||
VPSlash = ResAra.VPSlash ; -- VP ** {c2:Preposition}
|
||||
Comp = ResAra.Comp ; --{s : AAgr => Case => Str} ;
|
||||
-- SC = {s : Str} ;
|
||||
--
|
||||
@@ -72,21 +72,21 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in {
|
||||
Conj = {s : Str ; n : ResAra.Number} ;
|
||||
-- DConj = {s1,s2 : Str ; n : ResAra.Number} ;
|
||||
-- Subj = {s : Str} ;
|
||||
Prep = {s : Str} ;
|
||||
Prep = ResAra.Preposition ;
|
||||
|
||||
-- Open lexical classes, e.g. Lexicon
|
||||
|
||||
V, VS, VQ, VA = ResAra.Verb ; -- = {s : VForm => Str} ;
|
||||
V2, V2A = ResAra.Verb ** {c2 : Str} ;
|
||||
VV, V2V, V2S, V2Q = ResAra.Verb ** {c2 : Str} ; --- AR
|
||||
V3 = ResAra.Verb ** {c2, c3 : Str} ;
|
||||
V2, V2A = ResAra.Verb2 ;
|
||||
VV, V2S, V2Q = ResAra.Verb2 ;
|
||||
V2V, V3 = ResAra.Verb3 ;
|
||||
|
||||
A = ResAra.Adj ;
|
||||
A2 = ResAra.Adj ** {c2 : Str} ;
|
||||
A2 = ResAra.Adj2 ;
|
||||
|
||||
N = ResAra.Noun ;
|
||||
N2 = ResAra.Noun ** {c2 : Str} ;
|
||||
N3 = ResAra.Noun ** {c2, c3 : Str} ;
|
||||
N2 = ResAra.Noun2 ;
|
||||
N3 = ResAra.Noun3 ;
|
||||
PN = {s : Case => Str; g : Gender; h : Species} ;
|
||||
|
||||
linref
|
||||
|
||||
@@ -24,7 +24,7 @@ flags
|
||||
beautiful_A = sndA "جمل" "فَعِيل" ;
|
||||
become_VA = mkVA (v4 "صبح") ;
|
||||
beer_N = sdfN "بير" "فِعلة" Fem NoHum ;
|
||||
beg_V2V = dirV2 (v5 "وسل") ;
|
||||
beg_V2V = mkV2V (mkVV (v5 "وسل")) noPrep ;
|
||||
big_A = sndA "كبر" "فَعِيل" ;
|
||||
bike_N = sdfN "درج" "فَعّالة" Fem NoHum ;
|
||||
bird_N = brkN "طير" "فَعل" "فُعُول" Masc NoHum;
|
||||
|
||||
@@ -180,7 +180,7 @@ lin
|
||||
Use3N3 n3 = n3 ** {c2 = n3.c3} ;
|
||||
|
||||
ComplN2 n2 np = UseN n2 ** --- IL
|
||||
{s = \\n,s,c => n2.s ! n ! s ! c ++ n2.c2 ++ np.s ! Gen} ;
|
||||
{s = \\n,s,c => n2.s ! n ! s ! c ++ n2.c2.s ++ np.s ! n2.c2.c} ;
|
||||
|
||||
|
||||
ComplN3 n3 np = ComplN2 n3 np ** {c2 = n3.c3} ;
|
||||
|
||||
@@ -35,9 +35,16 @@ resource ParadigmsAra = open
|
||||
|
||||
oper
|
||||
|
||||
-- Prepositions are used in many-argument functions for rection.
|
||||
Case : Type ;
|
||||
nom : Case ;
|
||||
acc : Case ;
|
||||
gen : Case ;
|
||||
|
||||
-- Prepositions are used in many-argument functions for rection.
|
||||
Preposition : Type ;
|
||||
noPrep : Preposition ;
|
||||
casePrep : Case -> Preposition ;
|
||||
--- TODO: continue, add all over the grammar
|
||||
|
||||
Gender : Type ;
|
||||
masc : Gender ;
|
||||
@@ -100,13 +107,17 @@ resource ParadigmsAra = open
|
||||
|
||||
--3 Relational nouns
|
||||
|
||||
mkN2 = overload {
|
||||
mkN2 : N -> Preposition -> N2 = prepN2 ;
|
||||
mkN2 : N -> N2 = \n -> lin N2 (n ** {c2 = []}) ;
|
||||
mkN2 : Str -> N2 = \str -> lin N2 (smartN str ** {c2 = []})
|
||||
mkN2 : overload {
|
||||
mkN2 : N -> Preposition -> N2 ; -- ready-made preposition
|
||||
mkN2 : (mother : N) -> (of_ : Str) -> N2 ; -- preposition given as a string
|
||||
mkN2 : N -> N2 ; -- no preposition
|
||||
mkN2 : Str -> N2 ; -- no preposition, predictable inflection
|
||||
} ;
|
||||
|
||||
mkN3 : N -> Preposition -> Preposition -> N3 ;
|
||||
mkN3 : overload {
|
||||
mkN3 : N -> Preposition -> Preposition -> N3 ; -- ready-made prepositions
|
||||
mkN3 : N -> Str -> Str -> N3 ; -- prepositions given as strings
|
||||
} ;
|
||||
|
||||
|
||||
--2 Adjectives
|
||||
@@ -135,7 +146,10 @@ resource ParadigmsAra = open
|
||||
--
|
||||
-- Two-place adjectives need a preposition for their second argument.
|
||||
|
||||
mkA2 : A -> Preposition -> A2 ;
|
||||
mkA2 : overload {
|
||||
mkA2 : A -> Preposition -> A2 ;
|
||||
mkA2 : A -> Str -> A2
|
||||
} ;
|
||||
|
||||
--2 Adverbs
|
||||
|
||||
@@ -152,14 +166,12 @@ resource ParadigmsAra = open
|
||||
--2 Prepositions
|
||||
--
|
||||
-- A preposition as used for rection in the lexicon, as well as to
|
||||
-- build $PP$s in the resource API, just requires a string.
|
||||
|
||||
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
|
||||
|
||||
-- build $PP$s in the resource API. Requires a string and a case.
|
||||
|
||||
mkPrep : overload {
|
||||
mkPrep : Str -> Prep ;
|
||||
mkPrep : Str -> Case -> Prep
|
||||
} ; -- preposition in the sense of RGL abstract syntax
|
||||
--2 Verbs
|
||||
|
||||
-- Overloaded operations
|
||||
@@ -212,10 +224,11 @@ resource ParadigmsAra = open
|
||||
-- Two-place verbs need a preposition, except the special case with direct object.
|
||||
-- (transitive verbs). Notice that a particle comes from the $V$.
|
||||
|
||||
mkV2 = overload {
|
||||
mkV2 : V -> V2 = dirV2 ;
|
||||
mkV2 : V -> Preposition -> V2 = prepV2 ;
|
||||
mkV2 : Str -> V2 = strV2;
|
||||
mkV2 : overload {
|
||||
mkV2 : V -> V2 ; -- No preposition
|
||||
mkV2 : V -> Str -> V2 ; -- Preposition as string, default case genitive
|
||||
mkV2 : V -> Preposition -> V2 ; -- Ready-made preposition
|
||||
mkV2 : Str -> V2 ; -- Predictable verb conjugation, no preposition
|
||||
} ;
|
||||
|
||||
dirV2 : V -> V2 ;
|
||||
@@ -225,9 +238,15 @@ resource ParadigmsAra = open
|
||||
-- Three-place (ditransitive) verbs need two prepositions, of which
|
||||
-- the first one or both can be absent.
|
||||
|
||||
mkV3 : V -> Preposition -> Preposition -> V3 ; -- speak, with, about
|
||||
dirV3 : V -> Preposition -> V3 ; -- give,_,to
|
||||
dirdirV3 : V -> V3 ; -- give,_,_
|
||||
mkV3 : overload {
|
||||
mkV3 : V -> Preposition -> Preposition -> V3 ; -- speak, with, about
|
||||
mkV3 : V -> (to : Str) -> (about:Str) -> V3 -- like above, but with strings as arguments (default complement case genitive)
|
||||
} ;
|
||||
dirV3 : overload {
|
||||
dirV3 : V -> Preposition -> V3 ; -- give,_,to
|
||||
dirV3 : V -> (to : Str) -> V3 -- like above, but with string as argument (default complement case genitive)
|
||||
} ;
|
||||
dirdirV3 : V -> V3 ; -- give,_,_
|
||||
|
||||
--3 Other complement patterns
|
||||
--
|
||||
@@ -241,7 +260,11 @@ resource ParadigmsAra = open
|
||||
mkVV : V -> VV = regVV ;
|
||||
mkVV : V -> Str -> VV = c2VV
|
||||
} ;
|
||||
mkV2V : V -> Str -> Str -> V2V ;
|
||||
mkV2V : overload {
|
||||
mkV2V : V -> Str -> Str -> V2V ;
|
||||
mkV2V : V -> Preposition -> Preposition -> V2V ;
|
||||
mkV2V : VV -> Preposition -> V2V
|
||||
} ;
|
||||
mkVA : V -> VA ;
|
||||
mkV2A : V -> Str -> V2A ;
|
||||
mkVQ : V -> VQ ;
|
||||
@@ -266,9 +289,16 @@ resource ParadigmsAra = open
|
||||
|
||||
-- The definitions should not bother the user of the API. So they are
|
||||
-- hidden from the document.
|
||||
Case = ResAra.Case ;
|
||||
nom = ResAra.Nom ;
|
||||
acc = ResAra.Acc ;
|
||||
gen = ResAra.Gen ;
|
||||
|
||||
-- Prepositions are used in many-argument functions for rection.
|
||||
|
||||
Preposition = Str ;
|
||||
Preposition = ResAra.Preposition ;
|
||||
noPrep = {s=[]; c=nom} ;
|
||||
casePrep c = {s=[]; c=c} ;
|
||||
|
||||
Gender = ResAra.Gender ;
|
||||
masc = ResAra.Masc ;
|
||||
@@ -283,6 +313,24 @@ resource ParadigmsAra = open
|
||||
vu = ResAra.u ;
|
||||
vi = ResAra.i ;
|
||||
|
||||
mkPrep = overload {
|
||||
mkPrep : Str -> Prep = \s ->
|
||||
lin Prep (mkPreposition s) ;
|
||||
mkPrep : Str -> Case -> Prep = \s,c ->
|
||||
lin Prep (mkPreposition s c)
|
||||
} ;
|
||||
|
||||
|
||||
mkV2 = overload {
|
||||
mkV2 : V -> V2 = dirV2 ;
|
||||
mkV2 : V -> Str -> V2 = \v,p -> prepV2 v (mkPreposition p);
|
||||
mkV2 : V -> Preposition -> V2 = prepV2 ;
|
||||
mkV2 : Str -> V2 = strV2;
|
||||
} ;
|
||||
|
||||
prepV2 : V -> Preposition -> V2 = \v,p -> v ** {s = v.s ; c2 = p ; lock_V2 = <>} ;
|
||||
strV2 : Str -> V2 = \str -> dirV2 (mkV str) ;
|
||||
|
||||
mkN = overload {
|
||||
mkN : (sg : Str) -> N -- non-human regular nouns
|
||||
= smartN ;
|
||||
@@ -330,8 +378,6 @@ resource ParadigmsAra = open
|
||||
lock_V = <>
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
v1' : Str -> Vowel -> Vowel -> Verb =
|
||||
\rootStr,vPerf,vImpf ->
|
||||
let { root = mkRoot3 rootStr } in
|
||||
@@ -469,10 +515,21 @@ resource ParadigmsAra = open
|
||||
lock_PN = <>
|
||||
};
|
||||
|
||||
mkN2 = overload {
|
||||
mkN2 : N -> Preposition -> N2 = prepN2 ;
|
||||
mkN2 : N -> Str -> N2 = \n,s -> prepN2 n (mkPreposition s);
|
||||
mkN2 : N -> N2 = \n -> lin N2 (n ** {c2 = noPrep}) ;
|
||||
mkN2 : Str -> N2 = \str -> lin N2 (smartN str ** {c2 = noPrep})
|
||||
} ;
|
||||
|
||||
prepN2 : N -> Str -> N2 = \n,p -> lin N2 (n ** {c2 = p}) ;
|
||||
prepN2 : N -> Preposition -> N2 = \n,p -> lin N2 (n ** {c2 = p}) ;
|
||||
|
||||
mkN3 = \n,p,q -> n ** {lock_N3 = <> ; c2 = p ; c3 = q} ;
|
||||
mkN3 = overload {
|
||||
mkN3 : N -> Preposition -> Preposition -> N3 = \n,p,q ->
|
||||
lin N3 (n ** {c2 = p ; c3 = q}) ;
|
||||
mkN3 : N -> Str -> Str -> N3 = \n,p,q ->
|
||||
lin N3 (n ** {c2 = mkPreposition p ; c3 = mkPreposition q}) ;
|
||||
} ;
|
||||
|
||||
mkPron : (_,_,_ : Str) -> PerGenNum -> NP = \ana,nI,I,pgn ->
|
||||
{ s =
|
||||
@@ -571,45 +628,67 @@ resource ParadigmsAra = open
|
||||
s = clr eaHmar HamrA' Humr;
|
||||
};
|
||||
|
||||
mkA2 a p = a ** {c2 = p ; lock_A2 = <>} ;
|
||||
mkA2 = overload {
|
||||
mkA2 : A -> Preposition -> A2 = prepA2 ;
|
||||
mkA2 : A -> Str -> A2 = \a,p -> prepA2 a (mkPreposition p)
|
||||
} ;
|
||||
|
||||
mkAdv x = ss x ** {lock_Adv = <>} ;
|
||||
mkAdV x = ss x ** {lock_AdV = <>} ;
|
||||
mkAdA x = ss x ** {lock_AdA = <>} ;
|
||||
prepA2 : A -> Preposition -> A2 = \a,p -> lin A2 (a ** {c2 = p}) ;
|
||||
|
||||
mkPreposition p = p ;
|
||||
mkAdv x = lin Adv (ss x) ;
|
||||
mkAdV x = lin AdV (ss x) ;
|
||||
mkAdA x = lin AdA (ss x) ;
|
||||
|
||||
prepV2 : V -> Preposition -> V2 = \v,p -> v ** {s = v.s ; c2 = p ; lock_V2 = <>} ;
|
||||
strV2 : Str -> V2 = \str -> dirV2 (mkV str) ;
|
||||
|
||||
dirV2 v = prepV2 v [] ;
|
||||
dirV2 v = prepV2 v (casePrep acc) ;
|
||||
|
||||
mkV3 v p q = v ** {s = v.s ; c2 = p ; c3 = q ; lock_V3 = <>} ;
|
||||
dirV3 v p = mkV3 v [] p ;
|
||||
dirdirV3 v = dirV3 v [] ;
|
||||
mkV3 = overload {
|
||||
mkV3 : V -> Preposition -> Preposition -> V3 = \v,p,q ->
|
||||
lin V3 (prepV3 v p q) ;
|
||||
mkV3 : V -> Str -> Str -> V3 = \v,p,q ->
|
||||
lin V3 (v ** {s = v.s ; c2 = mkPreposition p ; c3 = mkPreposition q})
|
||||
} ;
|
||||
|
||||
prepV3 : V -> Preposition -> Preposition -> Verb3 = \v,p,q ->
|
||||
v ** {s = v.s ; c2 = p ; c3 = q} ;
|
||||
|
||||
dirV3 = overload {
|
||||
dirV3 : V -> Preposition -> V3 = \v,p -> mkV3 v (casePrep acc) p ;
|
||||
dirV3 : V -> Str -> V3 = \v,s -> mkV3 v (casePrep acc) (mkPreposition s)
|
||||
} ;
|
||||
|
||||
dirdirV3 v = dirV3 v (casePrep acc) ;
|
||||
|
||||
mkVS v = v ** {lock_VS = <>} ;
|
||||
mkVQ v = v ** {lock_VQ = <>} ;
|
||||
|
||||
regVV : V -> VV = \v -> lin VV v ** {c2 = "أَنْ"} ;
|
||||
c2VV : V -> Str -> VV = \v,prep -> regVV v ** {c2 = prep} ;
|
||||
regVV : V -> VV = \v -> lin VV v ** {c2 = mkPreposition "أَنْ"} ;
|
||||
c2VV : V -> Str -> VV = \v,prep -> regVV v ** {c2 = noPrep} ;
|
||||
|
||||
V0 : Type = V ;
|
||||
---- V2S, V2V, V2Q, V2A : Type = V2 ;
|
||||
AS, A2S, AV : Type = A ;
|
||||
A2V : Type = A2 ;
|
||||
|
||||
mkV0 v = v ** {lock_V = <>} ;
|
||||
mkV2S v p = mkV2 v p ** {lock_V2S = <>} ;
|
||||
mkV2V v p t = mkV2 v p ** {s4 = t ; lock_V2V = <>} ;
|
||||
mkVA v = v ** {lock_VA = <>} ;
|
||||
mkV2A v p = mkV2 v p ** {lock_V2A = <>} ;
|
||||
mkV2Q v p = mkV2 v p ** {lock_V2Q = <>} ;
|
||||
mkV0 v = v ;
|
||||
mkV2S v p = lin V2S (prepV2 v (mkPreposition p)) ;
|
||||
mkV2V = overload {
|
||||
mkV2V : V -> Str -> Str -> V2V = \v,p,q ->
|
||||
lin V2V (prepV3 v (mkPreposition p) (mkPreposition q)) ;
|
||||
mkV2V : V -> Preposition -> Preposition -> V2V = \v,p,q ->
|
||||
lin V2V (prepV3 v p q) ;
|
||||
mkV2V : VV -> Preposition -> V2V = \vv,p ->
|
||||
lin V2V (vv ** {c2 = p ; c3 = vv.c2}) ;
|
||||
} ;
|
||||
mkVA v = v ** {lock_VA = <>} ;
|
||||
mkV2A v p = lin V2A (prepV2 v (mkPreposition p));
|
||||
mkV2Q v p = lin V2Q (prepV2 v (mkPreposition p));
|
||||
|
||||
mkAS,
|
||||
mkAV = \a -> a ;
|
||||
mkA2S,
|
||||
mkA2V = \a,p -> prepA2 a (mkPreposition p) ;
|
||||
|
||||
mkAS v = v ** {lock_A = <>} ;
|
||||
mkA2S v p = mkA2 v p ** {lock_A = <>} ;
|
||||
mkAV v = v ** {lock_A = <>} ;
|
||||
mkA2V v p = mkA2 v p ** {lock_A2 = <>} ;
|
||||
|
||||
|
||||
smartN : Str -> N = \s -> case s of {
|
||||
|
||||
@@ -48,7 +48,7 @@ concrete QuestionAra of Question = CatAra ** open ResAra, ParamX, Prelude, VerbA
|
||||
QuestSlash ip cl = { ----IL just guessing
|
||||
s = \\t,p,qf =>
|
||||
let o = case qf of { QDir => Nominal ; _ => Verbal } ; -- purely guessing
|
||||
in cl.c2 ++ ip.s ! False ! Def ! Nom ++ cl.s ! t ! p ! o
|
||||
in cl.c2.s ++ ip.s ! False ! Def ! Nom ++ cl.s ! t ! p ! o
|
||||
} ;
|
||||
|
||||
--IL guessed
|
||||
|
||||
@@ -108,10 +108,22 @@ resource ResAra = PatternsAra ** open Prelude, Predef, OrthoAra, ParamX in {
|
||||
|
||||
NTable = Number => State => Case => Str;
|
||||
|
||||
Preposition : Type = {s : Str ; c : Case} ;
|
||||
Noun : Type = {s : NTable ; g : Gender; h : Species} ;
|
||||
-- Adj : Type = {s : Gender => NTable} ;
|
||||
Noun2 : Type = Noun ** {c2 : Preposition} ;
|
||||
Noun3 : Type = Noun2 ** {c3 : Preposition} ;
|
||||
|
||||
mkPreposition = overload {
|
||||
mkPreposition : Str -> Case -> Preposition = \s,c -> {s=s;c=c} ;
|
||||
mkPreposition : Str -> Preposition = \s -> {s=s;c=Gen} ;
|
||||
} ;
|
||||
|
||||
Adj : Type = {s : AForm => Str} ;
|
||||
Adj2 : Type = Adj ** {c2 : Preposition} ;
|
||||
|
||||
Verb : Type = {s : VForm => Str} ;
|
||||
Verb2 : Type = Verb ** {c2 : Preposition} ;
|
||||
Verb3 : Type = Verb2 ** {c3 : Preposition} ;
|
||||
|
||||
AP : Type = {s : Species => Gender => NTable } ;
|
||||
uttAP : AP -> (Gender => Str) ;
|
||||
@@ -1252,7 +1264,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
||||
isPred = False
|
||||
};
|
||||
|
||||
predVSlash : Verb ** {c2 : Str} -> VPSlash = \v ->
|
||||
predVSlash : Verb2 -> VPSlash = \v ->
|
||||
predV v ** {c2 = v.c2} ;
|
||||
|
||||
-- in verbal sentences, the verb agrees with the subject
|
||||
@@ -1264,7 +1276,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
||||
};
|
||||
|
||||
insertObj : NP -> VPSlash -> VP = \np,vp -> vp **
|
||||
{ obj = {s = vp.obj.s ++ vp.c2 ++ np.s ! Acc ; a = np.a} };
|
||||
{ obj = {s = vp.obj.s ++ vp.c2.s ++ np.s ! vp.c2.c ; a = np.a} };
|
||||
|
||||
insertPred : {s : AAgr => Case => Str} -> VP -> VP = \p,vp -> vp **
|
||||
{ pred = p;
|
||||
@@ -1278,8 +1290,8 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
||||
insertPred xabar (predV (v1hollow {f = "ك"; c = "و" ; l = "ن"} u) );
|
||||
|
||||
-- Slash categories
|
||||
VPSlash : Type = VP ** {c2 : Str} ;
|
||||
ClSlash : Type = Cl ** {c2 : Str} ;
|
||||
VPSlash : Type = VP ** {c2 : Preposition} ;
|
||||
ClSlash : Type = Cl ** {c2 : Preposition} ;
|
||||
|
||||
Cl : Type = {s : Tense => Polarity => Order => Str} ;
|
||||
QCl : Type = {s : Tense => Polarity => QForm => Str} ;
|
||||
|
||||
@@ -102,7 +102,7 @@ concrete SentenceAra of Sentence = CatAra ** open
|
||||
|
||||
SlashVP np vps = PredVP np vps ** { c2 = vps.c2 } ;
|
||||
AdvSlash slash adv = slash ** { s2 = slash.s2 ++ adv.s } ;
|
||||
SlashPrep cl prep = cl ** {c2 = prep.s} ;
|
||||
SlashPrep cl prep = cl ** {c2 = prep} ;
|
||||
|
||||
-- SlashVS np vs sslash = TODO
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ concrete StructuralAra of Structural = CatAra **
|
||||
flags optimize=all ; coding=utf8 ;
|
||||
|
||||
lin
|
||||
above_Prep = ss "فَوْقَ" ;
|
||||
after_Prep = ss "بَعْدَ" ;
|
||||
above_Prep = mkPrep "فَوْقَ" ;
|
||||
after_Prep = mkPrep "بَعْدَ" ;
|
||||
all_Predet = mkPredet "كُلّ" True ;
|
||||
almost_AdA = ss "تَقْرِيباً";
|
||||
almost_AdN = ss "حَوَالي" ; -- or "تَقرِيبا"
|
||||
@@ -13,20 +13,20 @@ concrete StructuralAra of Structural = CatAra **
|
||||
-- always_AdV = ss "َلوَيس" ;
|
||||
and_Conj = ss "وَ" ** {n = Pl} ;
|
||||
-- because_Subj = ss "بعَُسي" ;
|
||||
before_Prep = ss "قَبْلَ" ;
|
||||
behind_Prep = ss "خَلْفَ" ;
|
||||
between_Prep = ss "بَيْنَ" ;
|
||||
before_Prep = mkPrep "قَبْلَ" ;
|
||||
behind_Prep = mkPrep "خَلْفَ" ;
|
||||
between_Prep = mkPrep "بَيْنَ" ;
|
||||
-- both7and_DConj = sd2 "بْته" "َند" ** {n = Pl} ;
|
||||
-- but_PConj = ss "بُت" ;
|
||||
by8agent_Prep = ss "بِ" ;
|
||||
by8means_Prep = ss "بِ" ;
|
||||
by8agent_Prep = mkPrep "بِ" ;
|
||||
by8means_Prep = mkPrep "بِ" ;
|
||||
can_VV = mkVV (mkV "طوع" FormX) ;
|
||||
-- can8know_VV = {
|
||||
-- s = table VVForm [["بي َبلي تْ"] ; "عَن" ; "عُْلد" ;
|
||||
-- ["بّن َبلي تْ"] ; ["بِنغ َبلي تْ"] ; "عَنءت" ; "عُْلدنءت"] ;
|
||||
-- isAux = True
|
||||
-- } ;
|
||||
during_Prep = ss "خِلَالَ" ;
|
||||
during_Prep = mkPrep "خِلَالَ" ;
|
||||
-- either7or_DConj = sd2 "ِتهر" "ْر" ** {n = Sg} ;
|
||||
everybody_NP = regNP "الجَمِيع" Pl ;
|
||||
every_Det = mkDet "كُلّ" Sg Const ;
|
||||
@@ -34,7 +34,7 @@ concrete StructuralAra of Structural = CatAra **
|
||||
-- everywhere_Adv = ss "ثريوهري" ;
|
||||
few_Det = mkDet "بَعض" Pl Const ;
|
||||
-- first_Ord = ss "فِرست" ;
|
||||
from_Prep = ss "مِنَ" ;
|
||||
from_Prep = mkPrep "مِنَ" ;
|
||||
he_Pron = mkPron "هُوَ" "هُ" "هُ" (Per3 Masc Sg) ;
|
||||
here_Adv = ss "هُنا" ;
|
||||
-- here7to_Adv = ss ["تْ هري"] ;
|
||||
@@ -42,9 +42,9 @@ concrete StructuralAra of Structural = CatAra **
|
||||
how_IAdv = ss "كَيفَ" ;
|
||||
-- how8many_IDet = mkDet "كَمْ" Pl Const ; -- IL: check (was ["هْو مَني"]) ;
|
||||
-- if_Subj = ss "ِف" ;
|
||||
in8front_Prep = ss "مُقَابِلَ" ;
|
||||
in8front_Prep = mkPrep "مُقَابِلَ" ;
|
||||
i_Pron = mkPron "أَنَا" "نِي" "ي" (Per1 Sing);
|
||||
in_Prep = ss "فِي" ;
|
||||
in_Prep = mkPrep "فِي" ;
|
||||
it_Pron = he_Pron ; -- was: it_Pron = mkPron "ِت" "ِت" "ِتس" (Per3 Masc Sg);
|
||||
-- less_CAdv = ss "لسّ" ;
|
||||
many_Det = mkDet "جَمِيع" Pl Const ;
|
||||
@@ -57,14 +57,14 @@ concrete StructuralAra of Structural = CatAra **
|
||||
-- isAux = True
|
||||
-- } ;
|
||||
no_Utt = {s = \\_ => "لا"} ;
|
||||
on_Prep = ss "عَلى" ;
|
||||
on_Prep = mkPrep "عَلى" ;
|
||||
--- DEPREC one_Quant = mkQuantNum "واحِد" Sg Indef ;
|
||||
only_Predet = mkPredet "فَقَط" False;
|
||||
-- or_Conj = ss "ْر" ** {n = Sg} ;
|
||||
-- otherwise_PConj = ss "ْتهروِسي" ;
|
||||
part_Prep = ss "مِنَ" ;
|
||||
part_Prep = mkPrep "مِنَ" ;
|
||||
-- please_Voc = ss "ةلَسي" ;
|
||||
possess_Prep = ss "ل" ;
|
||||
possess_Prep = mkPrep "ل" ;
|
||||
-- quite_Adv = ss "قُِتي" ;
|
||||
she_Pron = mkPron "هِيَ" "ها" "ها" (Per3 Fem Sg) ;
|
||||
-- so_AdA = ss "سْ" ;
|
||||
@@ -84,10 +84,10 @@ concrete StructuralAra of Structural = CatAra **
|
||||
this_Quant = mkQuant7 "هَذا" "هَذِهِ" "هَذَان" "هَذَيْن" "هَاتَان" "هَاتَيْن" "هَؤُلَاء" Def;
|
||||
----b this_NP = indeclNP "هَذا" Sg ;
|
||||
----b those_NP = indeclNP "هَؤُلَاءكَ" Pl ;
|
||||
through_Prep = ss "عَبْرَ" ;
|
||||
through_Prep = mkPrep "عَبْرَ" ;
|
||||
-- too_AdA = ss "تّْ" ;
|
||||
to_Prep = ss "إِلى" ;
|
||||
under_Prep = ss "تَحْتَ" ;
|
||||
to_Prep = mkPrep "إِلى" ;
|
||||
under_Prep = mkPrep "تَحْتَ" ;
|
||||
-- very_AdA = ss "ثري" ;
|
||||
-- want_VV = P.mkVV (P.regV "وَنت") ;
|
||||
we_Pron = mkPron "نَحنُ" "نا" "نا" (Per1 Plur) ;
|
||||
@@ -110,8 +110,8 @@ concrete StructuralAra of Structural = CatAra **
|
||||
whoSg_IP = mkIP "مَنْ" "مَنْ" Sg ;
|
||||
whoPl_IP = mkIP "مَنْ" "مَنْ" Pl ;
|
||||
-- why_IAdv = ss "وهي" ;
|
||||
without_Prep = ss "بِدُونِ" ;
|
||||
with_Prep = ss "مَع" ;
|
||||
without_Prep = mkPrep "بِدُونِ" ;
|
||||
with_Prep = mkPrep "مَع" ;
|
||||
yes_Utt = {s = \\_ => "نَعَم"} ;
|
||||
youSg_Pron = mkPron "أَنتَ" "كَ" "كَ" (Per2 Masc Sg) ;
|
||||
youPl_Pron = mkPron "أَنتُمْ" "كُمْ" "كُمْ" (Per2 Masc Sg) ;
|
||||
|
||||
@@ -6,6 +6,11 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra in {
|
||||
UseV = predV ;
|
||||
|
||||
SlashVV vv vps = vps ** predV vv ; ----IL
|
||||
|
||||
-- TODO: --c3 is for verb, c2 is for dir.obj
|
||||
--SlashV2V : V2V -> VP -> VPSlash ; -- beg (her) to go
|
||||
--SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash ; -- beg me to buy
|
||||
|
||||
SlashV2a v = predVSlash v ;
|
||||
Slash3V3 v np = insertObj np (predVSlash v) ** {c2 = v.c3};
|
||||
|
||||
@@ -20,7 +25,7 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra in {
|
||||
ComplVV vv vp = let vvVP = predV vv in --- IL
|
||||
vp ** {
|
||||
s = \\pgn,vpf => vvVP.s ! pgn ! vpf
|
||||
++ vv.c2 -- أَنْ
|
||||
++ vv.c2.s -- أَنْ
|
||||
++ vp.s ! pgn ! VPImpf Cnj
|
||||
} ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user