forked from GitHub/gf-rgl
(Ara) New verb paradigm (geminate 7) + clean up CN
This commit is contained in:
@@ -18,6 +18,8 @@ concrete IdiomAra of Idiom = CatAra ** open
|
|||||||
-- : NP -> RS -> Cl ; -- it is I who did it
|
-- : NP -> RS -> Cl ; -- it is I who did it
|
||||||
--CleftNP np rs =
|
--CleftNP np rs =
|
||||||
|
|
||||||
|
-- TODO: check page 61 for existentials and clefts /IL
|
||||||
|
|
||||||
-- : Adv -> S -> Cl ; -- it is here she slept
|
-- : Adv -> S -> Cl ; -- it is here she slept
|
||||||
CleftAdv adv s =
|
CleftAdv adv s =
|
||||||
let comp : Comp = {s = \\_,_ => adv.s ++ s.s} in ----
|
let comp : Comp = {s = \\_,_ => adv.s ++ s.s} in ----
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ lin
|
|||||||
cn.s ! number
|
cn.s ! number
|
||||||
! nounState det.d number
|
! nounState det.d number
|
||||||
! nounCase c det.n det.d ;
|
! nounCase c det.n det.d ;
|
||||||
adj : NTable -> Case -> Str = \ntable,c ->
|
adj : Case -> Str = \c ->
|
||||||
ntable ! number
|
cn.s2 ! number
|
||||||
! (definite ! det.d) -- Indef remains Indef, rest become Def
|
! (definite ! det.d) -- Indef remains Indef, rest become Def
|
||||||
! c
|
! c
|
||||||
} in {
|
} in {
|
||||||
@@ -22,13 +22,11 @@ lin
|
|||||||
case cnB4det det.isPron det.isNum det.n det.d of {
|
case cnB4det det.isPron det.isNum det.n det.d of {
|
||||||
False => determiner c
|
False => determiner c
|
||||||
++ noun c
|
++ noun c
|
||||||
++ adj cn.s2 c
|
++ adj c
|
||||||
++ adj cn.adj c
|
|
||||||
++ cn.np ! c ;
|
++ cn.np ! c ;
|
||||||
True => noun (cas c) -- deal with possessive suffix
|
True => noun (cas c) -- deal with possessive suffix
|
||||||
++ determiner c
|
++ determiner c
|
||||||
++ adj cn.s2 c
|
++ adj c
|
||||||
++ adj cn.adj c
|
|
||||||
++ cn.np ! c
|
++ cn.np ! c
|
||||||
};
|
};
|
||||||
a = { pgn = agrP3 cn.h cn.g number;
|
a = { pgn = agrP3 cn.h cn.g number;
|
||||||
@@ -170,10 +168,7 @@ lin
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
MassNP cn =
|
MassNP cn =
|
||||||
{s = \\c => cn.s ! Sg ! Indef ! c
|
{s = \\c => cn2str cn Sg Indef c ;
|
||||||
++ cn.s2 ! Sg ! Indef ! c
|
|
||||||
++ cn.np ! c
|
|
||||||
++ cn.adj ! Sg ! Indef ! c ;
|
|
||||||
a = {pgn = Per3 cn.g Sg ; isPron = False} ;
|
a = {pgn = Per3 cn.g Sg ; isPron = False} ;
|
||||||
empty = []} ;
|
empty = []} ;
|
||||||
|
|
||||||
@@ -190,20 +185,23 @@ lin
|
|||||||
ComplN3 n3 np = ComplN2 n3 np ** {c2 = n3.c3} ;
|
ComplN3 n3 np = ComplN2 n3 np ** {c2 = n3.c3} ;
|
||||||
|
|
||||||
AdjCN ap cn = cn ** {
|
AdjCN ap cn = cn ** {
|
||||||
adj = \\n,d,c => cn.adj ! n ! d ! c ++ ap.s ! cn.h ! cn.g ! n ! (definite ! d) ! c
|
s2 = \\n,d,c => cn.s2 ! n ! d ! c ++ ap.s ! cn.h ! cn.g ! n ! (definite ! d) ! c
|
||||||
};
|
};
|
||||||
|
|
||||||
RelCN cn rs = cn ** {s = \\n,s,c => cn.s ! n ! s ! c ++ rs.s ! {pgn=Per3 cn.g n ; isPron=False} ! c};
|
RelCN cn rs = cn ** {
|
||||||
|
s2 = \\n,s,c => cn.s2 ! n ! s ! c ++ rs.s ! {pgn=Per3 cn.g n ; isPron=False} ! c};
|
||||||
|
|
||||||
RelNP np rs = np ** {s = \\c => np.s ! c ++ rs.s ! np.a ! c} ;
|
RelNP np rs = np ** {s = \\c => np.s ! c ++ rs.s ! np.a ! c} ;
|
||||||
-- AdvCN cn ad = {s = \\n,c => cn.s ! n ! c ++ ad.s} ;
|
|
||||||
--
|
AdvCN,
|
||||||
-- SentCN cn sc = {s = \\n,c => cn.s ! n ! c ++ sc.s} ;
|
SentCN = \cn,ss -> cn ** {s2 = \\n,d,c => cn.s2 ! n ! d ! c ++ ss.s} ;
|
||||||
|
|
||||||
ApposCN cn np = cn ** { np = \\c => cn.np ! c ++ np.s ! c } ;
|
ApposCN cn np = cn ** { np = \\c => cn.np ! c ++ np.s ! c } ;
|
||||||
|
|
||||||
-- : CN -> NP -> CN ; -- house of Paris, house of mine
|
-- : CN -> NP -> CN ; -- house of Paris, house of mine
|
||||||
PossNP cn np = cn ** {
|
PossNP cn np = cn ** {
|
||||||
s = \\n,_d,c => cn.s ! n ! Const ! c ;
|
s = \\n,_d,c => cn.s ! n ! Const ! c ;
|
||||||
|
s2 = \\n,_d,c => cn.s2 ! n ! Const ! c ;
|
||||||
np = \\c => cn.np ! c ++ np.s ! Gen
|
np = \\c => cn.np ! c ++ np.s ! Gen
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -218,7 +218,11 @@ resource ParadigmsAra = open
|
|||||||
|
|
||||||
v6 : Str -> V ;
|
v6 : Str -> V ;
|
||||||
|
|
||||||
--Verb Form VIII 'ifta`ala
|
--Verb Form VII : tafaa`ala
|
||||||
|
|
||||||
|
v7 : Str -> V ;
|
||||||
|
|
||||||
|
--Verb Form VIII infa`ala
|
||||||
|
|
||||||
v8 : Str -> V ;
|
v8 : Str -> V ;
|
||||||
|
|
||||||
@@ -266,7 +270,8 @@ resource ParadigmsAra = open
|
|||||||
mkVV = overload {
|
mkVV = overload {
|
||||||
mkVV : V -> VV = regVV ;
|
mkVV : V -> VV = regVV ;
|
||||||
mkVV : V -> Str -> VV = c2VV ;
|
mkVV : V -> Str -> VV = c2VV ;
|
||||||
mkVV : V -> Preposition -> VV = prepVV
|
mkVV : V -> Preposition -> VV = prepVV ;
|
||||||
|
mkVV : V -> Preposition -> Preposition -> VV = prep2VV
|
||||||
} ;
|
} ;
|
||||||
mkV2V : overload {
|
mkV2V : overload {
|
||||||
mkV2V : V -> Str -> Str -> V2V ;
|
mkV2V : V -> Str -> Str -> V2V ;
|
||||||
@@ -463,6 +468,13 @@ resource ParadigmsAra = open
|
|||||||
lock_V = <>
|
lock_V = <>
|
||||||
};
|
};
|
||||||
|
|
||||||
|
v7 =
|
||||||
|
\rootStr ->
|
||||||
|
let {
|
||||||
|
fcl = mkRoot3 rootStr ;
|
||||||
|
v7fun = v7geminate ; -- TODO add rest
|
||||||
|
} in lin V (v7fun fcl) ;
|
||||||
|
|
||||||
v8 =
|
v8 =
|
||||||
\rootStr ->
|
\rootStr ->
|
||||||
let {
|
let {
|
||||||
@@ -667,10 +679,10 @@ resource ParadigmsAra = open
|
|||||||
mkVS v = v ** {lock_VS = <>} ;
|
mkVS v = v ** {lock_VS = <>} ;
|
||||||
mkVQ v = v ** {lock_VQ = <>} ;
|
mkVQ v = v ** {lock_VQ = <>} ;
|
||||||
|
|
||||||
regVV : V -> VV = \v -> lin VV v ** {c2 = mkPreposition "أَنْ"} ;
|
regVV : V -> VV = \v -> lin VV v ** {c2 = mkPreposition "أَنْ" ; sc = noPrep} ;
|
||||||
c2VV : V -> Str -> VV = \v,prep -> regVV v ** {c2 = mkPreposition prep} ;
|
c2VV : V -> Str -> VV = \v,prep -> regVV v ** {c2 = mkPreposition prep ; sc = noPrep} ;
|
||||||
prepVV : V -> Preposition -> VV = \v,prep -> regVV v ** {c2=prep} ;
|
prepVV : V -> Preposition -> VV = \v,prep -> regVV v ** {c2=prep; sc=noPrep} ;
|
||||||
|
prep2VV : V -> (_,_ : Preposition) -> VV = \v,p1,p2 -> regVV v ** {c2=p1; sc=p2} ;
|
||||||
V0 : Type = V ;
|
V0 : Type = V ;
|
||||||
---- V2S, V2V, V2Q, V2A : Type = V2 ;
|
---- V2S, V2V, V2Q, V2A : Type = V2 ;
|
||||||
AS, A2S, AV : Type = A ;
|
AS, A2S, AV : Type = A ;
|
||||||
@@ -715,12 +727,12 @@ formV : (root : Str) -> VerbForm -> V = \s,f -> case f of {
|
|||||||
FormIV => v4 s ;
|
FormIV => v4 s ;
|
||||||
FormV => v5 s ;
|
FormV => v5 s ;
|
||||||
FormVI => v6 s ;
|
FormVI => v6 s ;
|
||||||
--- FormVII => v7 s ;
|
FormVII => v7 s ;
|
||||||
FormVIII => v8 s ;
|
FormVIII => v8 s ;
|
||||||
FormX => v10 s
|
FormX => v10 s
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
param VerbForm =
|
param VerbForm =
|
||||||
FormI | FormII | FormIII | FormIV | FormV | FormVI | FormVIII | FormX ;
|
FormI | FormII | FormIII | FormIV | FormV | FormVI | FormVII | FormVIII | FormX ;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ concrete QuestionAra of Question = CatAra ** open ResAra, ParamX, Prelude, VerbA
|
|||||||
IdetCN idet cn = {
|
IdetCN idet cn = {
|
||||||
s = \\isPred,g,s,c
|
s = \\isPred,g,s,c
|
||||||
=> idet.s ! cn.g ! s ! c ++
|
=> idet.s ! cn.g ! s ! c ++
|
||||||
cn.s ! idet.n ! Indef ! Gen ; --idaafa
|
cn2str cn idet.n Indef Gen ; --idaafa
|
||||||
a = { pgn = agrP3 NoHum cn.g idet.n ; isPron = False }
|
a = { pgn = agrP3 NoHum cn.g idet.n ; isPron = False }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -137,14 +137,18 @@ resource ResAra = PatternsAra ** open Prelude, Predef, OrthoAra, ParamX in {
|
|||||||
uttAP : AP -> (Gender => Str) ;
|
uttAP : AP -> (Gender => Str) ;
|
||||||
uttAP ap = \\g => ap.s ! NoHum ! g ! Sg ! Def ! Nom ; ----IL
|
uttAP ap = \\g => ap.s ! NoHum ! g ! Sg ! Def ! Nom ; ----IL
|
||||||
|
|
||||||
CN : Type = Noun ** {adj : NTable ; np : Case => Str};
|
CN : Type = Noun ** {np : Case => Str};
|
||||||
|
|
||||||
useN : Noun -> CN = \n -> n ** {adj = \\_,_,_ => []; np = \\_ => []} ;
|
-- All fields of NP
|
||||||
|
cn2str : CN -> Number -> State -> Case -> Str = \cn,n,s,c ->
|
||||||
|
cn.s ! n ! s ! c ++
|
||||||
|
cn.s2 ! n ! s ! c ++
|
||||||
|
cn.np ! c ;
|
||||||
|
|
||||||
|
useN : Noun -> CN = \n -> n ** {np = \\_ => []} ;
|
||||||
|
|
||||||
uttCN : CN -> (Gender => Str) ;
|
uttCN : CN -> (Gender => Str) ;
|
||||||
uttCN cn = \\_ => cn.s ! Sg ! Indef ! Bare ++
|
uttCN cn = \\_ => cn2str cn Sg Indef Bare ;
|
||||||
cn.s2 ! Sg ! Indef ! Bare ++
|
|
||||||
cn.adj ! Sg ! Indef ! Bare ;
|
|
||||||
|
|
||||||
NumOrdCard : Type = {
|
NumOrdCard : Type = {
|
||||||
s : Gender => State => Case => Str ;
|
s : Gender => State => Case => Str ;
|
||||||
@@ -689,6 +693,33 @@ v6sound : Root3 -> Verb =
|
|||||||
mutafAqam = "م" + utafAqam
|
mutafAqam = "م" + utafAqam
|
||||||
} in verb tafAqam tufUqim atafAqam utafAqam tafAqam mutafAqam;
|
} in verb tafAqam tufUqim atafAqam utafAqam tafAqam mutafAqam;
|
||||||
|
|
||||||
|
-- v7sound : Root3 -> Verb = -- TODO 7s
|
||||||
|
-- \fcl ->
|
||||||
|
-- let {
|
||||||
|
-- _facal = mkStrong facal fcl ;
|
||||||
|
-- _facil = mkStrong facil fcl;
|
||||||
|
-- infacal = "اِنْ" + _facal ; -- VPerf Act
|
||||||
|
-- ; -- VPerf Pas
|
||||||
|
-- anfacil = "َنْ" + _facil ; -- VImpf _ Act
|
||||||
|
-- ; -- VImpf _ Pas
|
||||||
|
-- ; -- VImp
|
||||||
|
-- -- VPPart
|
||||||
|
-- } in
|
||||||
|
-- verb ;
|
||||||
|
|
||||||
|
v7geminate : Root3 -> Verb = -- IL 7g -- very likely wrong
|
||||||
|
\fcl ->
|
||||||
|
let {
|
||||||
|
_nfacc = "نْ" + mkHollow facc fcl ;
|
||||||
|
infacal = "اِنْ" + mkStrong facal fcl ; -- VPerf Act -- TODO use another constructor, this is wrong for 3rd person
|
||||||
|
unfucc = "اُنْ" + mkHollow fucc fcl ; -- VPerf Pas
|
||||||
|
anfacc = "َ" + _nfacc ; -- VImpf _ Act
|
||||||
|
unfacc = "ُ" + _nfacc ; -- VImpf _ Pas
|
||||||
|
infacc = "اِ" + _nfacc ; -- VImp
|
||||||
|
munfacc = "مُ" +_nfacc -- VPPart
|
||||||
|
} in
|
||||||
|
verb infacal unfucc anfacc unfacc infacc munfacc ;
|
||||||
|
|
||||||
v8sound : Root3 -> Verb =
|
v8sound : Root3 -> Verb =
|
||||||
\rbT ->
|
\rbT ->
|
||||||
let {
|
let {
|
||||||
@@ -740,8 +771,8 @@ v8hollow : Root3 -> Verb = -- IL
|
|||||||
v10sound : Root3 -> Verb = ---- IL 10s -- to be checked
|
v10sound : Root3 -> Verb = ---- IL 10s -- to be checked
|
||||||
\qtl ->
|
\qtl ->
|
||||||
let {
|
let {
|
||||||
_staqtal = "َستَ" + mkStrong fcal qtl ;
|
_staqtal = "ستَ" + mkStrong fcal qtl ;
|
||||||
_staqtil = "َستَ" + mkStrong fcil qtl;
|
_staqtil = "ستَ" + mkStrong fcil qtl;
|
||||||
istaqtal = "اِ" + _staqtal ; -- VPerf Act
|
istaqtal = "اِ" + _staqtal ; -- VPerf Act
|
||||||
ustuqtil = "اُسْتُ" + mkStrong fcil qtl; -- VPerf Pas
|
ustuqtil = "اُسْتُ" + mkStrong fcil qtl; -- VPerf Pas
|
||||||
astaqtil = "َ" + _staqtil ; -- VImpf _ Act
|
astaqtil = "َ" + _staqtil ; -- VImpf _ Act
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ concrete StructuralAra of Structural = CatAra **
|
|||||||
in8front_Prep = mkPrep "مُقَابِلَ" ;
|
in8front_Prep = mkPrep "مُقَابِلَ" ;
|
||||||
i_Pron = ResAra.i_Pron ;
|
i_Pron = ResAra.i_Pron ;
|
||||||
in_Prep = mkPrep "فِي" ;
|
in_Prep = mkPrep "فِي" ;
|
||||||
it_Pron = he_Pron ; -- was: it_Pron = mkPron "ِت" "ِت" "ِتس" (Per3 Masc Sg);
|
it_Pron = emptyNP ** {s = \\_ => "هَذَا"} ; -- was: it_Pron = mkPron "ِت" "ِت" "ِتس" (Per3 Masc Sg);
|
||||||
-- less_CAdv = ss "لسّ" ;
|
-- less_CAdv = ss "لسّ" ;
|
||||||
many_Det = mkDet "جَمِيع" Pl Const ;
|
many_Det = mkDet "جَمِيع" Pl Const ;
|
||||||
-- more_CAdv = ss "مْري" ;
|
-- more_CAdv = ss "مْري" ;
|
||||||
|
|||||||
@@ -9,18 +9,18 @@ lin
|
|||||||
FloatPN i = {s = \\c => i.s ; g = Masc ; h = NoHum } ; --IL
|
FloatPN i = {s = \\c => i.s ; g = Masc ; h = NoHum } ; --IL
|
||||||
NumPN i = {s = \\c => uttNum i ! Masc ; g = Masc ; h = NoHum } ; --IL
|
NumPN i = {s = \\c => uttNum i ! Masc ; g = Masc ; h = NoHum } ; --IL
|
||||||
-- CNIntNP cn i = {
|
-- CNIntNP cn i = {
|
||||||
-- s = \\c => cn.s ! Sg ! Def ! c ++ uttNum i ! Masc ;
|
-- s = \\c => cn2str cn Sg Def c ++ uttNum i ! cn.g ;
|
||||||
-- a = dummyAgrP3 Sg ;
|
-- a = dummyAgrP3 Sg ;
|
||||||
-- } ;
|
-- } ;
|
||||||
--IL TODO: check out some opers regarding state in ResAra. These are just dummy values.
|
--IL TODO: check out some opers regarding state in ResAra. These are just dummy values.
|
||||||
CNSymbNP det cn xs =
|
CNSymbNP det cn xs =
|
||||||
let g = cn.g ; n = sizeToNumber det.n in {
|
let g = cn.g ; n = sizeToNumber det.n in {
|
||||||
s = \\c => det.s ! NoHum ! g ! c ++ cn.s ! Sg ! Def ! c ++ cn.adj ! n ! Def ! c ++ xs.s; ----IL word order?? Seems to be nontrivial according to ResAra comments.
|
s = \\c => det.s ! NoHum ! g ! c ++ cn2str cn n Def c ++ xs.s; ----IL word order?? Seems to be nontrivial according to ResAra comments.
|
||||||
a = dummyAgrP3 n ;
|
a = dummyAgrP3 n ;
|
||||||
empty = []
|
empty = []
|
||||||
} ;
|
} ;
|
||||||
CNNumNP cn i = {
|
CNNumNP cn i = {
|
||||||
s = \\c => cn.s ! Sg ! Def ! c ++ uttNum i ! Masc ;
|
s = \\c => cn2str cn Sg Def c ++ uttNum i ! cn.g ;
|
||||||
a = dummyAgrP3 Sg ;
|
a = dummyAgrP3 Sg ;
|
||||||
empty = []
|
empty = []
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in {
|
|||||||
CompAdv a = {s = \\_,_ => a.s ;
|
CompAdv a = {s = \\_,_ => a.s ;
|
||||||
obj = emptyObj ; isNP = False} ;
|
obj = emptyObj ; isNP = False} ;
|
||||||
|
|
||||||
CompCN cn = {s = \\agr,c => cn.s ! agr.n ! Indef ! Nom ++ cn.np ! Nom ++ cn.adj ! agr.n ! Indef ! Nom ;
|
CompCN cn = {s = \\agr,c => cn2str cn agr.n Indef Nom ;
|
||||||
obj = emptyObj ; isNP = False} ;
|
obj = emptyObj ; isNP = False} ;
|
||||||
CompNP np = {s = \\_,_ => [] ; obj = np ** {s = np.s ! Nom} ; isNP = True} ;
|
CompNP np = {s = \\_,_ => [] ; obj = np ** {s = np.s ! Nom} ; isNP = True} ;
|
||||||
--
|
--
|
||||||
|
|||||||
Reference in New Issue
Block a user