mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 01:18:57 -06:00
(Ara) Add new funs in ExtendAra + clean up
Remove some old exclusions, which were excluded because the necessary RGL function wasn't yet implemented in the autumn.
This commit is contained in:
@@ -2,26 +2,28 @@
|
|||||||
|
|
||||||
concrete ExtendAra of Extend =
|
concrete ExtendAra of Extend =
|
||||||
CatAra ** ExtendFunctor - [
|
CatAra ** ExtendFunctor - [
|
||||||
GenNP, SlashBareV2S, PredAPVP, GenModNP, ExistsNP,
|
GenNP, ApposNP, ICompAP, DetNPMasc, DetNPFem,
|
||||||
StrandRelSlash, ExistPluralCN, ExistMassCN, ExistCN, EmptyRelSlash, DetNPMasc, DetNPFem,
|
EmptyRelSlash, PredAPVP,
|
||||||
ComplBareVS, ComplDirectVS, ComplDirectVQ,
|
ComplDirectVS, ComplDirectVQ, -- because of Utt
|
||||||
ICompAP,
|
VPS, MkVPS, PredVPS, BaseVPS, ConsVPS, ConjVPS
|
||||||
VPS, MkVPS, PredVPS, BaseVPS, ConsVPS, ConjVPS,
|
|
||||||
ApposNP
|
|
||||||
]
|
]
|
||||||
with (Grammar=GrammarAra)
|
with (Grammar=GrammarAra)
|
||||||
** open
|
** open
|
||||||
|
|
||||||
ParamX,
|
|
||||||
ResAra,
|
ResAra,
|
||||||
Prelude,
|
Prelude,
|
||||||
|
ParadigmsAra,
|
||||||
RelativeAra,
|
RelativeAra,
|
||||||
Coordination
|
Coordination
|
||||||
|
|
||||||
in {
|
in {
|
||||||
|
|
||||||
lin
|
lin
|
||||||
GenNP np = baseQuant ** {s = \\_,_,_,_ => np.s ! Gen ; d = Const} ;
|
-- If the NP is a pronoun, just use PossPron
|
||||||
|
GenNP np = case np.a.isPron of {
|
||||||
|
True => Grammar.PossPron (pgn2pron np.a.pgn) ;
|
||||||
|
False => let g = np.s ! Gen in mkQuant3 g g g Const
|
||||||
|
} ;
|
||||||
|
|
||||||
-- : NP -> NP -> NP
|
-- : NP -> NP -> NP
|
||||||
ApposNP np1 np2 = np2 ** {s = \\c => np1.s ! c ++ np2.s ! c} ;
|
ApposNP np1 np2 = np2 ** {s = \\c => np1.s ! c ++ np2.s ! c} ;
|
||||||
@@ -29,13 +31,25 @@ concrete ExtendAra of Extend =
|
|||||||
-- : AP -> IComp ; -- "how old"
|
-- : AP -> IComp ; -- "how old"
|
||||||
ICompAP ap = {s = \\gn => "كَمْ" ++ ap.s ! NoHum ! gn.g ! gn.n ! Indef ! Acc} ;
|
ICompAP ap = {s = \\gn => "كَمْ" ++ ap.s ! NoHum ! gn.g ! gn.n ! Indef ! Acc} ;
|
||||||
|
|
||||||
|
-- : AP -> VP -> Cl ; -- it is good to walk
|
||||||
|
PredAPVP ap vp =
|
||||||
|
let isGood : Str = "مِنَ" ++ ap.s ! Hum ! Masc ! Sg ! Def ! Gen ;
|
||||||
|
toWalk : Str = "ال" ++ BIND ++ (uttVP VPGer vp ! Masc) ; -- TODO: Masdar into NForm=>Str?
|
||||||
|
goodToWalk_Adv : Adv = lin Adv {s = isGood ++ toWalk} ;
|
||||||
|
in PredVP emptyNP (UseComp (CompAdv goodToWalk_Adv)) ;
|
||||||
|
|
||||||
|
-- : Det -> NP
|
||||||
|
DetNPMasc det = emptyNP ** {s = det.s ! NoHum ! Masc} ;
|
||||||
|
DetNPFem det = emptyNP ** {s = det.s ! NoHum ! Fem} ;
|
||||||
|
|
||||||
|
|
||||||
-- : ClSlash -> RCl -- he lives in
|
-- : ClSlash -> RCl -- he lives in
|
||||||
EmptyRelSlash = RelSlash (IdRP ** {s = \\_ => []}) ;
|
EmptyRelSlash = RelSlash (IdRP ** {s = \\_ => []}) ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
VPS = {s : PerGenNum => Str} ; -- finite VP's with tense and polarity
|
VPS = {s : PerGenNum => Str} ; -- finite VP's with tense and polarity
|
||||||
[VPS] = {s1,s2 : PerGenNum => Str} ;
|
[VPS] = {s1,s2 : PerGenNum => Str} ;
|
||||||
lin
|
lin
|
||||||
-- : Temp -> Pol -> VP -> VPS ; -- hasn't slept
|
-- : Temp -> Pol -> VP -> VPS ; -- hasn't slept
|
||||||
MkVPS t p vp = {
|
MkVPS t p vp = {
|
||||||
s = \\pgn => let vps =
|
s = \\pgn => let vps =
|
||||||
|
|||||||
Reference in New Issue
Block a user