1
0
forked from GitHub/gf-rgl

add functions from BareRGMay to ExtendMay

This commit is contained in:
Meowyam
2022-05-11 14:56:48 +08:00
parent 3e79ab25e1
commit c712efc8eb
6 changed files with 49 additions and 10 deletions

View File

@@ -9,6 +9,16 @@ concrete ExtendMay of Extend = CatMay
, MkVPS , MkVPS
, PredVPS , PredVPS
-- excluded because RGL funs needed for them not implemented yet
, SlashBareV2S
, PredAPVP
, ComplBareVS
,PresPartAP, PastPartAP
,GenModNP, GenNP, GenRP
,CompoundN
,GerundNP
-- VPS2 ; -- have loved (binary version of VPS) -- VPS2 ; -- have loved (binary version of VPS)
@@ -51,6 +61,37 @@ concrete ExtendMay of Extend = CatMay
-- ConsVPI : VPI -> ListVPI -> ListVPI ; -- ConsVPI : VPI -> ListVPI -> ListVPI ;
ConsVPI str listvpi vpi = consSS "," listvpi vpi ; ConsVPI str listvpi vpi = consSS "," listvpi vpi ;
-- ConjVPI : Conj -> [VPI] -> VPI ; -- to sleep and to walk
-- ComplVPIVV : VV -> VPI -> VP ; -- must sleep and walk
ComplVPIVV vv vpi = useV {
s = \\vf => vv.s ++ vpi.s
} ;
-- PresPartAP : VP -> AP ; -- (the man) looking at Mary
PresPartAP vp = {
s = linVP vp
} ;
PastPartAP vp = {
s = linVP vp
} ;
-- GenModNP : Num -> NP -> CN -> NP ; -- this man's car(s)
GenModNP n np cn = variants {};
-- GenNP : NP -> Quant ; -- this man's
GenNP np = variants {};
-- GenRP : Num -> CN -> RP ; -- whose car
GenRP n cn = variants {};
-- CompoundN : N -> N -> N ; -- control system / controls system / control-system
CompoundN n1 n2 = n2 ** {
s = \\nf => n1.s ! NF Sg Bare ++ n2.s ! nf
} ;
-- GerundNP : VP -> NP ; -- publishing the document (by nature definite)
GerundNP vp = emptyNP ** {
s = \\_ => linVP vp
} ;
-- MkVPS2 : Temp -> Pol -> VPSlash -> VPS2 ; -- has loved -- MkVPS2 : Temp -> Pol -> VPSlash -> VPS2 ; -- has loved
-- ConjVPS2 : Conj -> [VPS2] -> VPS2 ; -- has loved and now hates -- ConjVPS2 : Conj -> [VPS2] -> VPS2 ; -- has loved and now hates

View File

@@ -9,7 +9,7 @@ concrete GrammarMay of Grammar =
RelativeMay, RelativeMay,
ConjunctionMay, ConjunctionMay,
PhraseMay, PhraseMay,
TextX - [IAdv], TextX - [AAnter, TFut, TCond, IAdv],
StructuralMay, StructuralMay,
IdiomMay, IdiomMay,
TenseX - [AAnter, TFut, TCond, IAdv] TenseX - [AAnter, TFut, TCond, IAdv]
@@ -17,9 +17,8 @@ concrete GrammarMay of Grammar =
flags startcat = Phr ; flags startcat = Phr ;
lin lin AAnter = {s = "sudah" ; a = ParamX.Anter} ; --# notpresent
AAnter = {s = "sudah" ; a = ParamX.Anter} ; TFut = {s = "akan" ; t = ParamX.Fut} ; --# notpresent
TFut = {s = "akan" ; t = ParamX.Fut} ; TCond = {s = "akan" ; t = ParamX.Cond} ; --# notpresent
TCond = {s = "akan" ; t = ParamX.Cond} ;
} ; } ;

View File

@@ -114,7 +114,6 @@ oper Use2N3 : N3 -> N2 = notYet "Use2N3" ;
oper Use3N3 : N3 -> N2 = notYet "Use3N3" ; oper Use3N3 : N3 -> N2 = notYet "Use3N3" ;
oper UseA2 : A2 -> AP = notYet "UseA2" ; oper UseA2 : A2 -> AP = notYet "UseA2" ;
oper UseComparA : A -> AP = notYet "UseComparA" ; oper UseComparA : A -> AP = notYet "UseComparA" ;
oper UsePN : PN -> NP = notYet "UsePN" ;
oper UseQCl : Temp -> Pol -> QCl -> QS = notYet "UseQCl" ; oper UseQCl : Temp -> Pol -> QCl -> QS = notYet "UseQCl" ;
oper UseSlash : Temp -> Pol -> ClSlash -> SSlash = notYet "UseSlash" ; oper UseSlash : Temp -> Pol -> ClSlash -> SSlash = notYet "UseSlash" ;
oper UttAP : AP -> Utt = notYet "UttAP" ; oper UttAP : AP -> Utt = notYet "UttAP" ;

View File

@@ -19,8 +19,7 @@ concrete NounMay of Noun = CatMay ** open ResMay, Prelude in {
} ; } ;
-- : PN -> NP ; -- : PN -> NP ;
-- UsePN pn = pn ** { UsePN pn = MassNP (UseN pn) ;
-- } ;
-- : Pron -> NP ; -- : Pron -> NP ;
UsePron pron = pron ** { UsePron pron = pron ** {

View File

@@ -9,6 +9,7 @@ oper
-- should always use these constants instead of the constructors -- should always use these constants instead of the constructors
-- defined in $ResSom$. -- defined in $ResSom$.
noPrep : Prep = mkPrep "" ;
--2 Nouns --2 Nouns

View File

@@ -16,7 +16,7 @@ lin
-- : VV -> VP -> VP ; -- : VV -> VP -> VP ;
ComplVV vv vp = vp ** useV { ComplVV vv vp = vp ** useV {
s = \\vf => vv.s ++ vp.s ! Active ! Pos s = \\vf => vv.s ++ linVP vp
} ; } ;
-- : VS -> S -> VP ; -- : VS -> S -> VP ;
@@ -101,7 +101,7 @@ lin
} ; } ;
-- SlashVV vv vp = vp ** useV { -- SlashVV vv vp = vp ** useV {
-- s = \\vf => vv.s ++ vp.s ! Active ! Pos ; -- s = \\vf => vv.s ++ linVP vp ;
-- c2 = vp.c2 ; -- c2 = vp.c2 ;
-- passive = vv.s ++ vp.passive; -- passive = vv.s ++ vp.passive;
-- adjCompl = vp.adjCompl ; -- adjCompl = vp.adjCompl ;