(May) Split VP negations into bukan and tidak

This commit is contained in:
Inari Listenmaa
2020-08-19 18:47:42 +02:00
parent bc0fb02f20
commit 61ffe8e9a4
7 changed files with 66 additions and 44 deletions

View File

@@ -1,6 +1,6 @@
concrete AdverbMay of Adverb = CatMay ** open ResMay, ParamMay, ParadigmsMay, Prelude in { concrete AdverbMay of Adverb = CatMay ** open ResMay, ParamMay, ParadigmsMay, Prelude in {
--lin lin
-- : A -> Adv ; -- : A -> Adv ;
--PositAdvAdj adj = { } ; --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 -- ComparAdvAdjS : CAdv -> A -> S -> Adv ; -- more warmly than he runs
-- : Prep -> NP -> Adv ; -- : Prep -> NP -> Adv ;
-- PrepNP = PrepNP = cc2 ;
-- Adverbs can be modified by 'adadjectives', just like adjectives. -- Adverbs can be modified by 'adadjectives', just like adjectives.

View File

@@ -12,13 +12,11 @@ concrete GrammarMay of Grammar =
TextX, TextX,
StructuralMay, StructuralMay,
IdiomMay, IdiomMay,
TenseX - [AAnter, PNeg] TenseX - [AAnter]
** open ParamX in { ** open ParamX in {
flags startcat = Phr ; flags startcat = Phr ;
lin lin
AAnter = {s = "sudah" ; a = ParamX.Anter} ; AAnter = {s = "sudah" ; a = ParamX.Anter} ;
PNeg = {s = "tidak" ; p = ParamX.Neg} ;
} ; } ;

View File

@@ -9,16 +9,16 @@ lin
-- : RP -> VP -> RCl ; -- : RP -> VP -> RCl ;
RelVP rp vp = { RelVP rp vp = {
subj = rp.s ; subj = rp.s ;
pred = \\_ => vp.s ! Root ; pred = \\per => vp.s ! Root ;
} ; } ;
-- : RP -> ClSlash -> RCl ; -- who I went with -- : RP -> ClSlash -> RCl ; -- who I went with
RelSlash rp cls = { RelSlash rp cls = {
subj = rp.s -- yang subj = rp.s -- yang
++ cls.subj ; -- saya ++ cls.subj ; -- saya
pred = pred = \\per,pol =>
\\p => cls.pred ! Root -- ikut sama cls.pred ! Root ! pol -- ikut sama
++ cls.c2.obj ! p -- dengan+nya (depends on the head, not known yet) ++ cls.c2.obj ! per -- dengan+nya (depends on the head, not known yet)
} ; } ;
-- : RP ; -- : RP ;

View File

@@ -153,29 +153,42 @@ oper
------------------ ------------------
-- VP -- VP
VerbPhrase : Type = Verb ** { VerbPhrase : Type = {
-- vComp : Str-- Maybe needed later? s : VForm => Polarity => Str ; -- tidak or bukan
-- {subjunc : Str ; -- inflected verb complement
-- inf : Str ; -- infinitive verb complement
-- subcl : Str} -- clause complement
} ; } ;
VPSlash : Type = Verb2 ; VPSlash : Type = VerbPhrase ** {
c2 : Preposition ;
} ;
useV : Verb -> VerbPhrase = \v -> v ** { 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 -- Cl, S
Clause : Type = { Clause : Type = {
subj : Str ; 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 = { RClause : Type = {
subj : Str ; subj : Str ;
pred : Person => Str pred : Person => Polarity => Str
} ; } ;
RS : Type = {s : Person => Str} ; RS : Type = {s : Person => Str} ;

View File

@@ -51,17 +51,17 @@ lin
-- : Temp -> Pol -> Cl -> S ; -- : Temp -> Pol -> Cl -> S ;
UseCl t p cl = { 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 ; -- : Temp -> Pol -> QCl -> QS ;
UseQCl t p cl = { 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 ; -- : Temp -> Pol -> RCl -> RS ;
UseRCl t p cl = { 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 -- AdvS : Adv -> S -> S ; -- then I will go home

View File

@@ -9,17 +9,14 @@ lin
UseV = ResMay.useV ; UseV = ResMay.useV ;
-- : V2 -> VP ; -- be loved -- : V2 -> VP ; -- be loved
PassV2 v2 = { PassV2 v2 = useV {s = \\_ => v2.passive} ;
s = \\_ => v2.passive
-- Root => v2.s ! Root ; -- TODO: passive + verbal complements = ???
} ;
-- : VPSlash -> VP ; -- : VPSlash -> VP ;
-- ReflVP = ResMay.insertRefl ; -- ReflVP = ResMay.insertRefl ;
-- : VV -> VP -> VP ; -- : VV -> VP -> VP ;
ComplVV vv vp = vp ** { ComplVV vv vp = vp ** useV {
s = \\vf => vv.s ++ vp.s ! Root s = \\vf => vv.s ++ vp.s ! Root ! Pos
} ; } ;
-- : VS -> S -> VP ; -- : VS -> S -> VP ;
@@ -40,12 +37,15 @@ lin
-- Slash -- Slash
-- : V2 -> VPSlash -- : V2 -> VPSlash
SlashV2a v2 = v2 ; SlashV2a v2 = useV v2 ** {
c2 = v2.c2
} ;
-- : V3 -> NP -> VPSlash ; -- give it (to her) -- : V3 -> NP -> VPSlash ; -- give it (to her)
Slash2V3 v3 dobj = v3 ** { Slash2V3 v3 dobj = useV {
s = \\vf => v3.s ! vf ++ v3.c2.s ++ dobj.s ; s = \\vf => v3.s ! vf ++ v3.c2.s ++ dobj.s
c2 = v3.c3 -- Now the VPSlash is missing only the indirect object } ** {
c2 = v3.c3 -- Now the VPSlash is missing only the indirect object
} ; } ;
{- {-
@@ -65,7 +65,9 @@ lin
SlashV2A v2a ap = ; SlashV2A v2a ap = ;
-} -}
-- : VPSlash -> NP -> VP -- : 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 ; -- : VV -> VPSlash -> VPSlash ;
SlashVV vv vps = ComplVV vv vps ** { SlashVV vv vps = ComplVV vv vps ** {
@@ -103,24 +105,18 @@ lin
-- Adjectival phrases, noun phrases, and adverbs can be used. -- Adjectival phrases, noun phrases, and adverbs can be used.
-- : AP -> Comp ; -- : AP -> Comp ;
CompAP ap = ap ; CompAP ap = useV ap ;
-- : CN -> Comp ; -- : CN -> Comp ;
CompCN cn = { CompCN cn = useComp (cn.s ! NF Sg Bare) ;
s = \\_ => cn.s ! NF Sg Bare ;
} ;
-- NP -> Comp ; -- NP -> Comp ;
CompNP np = { CompNP np = useComp np.s ;
s = \\_ => np.s ;
} ;
-- : Adv -> Comp ; -- : Adv -> Comp ;
CompAdv adv = { CompAdv adv = useV {s = \\_ => adv.s} ;
s = \\_ => adv.s ;
} ;
-- : VP -- Copula alone; -- : VP -- Copula alone;
--UseCopula = useV copula ; UseCopula = useV copula ;
} }

View 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