forked from GitHub/gf-rgl
Merge branch 'master' of https://github.com/GrammaticalFramework/gf-rgl
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
Code,Directory,Functor,Unlexer,Present,All,Try,Symbolic,Compatibility
|
Code,Directory,Functor,Unlexer,Present,All,Try,Symbolic,Compatibility
|
||||||
Afr,afrikaans,,,,,,n,
|
Afr,afrikaans,,,,,,n,
|
||||||
Amh,amharic,,,,,n,n,
|
Amh,amharic,,,,,n,n,
|
||||||
Ara,arabic,,,,,n,n,
|
Ara,arabic,,,,,,y,
|
||||||
Eus,basque,,,,,,,
|
Eus,basque,,,,,,,
|
||||||
Bul,bulgarian,,,y,,,,
|
Bul,bulgarian,,,y,,,,
|
||||||
Cat,catalan,Romance,,y,,,,y
|
Cat,catalan,Romance,,y,,,,y
|
||||||
|
|||||||
|
@@ -20,10 +20,9 @@ concrete AdjectiveAra of Adjective = CatAra ** open ResAra, Prelude in {
|
|||||||
--
|
--
|
||||||
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
-- $SuperlA$ belongs to determiner syntax in $Noun$.
|
||||||
--
|
--
|
||||||
-- ComplA2 a np = {
|
ComplA2 a np = {
|
||||||
-- s = \\_ => a.s ! AAdj Posit ++ a.c2 ++ np.s ! Acc ;
|
s = \\sp,g,n,st,c => a.s ! APosit g n st c ++ a.c2 ++ np.s ! Gen ;
|
||||||
-- isPre = False
|
} ;
|
||||||
-- } ;
|
|
||||||
--
|
--
|
||||||
-- ReflA2 a = {
|
-- ReflA2 a = {
|
||||||
-- s = \\ag => a.s ! AAdj Posit ++ a.c2 ++ reflPron ! ag ;
|
-- s = \\ag => a.s ! AAdj Posit ++ a.c2 ++ reflPron ! ag ;
|
||||||
|
|||||||
@@ -16,16 +16,18 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in {
|
|||||||
|
|
||||||
-- Sentence
|
-- Sentence
|
||||||
|
|
||||||
Cl = {s : ResAra.Tense => Polarity => Order => Str} ;
|
Cl = ResAra.Cl ; -- {s : ResAra.Tense => Polarity => Order => Str} ;
|
||||||
-- Slash = {s : Tense => Anteriority => Polarity => Order => Str} ** {c2 : Str} ;
|
ClSlash = ResAra.ClSlash ;
|
||||||
Imp = {s : Polarity => Gender => ResAra.Number => Str} ;
|
Imp = {s : Polarity => Gender => ResAra.Number => Str} ;
|
||||||
|
|
||||||
-- Question
|
-- Question
|
||||||
|
|
||||||
QCl = {s : ResAra.Tense => Polarity => QForm => Str} ;
|
QCl = ResAra.QCl ; -- {s : ResAra.Tense => Polarity => QForm => Str} ;
|
||||||
IP = {s : Str ; n : ResAra.Number} ;
|
IP,
|
||||||
|
IDet,
|
||||||
|
IComp = ResAra.IP ; -- {s : Gender => State => Case => Str ; n : ResAra.Number} ;
|
||||||
-- IAdv = {s : Str} ;
|
-- IAdv = {s : Str} ;
|
||||||
IDet = {s : Case => Str ; n : ResAra.Number} ; ---- AR add Case
|
IQuant = {s : State => Case => Str} ;
|
||||||
--
|
--
|
||||||
---- Relative
|
---- Relative
|
||||||
--
|
--
|
||||||
@@ -35,7 +37,7 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in {
|
|||||||
-- Verb
|
-- Verb
|
||||||
|
|
||||||
VP = ResAra.VP ;
|
VP = ResAra.VP ;
|
||||||
VPSlash = ResAra.VP ** {c2 : Str} ;
|
VPSlash = ResAra.VPSlash ; -- VP ** {c2:Str}
|
||||||
Comp = ResAra.Comp ; --{s : AAgr => Case => Str} ;
|
Comp = ResAra.Comp ; --{s : AAgr => Case => Str} ;
|
||||||
-- SC = {s : Str} ;
|
-- SC = {s : Str} ;
|
||||||
--
|
--
|
||||||
@@ -47,18 +49,11 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in {
|
|||||||
|
|
||||||
CN = ResAra.Noun ** {adj : NTable};
|
CN = ResAra.Noun ** {adj : NTable};
|
||||||
NP, Pron = ResAra.NP; --{s : Case => Str ; a : Agr } ;
|
NP, Pron = ResAra.NP; --{s : Case => Str ; a : Agr } ;
|
||||||
Num, Ord, Card = ResAra.NumOrdCard ;
|
Ord,
|
||||||
|
Num,
|
||||||
|
Card = ResAra.NumOrdCard ;
|
||||||
Predet = ResAra.Predet ;
|
Predet = ResAra.Predet ;
|
||||||
|
|
||||||
-- DEPRECATED
|
|
||||||
-- QuantSg, QuantPl =
|
|
||||||
-- {s : Species => Gender => Case => Str;
|
|
||||||
-- n : ResAra.Number;
|
|
||||||
-- d : State;
|
|
||||||
-- isNum : Bool;
|
|
||||||
-- isPron : Bool} ;
|
|
||||||
|
|
||||||
Det = ResAra.Det ;
|
Det = ResAra.Det ;
|
||||||
-- {s : Species => Gender => Case => Str ;
|
-- {s : Species => Gender => Case => Str ;
|
||||||
-- d : State; n : Size; isNum : Bool } ;
|
-- d : State; n : Size; isNum : Bool } ;
|
||||||
|
|||||||
@@ -9,8 +9,6 @@ oper AdvCN : CN -> Adv -> CN = notYet "AdvCN" ;
|
|||||||
oper AdvIAdv : IAdv -> Adv -> IAdv = notYet "AdvIAdv" ;
|
oper AdvIAdv : IAdv -> Adv -> IAdv = notYet "AdvIAdv" ;
|
||||||
oper AdvIP : IP -> Adv -> IP = notYet "AdvIP" ;
|
oper AdvIP : IP -> Adv -> IP = notYet "AdvIP" ;
|
||||||
oper AdvS : Adv -> S -> S = notYet "AdvS" ;
|
oper AdvS : Adv -> S -> S = notYet "AdvS" ;
|
||||||
oper AdvSlash : ClSlash -> Adv -> ClSlash = notYet "AdvSlash" ;
|
|
||||||
oper ApposCN : CN -> NP -> CN = notYet "ApposCN" ;
|
|
||||||
oper BaseAP : AP -> AP -> ListAP = notYet "BaseAP" ;
|
oper BaseAP : AP -> AP -> ListAP = notYet "BaseAP" ;
|
||||||
oper BaseAdv : Adv -> Adv -> ListAdv = notYet "BaseAdv" ;
|
oper BaseAdv : Adv -> Adv -> ListAdv = notYet "BaseAdv" ;
|
||||||
oper BaseNP : NP -> NP -> ListNP = notYet "BaseNP" ;
|
oper BaseNP : NP -> NP -> ListNP = notYet "BaseNP" ;
|
||||||
@@ -19,12 +17,8 @@ oper BaseS : S -> S -> ListS = notYet "BaseS" ;
|
|||||||
oper CAdvAP : CAdv -> AP -> NP -> AP = notYet "CAdvAP" ;
|
oper CAdvAP : CAdv -> AP -> NP -> AP = notYet "CAdvAP" ;
|
||||||
oper CleftAdv : Adv -> S -> Cl = notYet "CleftAdv" ;
|
oper CleftAdv : Adv -> S -> Cl = notYet "CleftAdv" ;
|
||||||
oper CleftNP : NP -> RS -> Cl = notYet "CleftNP" ;
|
oper CleftNP : NP -> RS -> Cl = notYet "CleftNP" ;
|
||||||
oper CompCN : CN -> Comp = notYet "CompCN" ;
|
|
||||||
oper CompIAdv : IAdv -> IComp = notYet "CompIAdv" ;
|
|
||||||
oper CompIP : IP -> IComp = notYet "CompIP" ;
|
|
||||||
oper ComparAdvAdj : CAdv -> A -> NP -> Adv = notYet "ComparAdvAdj" ;
|
oper ComparAdvAdj : CAdv -> A -> NP -> Adv = notYet "ComparAdvAdj" ;
|
||||||
oper ComparAdvAdjS : CAdv -> A -> S -> Adv = notYet "ComparAdvAdjS" ;
|
oper ComparAdvAdjS : CAdv -> A -> S -> Adv = notYet "ComparAdvAdjS" ;
|
||||||
oper ComplA2 : A2 -> NP -> AP = notYet "ComplA2" ;
|
|
||||||
oper ComplN2 : N2 -> NP -> CN = notYet "ComplN2" ;
|
oper ComplN2 : N2 -> NP -> CN = notYet "ComplN2" ;
|
||||||
oper ComplN3 : N3 -> NP -> N2 = notYet "ComplN3" ;
|
oper ComplN3 : N3 -> NP -> N2 = notYet "ComplN3" ;
|
||||||
oper ComplVA : VA -> AP -> VP = notYet "ComplVA" ;
|
oper ComplVA : VA -> AP -> VP = notYet "ComplVA" ;
|
||||||
@@ -54,12 +48,8 @@ oper ImpPl1 : VP -> Utt = notYet "ImpPl1" ;
|
|||||||
oper ImpersCl : VP -> Cl = notYet "ImpersCl" ;
|
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 PassV2 : V2 -> VP = notYet "PassV2" ;
|
|
||||||
oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ;
|
oper PredSCVP : SC -> VP -> Cl = notYet "PredSCVP" ;
|
||||||
oper PrepIP : Prep -> IP -> IAdv = notYet "PrepIP" ;
|
|
||||||
oper ProgrVP : VP -> VP = notYet "ProgrVP" ;
|
oper ProgrVP : VP -> VP = notYet "ProgrVP" ;
|
||||||
oper QuestIComp : IComp -> NP -> QCl = notYet "QuestIComp" ;
|
|
||||||
oper QuestSlash : IP -> ClSlash -> QCl = notYet "QuestSlash" ;
|
|
||||||
oper ReflA2 : A2 -> AP = notYet "ReflA2" ;
|
oper ReflA2 : A2 -> AP = notYet "ReflA2" ;
|
||||||
oper ReflVP : VPSlash -> VP = notYet "ReflVP" ;
|
oper ReflVP : VPSlash -> VP = notYet "ReflVP" ;
|
||||||
oper RelCN : CN -> RS -> CN = notYet "RelCN" ;
|
oper RelCN : CN -> RS -> CN = notYet "RelCN" ;
|
||||||
@@ -70,13 +60,11 @@ oper RelVP : RP -> VP -> RCl = notYet "RelVP" ;
|
|||||||
oper SentAP : AP -> SC -> AP = notYet "SentAP" ;
|
oper SentAP : AP -> SC -> AP = notYet "SentAP" ;
|
||||||
oper SentCN : CN -> SC -> CN = notYet "SentCN" ;
|
oper SentCN : CN -> SC -> CN = notYet "SentCN" ;
|
||||||
oper Slash2V3 : V3 -> NP -> VPSlash = notYet "Slash2V3" ;
|
oper Slash2V3 : V3 -> NP -> VPSlash = notYet "Slash2V3" ;
|
||||||
oper SlashPrep : Cl -> Prep -> ClSlash = notYet "SlashPrep" ;
|
|
||||||
oper SlashV2A : V2A -> AP -> VPSlash = notYet "SlashV2A" ;
|
oper SlashV2A : V2A -> AP -> VPSlash = notYet "SlashV2A" ;
|
||||||
oper SlashV2Q : V2Q -> QS -> VPSlash = notYet "SlashV2Q" ;
|
oper SlashV2Q : V2Q -> QS -> VPSlash = notYet "SlashV2Q" ;
|
||||||
oper SlashV2S : V2S -> S -> VPSlash = notYet "SlashV2S" ;
|
oper SlashV2S : V2S -> S -> VPSlash = notYet "SlashV2S" ;
|
||||||
oper SlashV2V : V2V -> VP -> VPSlash = notYet "SlashV2V" ;
|
oper SlashV2V : V2V -> VP -> VPSlash = notYet "SlashV2V" ;
|
||||||
oper SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash = notYet "SlashV2VNP" ;
|
oper SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash = notYet "SlashV2VNP" ;
|
||||||
oper SlashVP : NP -> VPSlash -> ClSlash = notYet "SlashVP" ;
|
|
||||||
oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ;
|
oper SlashVS : NP -> VS -> SSlash -> ClSlash = notYet "SlashVS" ;
|
||||||
oper SlashVV : VV -> VPSlash -> VPSlash = notYet "SlashVV" ;
|
oper SlashVV : VV -> VPSlash -> VPSlash = notYet "SlashVV" ;
|
||||||
oper SubjS : Subj -> S -> Adv = notYet "SubjS" ;
|
oper SubjS : Subj -> S -> Adv = notYet "SubjS" ;
|
||||||
@@ -86,15 +74,10 @@ oper UseComparA : A -> AP = notYet "UseComparA" ;
|
|||||||
oper UseN2 : N2 -> CN = notYet "UseN2" ;
|
oper UseN2 : N2 -> CN = notYet "UseN2" ;
|
||||||
oper UseRCl : Temp -> Pol -> RCl -> RS = notYet "UseRCl" ;
|
oper UseRCl : Temp -> Pol -> RCl -> RS = notYet "UseRCl" ;
|
||||||
oper UseSlash : Temp -> Pol -> ClSlash -> SSlash = notYet "UseSlash" ;
|
oper UseSlash : Temp -> Pol -> ClSlash -> SSlash = notYet "UseSlash" ;
|
||||||
oper UttAP : AP -> Utt = notYet "UttAP" ;
|
|
||||||
oper UttCN : CN -> Utt = notYet "UttCN" ;
|
|
||||||
oper UttCard : Card -> Utt = notYet "UttCard" ;
|
|
||||||
oper UttImpPl : Pol -> Imp -> Utt = notYet "UttImpPl" ;
|
oper UttImpPl : Pol -> Imp -> Utt = notYet "UttImpPl" ;
|
||||||
oper UttImpPol : Pol -> Imp -> Utt = notYet "UttImpPol" ;
|
oper UttImpPol : Pol -> Imp -> Utt = notYet "UttImpPol" ;
|
||||||
oper UttVP : VP -> Utt = notYet "UttVP" ;
|
oper UttVP : VP -> Utt = notYet "UttVP" ;
|
||||||
oper VocNP : NP -> Voc = notYet "VocNP" ;
|
oper VocNP : NP -> Voc = notYet "VocNP" ;
|
||||||
oper pot3plus : Sub1000 -> Sub1000 -> Sub1000000 = notYet "pot3plus" ;
|
oper pot3plus : Sub1000 -> Sub1000 -> Sub1000000 = notYet "pot3plus" ;
|
||||||
oper which_IQuant : IQuant = notYet "which_IQuant" ;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -11,7 +11,7 @@ concrete PhraseAra of Phrase = CatAra ** open
|
|||||||
UttImpSg pol imp = {s = \\g => imp.s ! pol.p ! g ! ResAra.Sg ++ pol.s} ;
|
UttImpSg pol imp = {s = \\g => imp.s ! pol.p ! g ! ResAra.Sg ++ pol.s} ;
|
||||||
UttImpPl,UttImpPol = \pol,imp -> {s = \\g => imp.s ! pol.p ! g ! ResAra.Pl ++ pol.s} ;
|
UttImpPl,UttImpPol = \pol,imp -> {s = \\g => imp.s ! pol.p ! g ! ResAra.Pl ++ pol.s} ;
|
||||||
|
|
||||||
UttIP ip = {s = \\_ => ip.s} ; ---- AR
|
UttIP ip = {s = \\g => ip.s ! g ! Def ! Nom} ; --IL
|
||||||
UttAP ap = {s = ResAra.uttAP ap} ; --IL
|
UttAP ap = {s = ResAra.uttAP ap} ; --IL
|
||||||
UttCard c = {s = ResAra.uttNum c} ; --IL
|
UttCard c = {s = ResAra.uttNum c} ; --IL
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete QuestionAra of Question = CatAra ** open ResAra, ParamX, Prelude in {
|
concrete QuestionAra of Question = CatAra ** open ResAra, ParamX, Prelude, VerbAra in {
|
||||||
|
|
||||||
flags optimize=all_subs ; coding = utf8 ;
|
flags optimize=all_subs ; coding = utf8 ;
|
||||||
|
|
||||||
@@ -12,13 +12,16 @@ concrete QuestionAra of Question = CatAra ** open ResAra, ParamX, Prelude in {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
-- ComplSlashIP vps ip = {} ;
|
||||||
|
|
||||||
-- AR copied from PredVP
|
-- AR copied from PredVP
|
||||||
QuestVP qp vp =
|
QuestVP qp vp =
|
||||||
{ s =\\t,p,_ =>
|
{ s =\\t,p,_ =>
|
||||||
let {
|
let {
|
||||||
---- o = Verbal ; ---- AR
|
---- o = Verbal ; ---- AR
|
||||||
np = {s = table Case {_ => qp.s} ; a ={pgn = Per3 Masc qp.n ; isPron = False}} ;
|
objgn = pgn2gn vp.obj.a.pgn ;
|
||||||
|
np = {s = qp.s ! objgn.g ! Def ; ----IL just guessing state
|
||||||
|
a ={pgn = Per3 Masc qp.n ; isPron = False}} ;
|
||||||
pgn = np.a.pgn ;
|
pgn = np.a.pgn ;
|
||||||
gn = pgn2gn pgn;
|
gn = pgn2gn pgn;
|
||||||
kataba = vp.s ! pgn ! VPPerf ;
|
kataba = vp.s ! pgn ! VPPerf ;
|
||||||
@@ -60,47 +63,48 @@ concrete QuestionAra of Question = CatAra ** open ResAra, ParamX, Prelude in {
|
|||||||
; ---- };
|
; ---- };
|
||||||
|
|
||||||
|
|
||||||
-- QuestSlash ip slash = {
|
|
||||||
-- s = \\t,a,p =>
|
|
||||||
-- let
|
|
||||||
-- cls = slash.s ! t ! a ! p ;
|
|
||||||
-- who = slash.c2 ++ ip.s ! Acc --- stranding in ExtAra
|
|
||||||
-- in table {
|
|
||||||
-- QDir => who ++ cls ! OQuest ;
|
|
||||||
-- QIndir => who ++ cls ! ODir
|
|
||||||
-- }
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
|
|
||||||
---- AR guessed
|
---- AR guessed
|
||||||
QuestIAdv iadv cl = {s = \\t,p,_ => iadv.s ++ cl.s ! t ! p ! Verbal} ;
|
QuestIAdv iadv cl = {s = \\t,p,_ => iadv.s ++ cl.s ! t ! p ! Verbal} ;
|
||||||
|
|
||||||
-- s = \\t,a,p =>
|
---- IL guessed
|
||||||
-- let
|
QuestIComp icomp np =
|
||||||
-- cls = cl.s ! t ! a ! p ;
|
let vp = kaan (CompNP np) in
|
||||||
-- why = iadv.s
|
QuestVP icomp vp ;
|
||||||
-- in table {
|
|
||||||
-- QDir => why ++ cls ! OQuest ;
|
|
||||||
-- QIndir => why ++ cls ! ODir
|
|
||||||
-- }
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
-- PrepIP p ip = {s = p.s ++ ip.s ! Nom} ;
|
|
||||||
--
|
|
||||||
-- AdvIP ip adv = {
|
|
||||||
-- s = \\c => ip.s ! c ++ adv.s ;
|
|
||||||
-- n = ip.n
|
|
||||||
-- } ;
|
|
||||||
--
|
|
||||||
|
|
||||||
---- AR guesses
|
CompIP ip = ip ;
|
||||||
IdetCN idet cn = {
|
-- old, when IComp = Comp { s = \\{g=g ; n=_},c => ip.s ! g ! Def ! c } ; ----
|
||||||
s = idet.s ! Nom ++ cn.s ! idet.n ! Indef ! Nom ;
|
|
||||||
n = idet.n
|
CompIAdv iadv = mkIP iadv.s ResAra.Sg ;
|
||||||
|
|
||||||
|
-- QCl = {s : R.Tense => Polarity => QForm => Str} ;
|
||||||
|
QuestSlash ip cl = { ----IL just guessing
|
||||||
|
s = \\t,p,qf => case qf of {
|
||||||
|
QDir => cl.s ! t ! p ! Verbal ++ cl.c2 ++ ip.s ! Masc ! Def ! Nom ; --VSO (purely guessing)
|
||||||
|
QIndir => cl.s ! t ! p ! Nominal ++ cl.c2 ++ ip.s ! Masc ! Def ! Nom } --SVO (purely guessing)
|
||||||
} ;
|
} ;
|
||||||
IdetQuant idet num = {
|
|
||||||
s = \\c => idet.s ++ num.s ! Masc ! Indef ! c;
|
PrepIP p ip = {s = p.s ++ ip.s ! Masc ! Def ! Acc} ; ----IL
|
||||||
n = ResAra.Sg ---- size of Num
|
|
||||||
|
AdvIP ip adv = ip ** {
|
||||||
|
s = \\g,s,c => ip.s ! g ! s ! c ++ adv.s ;
|
||||||
|
n = ip.n
|
||||||
|
} ;
|
||||||
|
|
||||||
|
----IL guessed with help of L and Google translate
|
||||||
|
-- : IDet -> IP
|
||||||
|
IdetIP idet = idet ; -- Gender still matters if turned into IComp
|
||||||
|
|
||||||
|
-- : IDet -> CN -> IP
|
||||||
|
IdetCN idet cn = idet ** {
|
||||||
|
s = \\g,s,c => idet.s ! cn.g ! s ! c ++ -- gender is determined by the CN
|
||||||
|
cn.s ! idet.n ! Indef ! Gen ; --idaafa
|
||||||
|
} ;
|
||||||
|
|
||||||
|
-- : IQuant -> Num -> IDet
|
||||||
|
IdetQuant iquant num = {
|
||||||
|
s = \\g,s,c =>
|
||||||
|
let gend = detGender g num.n -- gender flips with some numbers
|
||||||
|
in iquant.s ! s ! c ++ num.s ! gend ! s ! c ;
|
||||||
|
n = sizeToNumber num.n
|
||||||
} ;
|
} ;
|
||||||
--
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
---- implement $Test$, it moreover contains regular lexical
|
---- implement $Test$, it moreover contains regular lexical
|
||||||
---- patterns needed for $Lex$.
|
---- patterns needed for $Lex$.
|
||||||
--
|
--
|
||||||
resource ResAra = PatternsAra ** open Prelude, Predef in {
|
resource ResAra = PatternsAra ** open Prelude, Predef, ParamX in {
|
||||||
|
|
||||||
flags optimize=noexpand ; coding=utf8 ;
|
flags optimize=noexpand ; coding=utf8 ;
|
||||||
|
|
||||||
@@ -114,7 +114,11 @@ resource ResAra = PatternsAra ** open Prelude, Predef 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
|
||||||
|
|
||||||
NumOrdCard : Type = {s : Gender => State => Case => Str ; n : Size };
|
NumOrdCard : Type = {
|
||||||
|
s : Gender => State => Case => Str ;
|
||||||
|
n : Size ;
|
||||||
|
} ;
|
||||||
|
|
||||||
uttNum : NumOrdCard -> (Gender => Str) ;
|
uttNum : NumOrdCard -> (Gender => Str) ;
|
||||||
uttNum n = \\g => n.s ! g ! Def ! Nom ; ----IL
|
uttNum n = \\g => n.s ! g ! Def ! Nom ; ----IL
|
||||||
|
|
||||||
@@ -980,8 +984,8 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
mkIP : Str -> Number -> {s : Str ; n : Number} =
|
mkIP : Str -> Number -> IP =
|
||||||
\s,n -> {s = s ; n = n} ;
|
\s,n -> {s = \\_g,_s,_c => s ; n = n} ;
|
||||||
|
|
||||||
mkOrd : (_,_ : Str) -> NumOrdCard =
|
mkOrd : (_,_ : Str) -> NumOrdCard =
|
||||||
\aysar,yusra ->
|
\aysar,yusra ->
|
||||||
@@ -1028,6 +1032,13 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
|||||||
a : Agr
|
a : Agr
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
IP : Type = {
|
||||||
|
s : Gender -- because of CompIP
|
||||||
|
=> State => Case -- because of PrepIP: e.g. "in which" chooses definite accusative
|
||||||
|
=> Str ;
|
||||||
|
n : Number
|
||||||
|
} ;
|
||||||
|
|
||||||
param VPForm =
|
param VPForm =
|
||||||
VPPerf
|
VPPerf
|
||||||
| VPImpf Mood
|
| VPImpf Mood
|
||||||
@@ -1089,6 +1100,15 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
|||||||
kaan : {s : AAgr => Case => Str} -> VP = \xabar ->
|
kaan : {s : AAgr => Case => Str} -> VP = \xabar ->
|
||||||
insertPred xabar (predV (v1hollow {f = "ك"; c = "و" ; l = "ن"} u) );
|
insertPred xabar (predV (v1hollow {f = "ك"; c = "و" ; l = "ن"} u) );
|
||||||
|
|
||||||
|
-- Slash categories
|
||||||
|
VPSlash : Type = VP ** {c2 : Str} ;
|
||||||
|
ClSlash : Type = Cl ** {c2 : Str} ;
|
||||||
|
|
||||||
|
Cl : Type = {s : Tense => Polarity => Order => Str} ;
|
||||||
|
QCl : Type = {s : Tense => Polarity => QForm => Str} ;
|
||||||
|
|
||||||
|
--TODO: slashRCl : ClSlash -> RP -> RCl ;
|
||||||
|
|
||||||
param
|
param
|
||||||
|
|
||||||
Size = One | Two | ThreeTen | Teen | NonTeen | Hundreds | None ;
|
Size = One | Two | ThreeTen | Teen | NonTeen | Hundreds | None ;
|
||||||
|
|||||||
@@ -71,7 +71,6 @@ concrete SentenceAra of Sentence = CatAra ** open
|
|||||||
np.s ! Nom ++ (vStr t p) ++ vp.obj.s ++ vp.s2 ++ (pred t p)
|
np.s ! Nom ++ (vStr t p) ++ vp.obj.s ++ vp.s2 ++ (pred t p)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
-- PredVP np vp = mkClause (np.s ! Nom) np.a vp ;
|
|
||||||
|
|
||||||
-- PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp ;
|
-- PredSCVP sc vp = mkClause sc.s (agrP3 Sg) vp ;
|
||||||
|
|
||||||
@@ -91,14 +90,16 @@ concrete SentenceAra of Sentence = CatAra ** open
|
|||||||
-- mkClause (np.s ! Nom) np.a
|
-- mkClause (np.s ! Nom) np.a
|
||||||
-- (insertObj (\\a => infVP vv.isAux (predV v2) a) (predVV vv)) **
|
-- (insertObj (\\a => infVP vv.isAux (predV v2) a) (predVV vv)) **
|
||||||
-- {c2 = v2.c2} ;
|
-- {c2 = v2.c2} ;
|
||||||
--
|
|
||||||
-- AdvSlash slash adv = {
|
-- ClSlash
|
||||||
-- s = \\t,a,b,o => slash.s ! t ! a ! b ! o ++ adv.s ;
|
|
||||||
-- c2 = slash.c2
|
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.s} ;
|
|
||||||
--
|
-- SlashVS np vs sslash = TODO
|
||||||
|
|
||||||
|
|
||||||
-- EmbedS s = {s = conjThat ++ s.s} ;
|
-- EmbedS s = {s = conjThat ++ s.s} ;
|
||||||
-- EmbedQS qs = {s = qs.s ! QIndir} ;
|
-- EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||||
-- EmbedVP vp = {s = infVP False vp (agrP3 Sg)} ; --- agr
|
-- EmbedVP vp = {s = infVP False vp (agrP3 Sg)} ; --- agr
|
||||||
|
|||||||
@@ -95,8 +95,16 @@ concrete StructuralAra of Structural = CatAra **
|
|||||||
when_IAdv = ss "مَتَى" ;
|
when_IAdv = ss "مَتَى" ;
|
||||||
-- when_Subj = ss "وهن" ;
|
-- when_Subj = ss "وهن" ;
|
||||||
where_IAdv = ss "أَينَ" ;
|
where_IAdv = ss "أَينَ" ;
|
||||||
-- whichPl_IDet = mkDeterminer Pl ["وهِعه"] ;
|
which_IQuant = {
|
||||||
-- whichSg_IDet = mkDeterminer Sg ["وهِعه"] ;
|
s = \\s,c => case <c,s> of {
|
||||||
|
<Nom,Indef> => "أيٌّ" ;
|
||||||
|
<Nom,_> => "أيُّ" ;
|
||||||
|
<Acc,Indef> => "أيّاً" ;
|
||||||
|
<Acc,_> => "أيَّ" ;
|
||||||
|
<Gen,Indef> => "أيٍّ" ;
|
||||||
|
<Gen,_> => "أيِّ"
|
||||||
|
}
|
||||||
|
} ;
|
||||||
whoSg_IP = mkIP "مَنْ" Sg ;
|
whoSg_IP = mkIP "مَنْ" Sg ;
|
||||||
whoPl_IP = mkIP "مَنْ" Pl ;
|
whoPl_IP = mkIP "مَنْ" Pl ;
|
||||||
-- why_IAdv = ss "وهي" ;
|
-- why_IAdv = ss "وهي" ;
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra in {
|
|||||||
--
|
--
|
||||||
-- ReflV2 v = insertObj (\\a => v.c2 ++ reflPron ! a) (predV v) ;
|
-- ReflV2 v = insertObj (\\a => v.c2 ++ reflPron ! a) (predV v) ;
|
||||||
--
|
--
|
||||||
-- PassV2 v = insertObj (\\_ => v.s ! VPPart) (predAux auxBe) ;
|
PassV2 v = kaan {s = \\_,_ => v.s ! VPPart} ; ---- IL guessed
|
||||||
--
|
--
|
||||||
-- UseVS, UseVQ = \vv -> {s = vv.s ; c2 = [] ; isRefl = vv.isRefl} ; -- no
|
-- UseVS, UseVQ = \vv -> {s = vv.s ; c2 = [] ; isRefl = vv.isRefl} ; -- no
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user