diff --git a/src/arabic/CatAra.gf b/src/arabic/CatAra.gf index 14aac02fb..201a32803 100644 --- a/src/arabic/CatAra.gf +++ b/src/arabic/CatAra.gf @@ -77,12 +77,12 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in { -- Open lexical classes, e.g. Lexicon V, VQ, VA = ResAra.Verb ; -- = {s : VForm => Str} ; - V2, V2A = ResAra.Verb2 ; - VV = ResAra.Verb2 ** {sc : Preposition} ; -- c2 is for verb - V2S, V2Q = ResAra.Verb2 ; - VS = ResAra.Verb ** {o : Order; s2 : Str} ; + VV = ResAra.Verb ** {s2 : Str ; sc : Preposition} ; -- s2 is complementiser + V2, V2A, V2Q = ResAra.Verb2 ; + V2V = ResAra.Verb2 ** {s2 : Str ; sc : Preposition} ; -- s2 is complementiser, c2 is for dir.obj + V2S = ResAra.Verb2 ** {s2 : Str ; o : Order} ; + VS = ResAra.Verb ** {s2 : Str ; o : Order} ; V3 = ResAra.Verb3 ; - V2V = ResAra.Verb3 ** {sc : Preposition} ; -- c3 is for verb, c2 is for dir.obj A = ResAra.Adj ; A2 = ResAra.Adj2 ; diff --git a/src/arabic/LexiconAra.gf b/src/arabic/LexiconAra.gf index f9d69b33b..76ee7542f 100644 --- a/src/arabic/LexiconAra.gf +++ b/src/arabic/LexiconAra.gf @@ -11,7 +11,7 @@ flags lin airplane_N = sdfN "طءر" "فاعِلة" Fem NoHum ; - answer_V2S = dirV2 (v3 "جوب") ; + answer_V2S = mkV2S (v3 "جوب") ; apartment_N = brkN "شقّ" "فِعّة" "فِعَل" Fem NoHum ; apple_N = sdfN "تفح" "فِعّالة" Fem NoHum ; art_N = brkN "فنن" "فَعّ" "فُعُول" Masc NoHum ; diff --git a/src/arabic/ParadigmsAra.gf b/src/arabic/ParadigmsAra.gf index 9fd9d788d..a4235a630 100644 --- a/src/arabic/ParadigmsAra.gf +++ b/src/arabic/ParadigmsAra.gf @@ -268,29 +268,34 @@ resource ParadigmsAra = open mkV0 : V -> V0 ; mkVS : overload { - mkVS : V -> VS ; - mkVS : V -> Str -> VS + mkVS : V -> VS ; -- Takes a V, returns a VS with default complementiser أَنَّ. + mkVS : V -> Str -> VS -- Takes a V and a complementiser. } ; - mkV2S : V -> Str -> V2S ; + mkV2S : overload { + mkV2S : V -> V2S ; -- Takes a V, returns a V2S with default complementiser أَنَّ and accusative as the direct object case. + mkV2S : VS -> V2S ; -- Takes a VS, returns a V2S with accusative as the object case, retaining the VS's complementiser. + mkV2S : V2 -> V2S ; -- Takes a V2, returns a V2S with default complementiser أَنَّ, retaining the V2's direct object case. + mkV2S : V -> Prep -> Str -> V2S ; -- Takes V, preposition and complementiser. + } ; mkVV = overload { - mkVV : V -> VV -- Make VV out of a V; أَنْ as the complementiser, default subject case (nominative). + mkVV : V -> VV -- Takes a V, returns a VV with default complementiser أَنَّ. = regVV ; - mkVV : V -> Str -> VV -- String argument as the complementiser, default subject case (nominative). - = c2VV ; - mkVV : V -> Prep -> VV -- Prep argument as the complementiser, default subject case (nominative). - = prepVV ; - mkVV : V -> Prep -> Prep -> VV -- First Prep argument is the complementiser, second Prep is subject case. For instance, أَنْ and لِ to get "يُمْكِنُ أَنْ يَفْعَلَ لِشَيْءٍ". - = prep2VV + mkVV : V -> Str -> VV -- Takes a V and a complementiser. + = s2VV ; } ; mkV2V : overload { - mkV2V : V -> Str -> Str -> V2V ; - mkV2V : V -> Prep -> Prep -> V2V ; - mkV2V : VV -> Prep -> V2V + mkV2V : V -> V2V ; -- Takes a V, returns a V2V with default complementiser أَنْ and accusative as the direct object case. + mkV2V : VV -> V2V ; -- Takes VV, returns V2V with accusative as the object case, retaining the VV's complementiser. + mkV2V : V -> Prep -> Str -> V2V ; -- Takes V, preposition and complementiser. + } ; + subjCase : overload { + subjCase : VV -> Prep -> VV ; -- Change the subject case of a VV. (Default is nominative; use any other case or preposition.) + subjCase : V2V -> Prep -> V2V ; -- Change the subject case to a V2V. (Default is nominative; use any other case or preposition.) } ; mkVA : V -> VA ; - mkV2A : V -> Str -> V2A ; + mkV2A : V -> Str -> V2A ; -- Takes a V and an object case/preposition. NB. V2A = V2, see mkV2 for more constructors. mkVQ : V -> VQ ; - mkV2Q : V -> Str -> V2Q ; + mkV2Q : V -> Str -> V2Q ; -- Takes a V and an object case/preposition. NB. V2Q = V2, see mkV2 for more constructors. mkAS : A -> AS ; mkA2S : A -> Str -> A2S ; @@ -797,36 +802,54 @@ resource ParadigmsAra = open dirdirV3 v = dirV3 v (casePrep acc) ; mkVS = overload { - mkVS : V -> VS = \v -> lin VS (v ** {o = Subord; s2 = []}) ; + mkVS : V -> VS = \v -> lin VS (v ** {o = Subord; s2 = anna}) ; mkVS : V -> Str -> VS = \v,s -> lin VS (v ** {o = Subord; s2 = s}) } ; mkVQ v = lin VQ v ; - regVV : V -> VV = \v -> lin VV v ** {c2 = mkPreposition "أَنْ" ; sc = noPrep} ; - c2VV : V -> Str -> VV = \v,prep -> regVV v ** {c2 = mkPreposition prep ; sc = noPrep} ; - prepVV : V -> Prep -> VV = \v,prep -> regVV v ** {c2=prep; sc=noPrep} ; - prep2VV : V -> (_,_ : Prep) -> VV = \v,p1,p2 -> regVV v ** {c2=p1; sc=p2} ; + -- Complementisers for V*V and V*S + an : Str = "أَنْ" ; + anna : Str = "أَنَّ" ; + + regVV : V -> VV = \v -> lin VV v ** {s2=an ; sc=noPrep} ; + s2VV : V -> Str -> VV = \v,compl -> regVV v ** {s2=compl; sc=noPrep} ; + prepVV : V -> Prep -> VV = \v,prep -> regVV v ** {s2=an ; sc=prep} ; + prep2VV : V -> Prep -> Str -> VV = \v,p,c -> regVV v ** {s2=c; sc=p} ; V0 : Type = V ; ---- V2S, V2V, V2Q, V2A : Type = V2 ; AS, A2S, AV : Type = A ; A2V : Type = A2 ; mkV0 v = v ; - mkV2S v p = lin V2S (prepV2 v (mkPreposition p)) ; + mkV2S = overload { + mkV2S : V -> V2S + = \v -> lin V2S (prepV2 v accPrep ** {s2=anna ; o=Subord}) ; + mkV2S : V2 -> V2S + = \v2 -> lin V2S (v2 ** {s2=anna ; o=Subord}) ; + mkV2S : V -> Preposition -> V2S + = \v,p -> lin V2S ((prepV2 v p) ** {s2=anna ; o=Subord}) + } ; + mkV2V = overload { - mkV2V : V -> Str -> Str -> V2V = \v,p,q -> - lin V2V (prepV3 v (mkPreposition p) (mkPreposition q) ** {sc = noPrep}) ; - mkV2V : V2 -> V2V = \v2 -> - lin V2V (v2 ** {c2 = v2.c2 ; c3,sc = noPrep}) ; - mkV2V : V2 -> Prep -> V2V = \v2,p -> - lin V2V (v2 ** {c2 = v2.c2 ; c3 = p ; sc = noPrep}) ; - mkV2V : V2 -> Prep -> Prep -> V2V = \v2,p,q-> - lin V2V (v2 ** {c2 = v2.c2 ; c3 = p ; sc = q}) ; - mkV2V : V -> Prep -> Prep -> V2V = \v,p,q -> - lin V2V (prepV3 v p q ** {sc = noPrep}) ; + mkV2V : V -> V2V = \v -> + lin V2V (v ** {c2=accPrep ; s2=an ; sc=noPrep}) ; + mkV2V : VV -> V2V = \vv -> + lin V2V (vv ** {c2 = accPrep}) ; mkV2V : VV -> Prep -> V2V = \vv,p -> - lin V2V (vv ** {c2 = p ; c3 = vv.c2}) ; + lin V2V (vv ** {c2 = p}) ; + mkV2V : V -> Prep -> Str -> V2V = \v,p,q -> + lin V2V (v ** {c2 = p ; s2 = q ; sc = noPrep}) ; + mkV2V : V2 -> V2V = \v2 -> + lin V2V (v2 ** {s2 = an ; sc = noPrep}) ; + mkV2V : V2 -> Str -> V2V = \v2,c -> + lin V2V (v2 ** {c2 = v2.c2 ; s2 = c ; sc = noPrep}) ; } ; + + subjCase = overload { + subjCase : VV -> Prep -> VV = \vv,p -> vv ** {sc=p} ; + subjCase : V2V -> Prep -> V2V = \vv,p -> vv ** {sc=p} + } ; + mkVA v = v ** {lock_VA = <>} ; mkV2A v p = lin V2A (prepV2 v (mkPreposition p)); mkV2Q v p = lin V2Q (prepV2 v (mkPreposition p)); diff --git a/src/arabic/VerbAra.gf b/src/arabic/VerbAra.gf index abb602946..d276e7f05 100644 --- a/src/arabic/VerbAra.gf +++ b/src/arabic/VerbAra.gf @@ -12,7 +12,7 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in { SlashV2V v2v vp = let v2vVP = predV v2v in -- IL vp ** { s = v2vVP.s ; - agrObj = \\pgn => v2v.c3.s -- أَنْ + agrObj = \\pgn => v2v.s2 -- أَنْ ++ vp.s ! pgn ! VPImpf Cnj -- this will agree with the object added by ComplSlash ++ vp.obj.s ; obj = emptyObj ; @@ -26,7 +26,7 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in { vps ** { s = \\pgn,vpf => v2vVP.s ! pgn ! vpf -- main verb agrees with subject ++ bindIfPron np v2vVP - ++ v2v.c3.s -- أَنْ + ++ v2v.s2 -- أَنْ ++ vps.s ! np.a.pgn ! VPImpf Cnj -- verb from old VP agrees with object ++ vps.obj.s ; -- otherwise obj appears in a weird place /IL obj = emptyObj ; @@ -59,7 +59,7 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in { ComplVV vv vp = let vvVP = predV vv in -- IL vp ** { s = \\pgn,vpf => vvVP.s ! pgn ! vpf - ++ vv.c2.s -- أَنْ + ++ vv.s2 -- أَنْ ++ vp.s ! pgn ! VPImpf Cnj ; isPred = False ; sc = vv.sc @@ -67,7 +67,8 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in { -- : VS -> S -> VP ; -- say that she runs ComplVS vs s = predV vs ** { -- IL - obj = emptyObj ** {s = vs.s2 ++ s.s ! vs.o} + obj = emptyObj ** {s = vs.s2 -- أَنَّ + ++ s.s ! vs.o} } ; -- : VQ -> QS -> VP ; -- wonder who runs