mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
(May) Split VP negations into bukan and tidak
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
concrete AdverbMay of Adverb = CatMay ** open ResMay, ParamMay, ParadigmsMay, Prelude in {
|
||||
|
||||
--lin
|
||||
lin
|
||||
|
||||
-- : A -> Adv ;
|
||||
--PositAdvAdj adj = { } ;
|
||||
@@ -11,7 +11,7 @@ concrete AdverbMay of Adverb = CatMay ** open ResMay, ParamMay, ParadigmsMay, Pr
|
||||
-- ComparAdvAdjS : CAdv -> A -> S -> Adv ; -- more warmly than he runs
|
||||
|
||||
-- : Prep -> NP -> Adv ;
|
||||
-- PrepNP =
|
||||
PrepNP = cc2 ;
|
||||
|
||||
-- Adverbs can be modified by 'adadjectives', just like adjectives.
|
||||
|
||||
|
||||
@@ -12,13 +12,11 @@ concrete GrammarMay of Grammar =
|
||||
TextX,
|
||||
StructuralMay,
|
||||
IdiomMay,
|
||||
TenseX - [AAnter, PNeg]
|
||||
TenseX - [AAnter]
|
||||
** open ParamX in {
|
||||
|
||||
flags startcat = Phr ;
|
||||
|
||||
lin
|
||||
AAnter = {s = "sudah" ; a = ParamX.Anter} ;
|
||||
PNeg = {s = "tidak" ; p = ParamX.Neg} ;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -9,16 +9,16 @@ lin
|
||||
-- : RP -> VP -> RCl ;
|
||||
RelVP rp vp = {
|
||||
subj = rp.s ;
|
||||
pred = \\_ => vp.s ! Root ;
|
||||
pred = \\per => vp.s ! Root ;
|
||||
} ;
|
||||
|
||||
-- : RP -> ClSlash -> RCl ; -- who I went with
|
||||
RelSlash rp cls = {
|
||||
subj = rp.s -- yang
|
||||
++ cls.subj ; -- saya
|
||||
pred =
|
||||
\\p => cls.pred ! Root -- ikut sama
|
||||
++ cls.c2.obj ! p -- dengan+nya (depends on the head, not known yet)
|
||||
pred = \\per,pol =>
|
||||
cls.pred ! Root ! pol -- ikut sama
|
||||
++ cls.c2.obj ! per -- dengan+nya (depends on the head, not known yet)
|
||||
} ;
|
||||
|
||||
-- : RP ;
|
||||
|
||||
@@ -153,29 +153,42 @@ oper
|
||||
------------------
|
||||
-- VP
|
||||
|
||||
VerbPhrase : Type = Verb ** {
|
||||
-- vComp : Str-- Maybe needed later?
|
||||
-- {subjunc : Str ; -- inflected verb complement
|
||||
-- inf : Str ; -- infinitive verb complement
|
||||
-- subcl : Str} -- clause complement
|
||||
VerbPhrase : Type = {
|
||||
s : VForm => Polarity => Str ; -- tidak or bukan
|
||||
} ;
|
||||
|
||||
VPSlash : Type = Verb2 ;
|
||||
VPSlash : Type = VerbPhrase ** {
|
||||
c2 : Preposition ;
|
||||
} ;
|
||||
|
||||
useV : Verb -> VerbPhrase = \v -> v ** {
|
||||
vComp = [] ; -- maybe needed later?
|
||||
} ;
|
||||
s = \\vf,pol => verbneg pol ++ v.s ! vf
|
||||
} ;
|
||||
|
||||
useComp : Str -> VerbPhrase = \s -> {
|
||||
s = \\vf,pol => nounneg pol ++ s ;
|
||||
} ;
|
||||
|
||||
verbneg : Polarity -> Str = \pol -> case pol of {
|
||||
Neg => "tidak" ; -- or "tak"?
|
||||
Pos => []
|
||||
} ;
|
||||
|
||||
nounneg : Polarity -> Str = \pol -> case pol of {
|
||||
Neg => "bukan" ;
|
||||
Pos => []
|
||||
} ;
|
||||
--------------------------------------------------------------------------------
|
||||
-- Cl, S
|
||||
|
||||
Clause : Type = {
|
||||
subj : Str ;
|
||||
pred : VForm => Str -- Cl may become relative clause, need to keep open
|
||||
pred : VForm => Polarity => Str -- Cl may become relative clause, need to keep open VForm
|
||||
} ;
|
||||
|
||||
RClause : Type = {
|
||||
subj : Str ;
|
||||
pred : Person => Str
|
||||
pred : Person => Polarity => Str
|
||||
} ;
|
||||
|
||||
RS : Type = {s : Person => Str} ;
|
||||
|
||||
@@ -51,17 +51,17 @@ lin
|
||||
|
||||
-- : Temp -> Pol -> Cl -> S ;
|
||||
UseCl t p cl = {
|
||||
s = cl.subj ++ t.s ++ p.s ++ cl.pred ! Active ;
|
||||
s = cl.subj ++ t.s ++ p.s ++ cl.pred ! Active ! p.p;
|
||||
} ;
|
||||
|
||||
-- : Temp -> Pol -> QCl -> QS ;
|
||||
UseQCl t p cl = {
|
||||
s = cl.subj ++ t.s ++ p.s ++ cl.pred ! Active ;
|
||||
s = cl.subj ++ t.s ++ p.s ++ cl.pred ! Active ! p.p ;
|
||||
} ;
|
||||
|
||||
-- : Temp -> Pol -> RCl -> RS ;
|
||||
UseRCl t p cl = {
|
||||
s = \\per => cl.subj ++ t.s ++ p.s ++ cl.pred ! per ;
|
||||
s = \\per => cl.subj ++ t.s ++ p.s ++ cl.pred ! per ! p.p ;
|
||||
} ;
|
||||
|
||||
-- AdvS : Adv -> S -> S ; -- then I will go home
|
||||
|
||||
@@ -9,17 +9,14 @@ lin
|
||||
UseV = ResMay.useV ;
|
||||
|
||||
-- : V2 -> VP ; -- be loved
|
||||
PassV2 v2 = {
|
||||
s = \\_ => v2.passive
|
||||
-- Root => v2.s ! Root ; -- TODO: passive + verbal complements = ???
|
||||
} ;
|
||||
PassV2 v2 = useV {s = \\_ => v2.passive} ;
|
||||
|
||||
-- : VPSlash -> VP ;
|
||||
-- ReflVP = ResMay.insertRefl ;
|
||||
|
||||
-- : VV -> VP -> VP ;
|
||||
ComplVV vv vp = vp ** {
|
||||
s = \\vf => vv.s ++ vp.s ! Root
|
||||
ComplVV vv vp = vp ** useV {
|
||||
s = \\vf => vv.s ++ vp.s ! Root ! Pos
|
||||
} ;
|
||||
|
||||
-- : VS -> S -> VP ;
|
||||
@@ -40,12 +37,15 @@ lin
|
||||
-- Slash
|
||||
|
||||
-- : V2 -> VPSlash
|
||||
SlashV2a v2 = v2 ;
|
||||
SlashV2a v2 = useV v2 ** {
|
||||
c2 = v2.c2
|
||||
} ;
|
||||
|
||||
-- : V3 -> NP -> VPSlash ; -- give it (to her)
|
||||
Slash2V3 v3 dobj = v3 ** {
|
||||
s = \\vf => v3.s ! vf ++ v3.c2.s ++ dobj.s ;
|
||||
c2 = v3.c3 -- Now the VPSlash is missing only the indirect object
|
||||
Slash2V3 v3 dobj = useV {
|
||||
s = \\vf => v3.s ! vf ++ v3.c2.s ++ dobj.s
|
||||
} ** {
|
||||
c2 = v3.c3 -- Now the VPSlash is missing only the indirect object
|
||||
} ;
|
||||
|
||||
{-
|
||||
@@ -65,7 +65,9 @@ lin
|
||||
SlashV2A v2a ap = ;
|
||||
-}
|
||||
-- : VPSlash -> NP -> VP
|
||||
ComplSlash vps np = {s = \\vf => vps.s ! vf ++ vps.c2.s ++ np.s} ;
|
||||
ComplSlash vps np = vps ** {
|
||||
s = \\vf,pol => vps.s ! vf ! pol ++ vps.c2.s ++ np.s
|
||||
} ;
|
||||
|
||||
-- : VV -> VPSlash -> VPSlash ;
|
||||
SlashVV vv vps = ComplVV vv vps ** {
|
||||
@@ -103,24 +105,18 @@ lin
|
||||
-- Adjectival phrases, noun phrases, and adverbs can be used.
|
||||
|
||||
-- : AP -> Comp ;
|
||||
CompAP ap = ap ;
|
||||
CompAP ap = useV ap ;
|
||||
|
||||
-- : CN -> Comp ;
|
||||
CompCN cn = {
|
||||
s = \\_ => cn.s ! NF Sg Bare ;
|
||||
} ;
|
||||
CompCN cn = useComp (cn.s ! NF Sg Bare) ;
|
||||
|
||||
-- NP -> Comp ;
|
||||
CompNP np = {
|
||||
s = \\_ => np.s ;
|
||||
} ;
|
||||
CompNP np = useComp np.s ;
|
||||
|
||||
-- : Adv -> Comp ;
|
||||
CompAdv adv = {
|
||||
s = \\_ => adv.s ;
|
||||
} ;
|
||||
CompAdv adv = useV {s = \\_ => adv.s} ;
|
||||
|
||||
-- : VP -- Copula alone;
|
||||
--UseCopula = useV copula ;
|
||||
UseCopula = useV copula ;
|
||||
|
||||
}
|
||||
|
||||
15
src/malay/unittest/negation.gftest
Normal file
15
src/malay/unittest/negation.gftest
Normal file
@@ -0,0 +1,15 @@
|
||||
Lang: UseCl (TTAnt TPres ASimul) PNeg (PredVP (DetCN (DetQuant IndefArt NumSg) (UseN cat_N)) (UseComp (CompCN (UseN dog_N))))
|
||||
LangEng: a cat isn't a dog
|
||||
LangMay: kucing bukan anjing
|
||||
|
||||
Lang: UseCl (TTAnt TPres ASimul) PNeg (PredVP (DetCN (DetQuant DefArt NumSg) (UseN cat_N)) (UseV walk_V))
|
||||
LangEng: the cat doesn't walk
|
||||
LangMay: kucing tidak berjalan
|
||||
|
||||
Lang: UseCl (TTAnt TPres ASimul) PNeg (PredVP (DetCN (DetQuant this_Quant NumPl) (UseN cat_N)) (UseComp (CompAP (PositA green_A))))
|
||||
LangEng: these cats aren't green
|
||||
LangMay: kucing-kucing ini tidak hijau
|
||||
|
||||
Lang: UseCl (TTAnt TPres ASimul) PNeg (PredVP (DetCN (DetQuant that_Quant NumPl) (UseN cat_N)) (UseComp (CompAdv (PrepNP in_Prep (DetCN (DetQuant DefArt NumSg) (UseN house_N))))))
|
||||
LangEng: those cats aren't in the house
|
||||
LangMay: kucing-kucing itu tidak di rumah
|
||||
Reference in New Issue
Block a user