forked from GitHub/gf-rgl
@@ -70,8 +70,7 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in {
|
|||||||
|
|
||||||
-- Structural
|
-- Structural
|
||||||
|
|
||||||
Conj = {s : Str ; n : ResAra.Number} ;
|
Conj = {s1,s2 : Str; n : ResAra.Number} ;
|
||||||
-- DConj = {s1,s2 : Str ; n : ResAra.Number} ;
|
|
||||||
Subj = {s : Str ; o : Order} ;
|
Subj = {s : Str ; o : Order} ;
|
||||||
Prep = ResAra.Preposition ;
|
Prep = ResAra.Preposition ;
|
||||||
|
|
||||||
@@ -81,7 +80,7 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in {
|
|||||||
V2, V2A = ResAra.Verb2 ;
|
V2, V2A = ResAra.Verb2 ;
|
||||||
VV = ResAra.Verb2 ** {sc : Preposition} ; -- c2 is for verb
|
VV = ResAra.Verb2 ** {sc : Preposition} ; -- c2 is for verb
|
||||||
V2S, V2Q = ResAra.Verb2 ;
|
V2S, V2Q = ResAra.Verb2 ;
|
||||||
VS = ResAra.Verb ** {o : Order} ;
|
VS = ResAra.Verb ** {o : Order; s2 : Str} ;
|
||||||
V3 = ResAra.Verb3 ;
|
V3 = ResAra.Verb3 ;
|
||||||
V2V = ResAra.Verb3 ** {sc : Preposition} ; -- c3 is for verb, c2 is for dir.obj
|
V2V = ResAra.Verb3 ** {sc : Preposition} ; -- c3 is for verb, c2 is for dir.obj
|
||||||
|
|
||||||
|
|||||||
@@ -13,11 +13,11 @@ lin
|
|||||||
|
|
||||||
BaseAdv = twoSS ;
|
BaseAdv = twoSS ;
|
||||||
ConsAdv = consrSS comma ;
|
ConsAdv = consrSS comma ;
|
||||||
ConjAdv = conjunctSS ;
|
ConjAdv = conjunctDistrSS ;
|
||||||
|
|
||||||
BaseS = twoTable Order ;
|
BaseS = twoTable Order ;
|
||||||
ConsS = consrTable Order comma ;
|
ConsS = consrTable Order comma ;
|
||||||
ConjS = conjunctTable Order ;
|
ConjS = conjunctDistrTable Order ;
|
||||||
|
|
||||||
BaseNP x y = twoTable Case x y ** {
|
BaseNP x y = twoTable Case x y ** {
|
||||||
a = conjAgr x.a y.a ;
|
a = conjAgr x.a y.a ;
|
||||||
@@ -27,7 +27,7 @@ lin
|
|||||||
a = conjAgr xs.a x.a ;
|
a = conjAgr xs.a x.a ;
|
||||||
empty = []
|
empty = []
|
||||||
} ;
|
} ;
|
||||||
ConjNP conj ss = conjunctTable Case conj ss ** {
|
ConjNP conj ss = conjunctDistrTable Case conj ss ** {
|
||||||
a = let gn = pgn2gn ss.a.pgn in
|
a = let gn = pgn2gn ss.a.pgn in
|
||||||
{pgn = Per3 gn.g (conjNumber conj.n gn.n) ; isPron = False} ;
|
{pgn = Per3 gn.g (conjNumber conj.n gn.n) ; isPron = False} ;
|
||||||
empty = []
|
empty = []
|
||||||
@@ -35,7 +35,7 @@ lin
|
|||||||
|
|
||||||
BaseAP = twoTable5 Species Gender Number State Case ;
|
BaseAP = twoTable5 Species Gender Number State Case ;
|
||||||
ConsAP = consrTable5 Species Gender Number State Case comma ;
|
ConsAP = consrTable5 Species Gender Number State Case comma ;
|
||||||
ConjAP = conjunctTable5 Species Gender Number State Case ;
|
ConjAP = conjunctDistrTable5 Species Gender Number State Case ;
|
||||||
|
|
||||||
|
|
||||||
oper
|
oper
|
||||||
@@ -74,9 +74,9 @@ oper
|
|||||||
\P,Q,R,T,S,or,xs ->
|
\P,Q,R,T,S,or,xs ->
|
||||||
{s = \\p,q,r,t,s => xs.s1 ! p ! q ! r ! t ! s ++ or.s ++ xs.s2 ! p ! q ! r ! t ! s} ;
|
{s = \\p,q,r,t,s => xs.s1 ! p ! q ! r ! t ! s ++ or.s ++ xs.s2 ! p ! q ! r ! t ! s} ;
|
||||||
|
|
||||||
-- conjunctDistrTable5 :
|
conjunctDistrTable5 :
|
||||||
-- (P,Q,R,T,S : PType) -> ConjunctionDistr -> ListTable5 P Q R T S ->
|
(P,Q,R,T,S : PType) -> ConjunctionDistr -> ListTable5 P Q R T S ->
|
||||||
-- {s : P => Q => R => T => S => Str} =
|
{s : P => Q => R => T => S => Str} =
|
||||||
-- \P,Q,R,T,S,or,xs ->
|
\P,Q,R,T,S,or,xs ->
|
||||||
-- {s = \\p,q,r,t,s => or.s1++ xs.s1 ! p ! q ! r ! t ! s ++ or.s2 ++ xs.s2 ! p ! q ! r ! t ! s} ;
|
{s = \\p,q,r,t,s => or.s1++ xs.s1 ! p ! q ! r ! t ! s ++ or.s2 ++ xs.s2 ! p ! q ! r ! t ! s} ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ concrete ExtendAra of Extend =
|
|||||||
|
|
||||||
BaseVPS = twoTable PerGenNum ;
|
BaseVPS = twoTable PerGenNum ;
|
||||||
ConsVPS = consrTable PerGenNum comma ;
|
ConsVPS = consrTable PerGenNum comma ;
|
||||||
ConjVPS = conjunctTable PerGenNum ;
|
ConjVPS = conjunctDistrTable PerGenNum ;
|
||||||
|
|
||||||
PredVPS np vps = {
|
PredVPS np vps = {
|
||||||
s = \\_ => np.s ! Nom ++ vps.s ! np.a.pgn -- first quick version with order always Nominal.
|
s = \\_ => np.s ! Nom ++ vps.s ! np.a.pgn -- first quick version with order always Nominal.
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ oper DetNP : Det -> NP = notYet "DetNP" ;
|
|||||||
oper ExistIP : IP -> QCl = notYet "ExistIP" ;
|
oper ExistIP : IP -> QCl = notYet "ExistIP" ;
|
||||||
oper FunRP : Prep -> NP -> RP -> RP = notYet "FunRP" ;
|
oper FunRP : Prep -> NP -> RP -> RP = notYet "FunRP" ;
|
||||||
oper ImpPl1 : VP -> Utt = notYet "ImpPl1" ;
|
oper ImpPl1 : VP -> Utt = notYet "ImpPl1" ;
|
||||||
oper ImpersCl : VP -> Cl = notYet "ImpersCl" ;
|
|
||||||
oper PConjConj : Conj -> PConj = notYet "PConjConj" ;
|
oper PConjConj : Conj -> PConj = notYet "PConjConj" ;
|
||||||
oper PPartNP : NP -> V2 -> NP = notYet "PPartNP" ;
|
oper PPartNP : NP -> V2 -> NP = notYet "PPartNP" ;
|
||||||
oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ;
|
oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ;
|
||||||
|
|||||||
@@ -150,6 +150,8 @@ resource ParadigmsAra = open
|
|||||||
= \r,s,p -> lin A (brkA r s p) ;
|
= \r,s,p -> lin A (brkA r s p) ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
idaafaA : N -> A -> A ; -- first argument will be in constructus but inflect in case, adjective in genitive, but inflect in gender, number and definiteness. e.g. غَيْرُ طَيِّبٍ
|
||||||
|
|
||||||
degrA : (posit,compar,plur : Str) -> A ;
|
degrA : (posit,compar,plur : Str) -> A ;
|
||||||
|
|
||||||
irregFemA : (masc : A) -> (fem : A) -> A ; -- adjective with irregular feminine. Takes two adjectives (masc. "regular" and fem. "regular") and puts them together.
|
irregFemA : (masc : A) -> (fem : A) -> A ; -- adjective with irregular feminine. Takes two adjectives (masc. "regular" and fem. "regular") and puts them together.
|
||||||
@@ -199,6 +201,13 @@ resource ParadigmsAra = open
|
|||||||
mkPrep : Str -> Prep ;
|
mkPrep : Str -> Prep ;
|
||||||
mkPrep : Str -> Case -> Prep
|
mkPrep : Str -> Case -> Prep
|
||||||
} ; -- preposition in the sense of RGL abstract syntax
|
} ; -- preposition in the sense of RGL abstract syntax
|
||||||
|
|
||||||
|
--2 Conjunctions
|
||||||
|
mkConj : overload {
|
||||||
|
mkConj : Str -> Conj ; -- and
|
||||||
|
mkConj : Str -> Str -> Conj ; -- either … or
|
||||||
|
} ;
|
||||||
|
|
||||||
--2 Verbs
|
--2 Verbs
|
||||||
|
|
||||||
-- Overloaded operations
|
-- Overloaded operations
|
||||||
@@ -267,7 +276,10 @@ resource ParadigmsAra = open
|
|||||||
-- questions, verb phrases, and adjectives.
|
-- questions, verb phrases, and adjectives.
|
||||||
|
|
||||||
mkV0 : V -> V0 ;
|
mkV0 : V -> V0 ;
|
||||||
mkVS : V -> VS ;
|
-- mkVS = overload {
|
||||||
|
-- mkVS : V -> VS ;
|
||||||
|
-- mkVS : V -> Str -> VS
|
||||||
|
-- } ;
|
||||||
mkV2S : V -> Str -> V2S ;
|
mkV2S : V -> Str -> V2S ;
|
||||||
mkVV = overload {
|
mkVV = overload {
|
||||||
mkVV : V -> VV = regVV ;
|
mkVV : V -> VV = regVV ;
|
||||||
@@ -539,7 +551,9 @@ resource ParadigmsAra = open
|
|||||||
|
|
||||||
brkN' : Str -> Str -> Str -> Gender -> Species -> N =
|
brkN' : Str -> Str -> Str -> Gender -> Species -> N =
|
||||||
\root,sg,pl,gen,spec ->
|
\root,sg,pl,gen,spec ->
|
||||||
let { kitAb = mkWord sg root;
|
let { kitAb = case root of {
|
||||||
|
? + ? + "ي" => mkDefectiveAlifMaqsura (mkPat sg) (mkRoot3 root) ;
|
||||||
|
_ => mkWord sg root };
|
||||||
kutub = mkWord pl root
|
kutub = mkWord pl root
|
||||||
} in mkFullN (reg kitAb kutub) gen spec;
|
} in mkFullN (reg kitAb kutub) gen spec;
|
||||||
|
|
||||||
@@ -592,6 +606,13 @@ resource ParadigmsAra = open
|
|||||||
lin N3 (n ** {c2 = mkPreposition p ; c3 = mkPreposition q}) ;
|
lin N3 (n ** {c2 = mkPreposition p ; c3 = mkPreposition q}) ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
mkConj = overload {
|
||||||
|
mkConj : Str -> Conj = \s -> lin Conj {s1 = [] ; s2 = s ; n = Sg} ;
|
||||||
|
mkConj : Str -> Str -> Conj = \s1,s2 -> lin Conj {s1 = s1 ; s2 = s2 ; n = Sg} ;
|
||||||
|
mkConj : Str -> Number -> Conj = \s,n -> lin Conj {s1 = [] ; s2 = s ; n = n} ;
|
||||||
|
mkConj : Str -> Str -> Number -> Conj = \s1,s2,n -> lin Conj {s1 = s1 ; s2 = s2 ; n = n}
|
||||||
|
} ;
|
||||||
|
|
||||||
mkPron : (_,_,_ : Str) -> PerGenNum -> Pron = \ana,nI,I,pgn ->
|
mkPron : (_,_,_ : Str) -> PerGenNum -> Pron = \ana,nI,I,pgn ->
|
||||||
lin Pron (ResAra.mkPron ana nI I pgn) ;
|
lin Pron (ResAra.mkPron ana nI I pgn) ;
|
||||||
|
|
||||||
@@ -642,7 +663,11 @@ resource ParadigmsAra = open
|
|||||||
degrA : (posit,compar,plur : Str) -> A
|
degrA : (posit,compar,plur : Str) -> A
|
||||||
= \posit,compar,plur -> lin A {s = clr posit compar plur} ;
|
= \posit,compar,plur -> lin A {s = clr posit compar plur} ;
|
||||||
|
|
||||||
|
idaafaA : N -> A -> A = \ghayr,tayyib -> tayyib ** {
|
||||||
|
s = table {
|
||||||
|
APosit g n d c => ghayr.s ! n ! Const ! c ++ tayyib.s ! APosit g n d c ;
|
||||||
|
AComp d c => ghayr.s ! Sg ! Const ! c ++ tayyib.s ! AComp d c }
|
||||||
|
} ;
|
||||||
|
|
||||||
sndA root pat =
|
sndA root pat =
|
||||||
let raw = sndA' root pat in {
|
let raw = sndA' root pat in {
|
||||||
@@ -723,7 +748,10 @@ resource ParadigmsAra = open
|
|||||||
|
|
||||||
dirdirV3 v = dirV3 v (casePrep acc) ;
|
dirdirV3 v = dirV3 v (casePrep acc) ;
|
||||||
|
|
||||||
mkVS v = lin VS (v ** {o = Subord}) ;
|
mkVS = overload {
|
||||||
|
mkVS : V -> VS = \v -> lin VS (v ** {o = Subord; s2 = []}) ;
|
||||||
|
mkVS : V -> Str -> VS = \v,s -> lin VS (v ** {o = Subord; s2 = s})
|
||||||
|
} ;
|
||||||
mkVQ v = lin VQ v ;
|
mkVQ v = lin VQ v ;
|
||||||
|
|
||||||
regVV : V -> VV = \v -> lin VV v ** {c2 = mkPreposition "أَنْ" ; sc = noPrep} ;
|
regVV : V -> VV = \v -> lin VV v ** {c2 = mkPreposition "أَنْ" ; sc = noPrep} ;
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ oper
|
|||||||
--PerfAct, PerfPas, ImpfAct, ImpfPas, Imp, PPart
|
--PerfAct, PerfPas, ImpfAct, ImpfPas, Imp, PPart
|
||||||
verb : (_,_,_,_,_,_ : Str) -> Verb =
|
verb : (_,_,_,_,_,_ : Str) -> Verb =
|
||||||
\katab,kutib,aktub,uktab,euktub,maktUb -> {
|
\katab,kutib,aktub,uktab,euktub,maktUb -> {
|
||||||
s = table {
|
s = \\vf => rectifyHmz (case vf of {
|
||||||
VPerf Act pgn => katab + suffixPerf ! pgn ;
|
VPerf Act pgn => katab + suffixPerf ! pgn ;
|
||||||
VPerf Pas pgn => kutib + suffixPerf ! pgn ;
|
VPerf Pas pgn => kutib + suffixPerf ! pgn ;
|
||||||
VImpf Ind Act pgn => prefixImpf!pgn + aktub + suffixImpfInd !pgn;
|
VImpf Ind Act pgn => prefixImpf!pgn + aktub + suffixImpfInd !pgn;
|
||||||
@@ -230,7 +230,7 @@ oper
|
|||||||
VImpf m Pas pgn => prefixImpf !pgn + uktab + suffixImpfCJ m !pgn;
|
VImpf m Pas pgn => prefixImpf !pgn + uktab + suffixImpfCJ m !pgn;
|
||||||
VImp g n => euktub + suffixImpfCJ Jus ! (Per2 g n);
|
VImp g n => euktub + suffixImpfCJ Jus ! (Per2 g n);
|
||||||
VPPart => maktUb
|
VPPart => maktUb
|
||||||
}
|
})
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
--affixes of sound verbs
|
--affixes of sound verbs
|
||||||
|
|||||||
@@ -12,23 +12,8 @@ concrete SentenceAra of Sentence = CatAra ** open
|
|||||||
flags optimize=all_subs ; coding=utf8 ;
|
flags optimize=all_subs ; coding=utf8 ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
{-
|
|
||||||
PredVP np vp =
|
|
||||||
{ s = \\t,p,o =>
|
|
||||||
case o of {
|
|
||||||
Verbal =>
|
|
||||||
case vp.comp.a.isPron of {
|
|
||||||
False => vp.s ! t ! p ! Verbal ! np.a ++ np.s ! Nom ++ vp.comp.s ! Acc ;
|
|
||||||
True => vp.s ! t ! p ! Verbal ! np.a ++ vp.comp.s ! Acc ++ np.s ! Nom
|
|
||||||
};
|
|
||||||
Nominal =>
|
|
||||||
np.s ! Nom ++ vp.s ! t ! p ! Nominal ! np.a ++ vp.comp.s ! Acc
|
|
||||||
}
|
|
||||||
};
|
|
||||||
-}
|
|
||||||
PredVP = predVP ;
|
|
||||||
|
|
||||||
-- PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp ;
|
PredVP = predVP ;
|
||||||
|
|
||||||
ImpVP vp = {
|
ImpVP vp = {
|
||||||
s = \\p,g,n =>
|
s = \\p,g,n =>
|
||||||
@@ -57,11 +42,9 @@ concrete SentenceAra of Sentence = CatAra ** open
|
|||||||
|
|
||||||
-- SlashVS np vs sslash = TODO
|
-- SlashVS np vs sslash = TODO
|
||||||
|
|
||||||
|
EmbedS s = {s = "أَنْ" ++ s.s ! Verbal} ;
|
||||||
EmbedS s = {s = "أَنْ" ++ s.s ! Verbal} ;
|
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
EmbedVP vp = {s = uttVP vp ! Masc} ;
|
||||||
EmbedVP vp = {s = uttVP vp ! Masc} ;
|
|
||||||
|
|
||||||
|
|
||||||
UseCl t p cl =
|
UseCl t p cl =
|
||||||
{s = \\o => t.s ++ p.s ++
|
{s = \\o => t.s ++ p.s ++
|
||||||
|
|||||||
@@ -11,12 +11,12 @@ concrete StructuralAra of Structural = CatAra **
|
|||||||
almost_AdN = ss "حَوَالي" ; -- or "تَقرِيبا"
|
almost_AdN = ss "حَوَالي" ; -- or "تَقرِيبا"
|
||||||
-- although_Subj = ss "َلتهُْغه" ;
|
-- although_Subj = ss "َلتهُْغه" ;
|
||||||
-- always_AdV = ss "َلوَيس" ;
|
-- always_AdV = ss "َلوَيس" ;
|
||||||
and_Conj = ss "وَ" ** {n = Pl} ;
|
and_Conj = mkConj "وَ" Pl ;
|
||||||
-- because_Subj = ss "بعَُسي" ;
|
-- because_Subj = ss "بعَُسي" ;
|
||||||
before_Prep = mkPrep "قَبْلَ" ;
|
before_Prep = mkPrep "قَبْلَ" ;
|
||||||
behind_Prep = mkPrep "خَلْفَ" ;
|
behind_Prep = mkPrep "خَلْفَ" ;
|
||||||
between_Prep = mkPrep "بَيْنَ" ;
|
between_Prep = mkPrep "بَيْنَ" ;
|
||||||
-- both7and_DConj = sd2 "بْته" "َند" ** {n = Pl} ;
|
both7and_DConj = mkConj "كِلا" "وَ" Pl ;
|
||||||
-- but_PConj = ss "بُت" ;
|
-- but_PConj = ss "بُت" ;
|
||||||
by8agent_Prep,
|
by8agent_Prep,
|
||||||
by8means_Prep = biPrep ;
|
by8means_Prep = biPrep ;
|
||||||
@@ -64,7 +64,7 @@ concrete StructuralAra of Structural = CatAra **
|
|||||||
no_Utt = {s = \\_ => "لا"} ;
|
no_Utt = {s = \\_ => "لا"} ;
|
||||||
on_Prep = mkPrep "عَلَى" ;
|
on_Prep = mkPrep "عَلَى" ;
|
||||||
only_Predet = mkPredet "فَقَط" False;
|
only_Predet = mkPredet "فَقَط" False;
|
||||||
or_Conj = ss "أَوْ" ** {n = Sg} ;
|
or_Conj = mkConj "أَوْ" ;
|
||||||
-- otherwise_PConj = ss "ْتهروِسي" ;
|
-- otherwise_PConj = ss "ْتهروِسي" ;
|
||||||
part_Prep = mkPrep "مِنَ" ;
|
part_Prep = mkPrep "مِنَ" ;
|
||||||
-- please_Voc = ss "ةلَسي" ;
|
-- please_Voc = ss "ةلَسي" ;
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in {
|
|||||||
|
|
||||||
-- : VS -> S -> VP ; -- say that she runs
|
-- : VS -> S -> VP ; -- say that she runs
|
||||||
ComplVS vs s = predV vs ** { -- IL
|
ComplVS vs s = predV vs ** { -- IL
|
||||||
obj = emptyObj ** {s = s.s ! vs.o}
|
obj = emptyObj ** {s = vs.s2 ++ s.s ! vs.o}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : VQ -> QS -> VP ; -- wonder who runs
|
-- : VQ -> QS -> VP ; -- wonder who runs
|
||||||
|
|||||||
Reference in New Issue
Block a user