mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
(May) WIP: trying out new rules for indirect objects, TODO check
This commit is contained in:
@@ -50,7 +50,7 @@ lin
|
|||||||
|
|
||||||
-- : V3 -> NP -> VPSlash ; -- give (it) to her
|
-- : V3 -> NP -> VPSlash ; -- give (it) to her
|
||||||
Slash3V3 v3 iobj = useV {
|
Slash3V3 v3 iobj = useV {
|
||||||
s = \\vf => v3.s ! vf ++ applyPrep v3.c3 iobj
|
s = \\vf => v3.s ! vf ++ iobj.s ! Bare -- applyPrep v3.c3 iobj -- TODO check if this works for all -- probably not
|
||||||
} ** {
|
} ** {
|
||||||
c2 = v3.c2 -- Now the VPSlash is missing only the direct object
|
c2 = v3.c2 -- Now the VPSlash is missing only the direct object
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
6
src/malay/unittest/complements.gftest
Normal file
6
src/malay/unittest/complements.gftest
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
-- Two ways of saying "he/she gives me a cat"
|
||||||
|
Lang: UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron he_Pron) (ComplSlash (Slash2V3 give_V3 (MassNP (UseN cat_N))) (UsePron i_Pron))))
|
||||||
|
LangMay: dia memberi kucing kepadaku
|
||||||
|
|
||||||
|
Lang: UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron he_Pron) (ComplSlash (Slash3V3 give_V3 (UsePron i_Pron)) (MassNP (UseN cat_N)))))
|
||||||
|
LangMay: dia memberi saya kucing
|
||||||
@@ -11,17 +11,18 @@ Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant IndefArt NumPl) (
|
|||||||
LangMay: kucing-kucingku dengan orang itu
|
LangMay: kucing-kucingku dengan orang itu
|
||||||
|
|
||||||
-- I hit him/her
|
-- I hit him/her
|
||||||
-- the &+ is a magic token, it will render in applications as "memukulnya"
|
-- to get "memukulnya", we need to define it in the entry of hit_V2 at the moment.
|
||||||
|
-- if that should be variable on a more general level, let me know.
|
||||||
Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a hit_V2) (UsePron he_Pron)))
|
Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a hit_V2) (UsePron he_Pron)))
|
||||||
LangMay: saya memukul &+ nya
|
LangMay: saya memukul dia
|
||||||
|
|
||||||
-- I hit that person
|
|
||||||
Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a hit_V2) (DetCN (DetQuant that_Quant NumSg) (UseN person_N))))
|
|
||||||
LangMay: saya memukul orang itu
|
|
||||||
|
|
||||||
-------------
|
-------------
|
||||||
-- Possession
|
-- Possession
|
||||||
|
|
||||||
|
-- that is my cat
|
||||||
|
Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (DetNP (DetQuant that_Quant NumSg)) (UseComp (CompNP (DetCN (DetQuant (PossPron i_Pron) NumSg) (UseN cat_N)))))
|
||||||
|
LangMay: itu kucing saya
|
||||||
|
|
||||||
-- that cat is mine
|
-- that cat is mine
|
||||||
Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant that_Quant NumSg) (UseN cat_N)) (UseComp (CompNP (DetNP (DetQuant (PossPron i_Pron) NumSg)))))
|
Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant that_Quant NumSg) (UseN cat_N)) (UseComp (CompNP (DetNP (DetQuant (PossPron i_Pron) NumSg)))))
|
||||||
LangMay: kucing itu saya
|
LangMay: kucing itu saya
|
||||||
|
|||||||
@@ -38,8 +38,9 @@ Lang: UseCl (TTAnt TPast ASimul) PPos (PredVP (MassNP (ComplN2 father_N2 (UsePro
|
|||||||
LangMay: bapanya memberi buku kepadanya
|
LangMay: bapanya memberi buku kepadanya
|
||||||
|
|
||||||
-- 2. A book that her father gave her
|
-- 2. A book that her father gave her
|
||||||
Lang: DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (ComplN2 father_N2 (UsePron she_Pron))) (Slash2V3 give_V3 (UsePron she_Pron))))))
|
-- TODO: would it be better as "buku yang bapanya beri kepadanya"? (Or any other variation?)
|
||||||
LangMay: buku yang bapanya beri kepadanya
|
Lang: DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (ComplN2 father_N2 (UsePron she_Pron))) (Slash3V3 give_V3 (UsePron she_Pron))))))
|
||||||
|
LangMay: buku yang bapanya beri dia
|
||||||
|
|
||||||
-- The preposition "kepada" comes from the definition of give_V3 in LexiconMay.gf.
|
-- The preposition "kepada" comes from the definition of give_V3 in LexiconMay.gf.
|
||||||
-- If "buku yang bapanya beri kepadanya" is correct in general, but sometimes
|
-- If "buku yang bapanya beri kepadanya" is correct in general, but sometimes
|
||||||
@@ -52,8 +53,9 @@ LangMay: buku yang bapanya beri kepadanya
|
|||||||
-- then we can do it in the resource grammar.
|
-- then we can do it in the resource grammar.
|
||||||
|
|
||||||
-- I want to read the book that my father gave me
|
-- I want to read the book that my father gave me
|
||||||
|
-- TODO check: would "saya mahu baca buku yang bapaku beri kepadaku" be better?
|
||||||
Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashVV want_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (ComplN2 father_N2 (UsePron i_Pron))) (Slash3V3 give_V3 (UsePron i_Pron)))))))))
|
Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashVV want_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (ComplN2 father_N2 (UsePron i_Pron))) (Slash3V3 give_V3 (UsePron i_Pron)))))))))
|
||||||
LangMay: saya mahu baca buku yang bapaku beri kepadaku
|
LangMay: saya mahu baca buku yang bapaku beri saya
|
||||||
|
|
||||||
-- I want to read the book that my father read
|
-- I want to read the book that my father read
|
||||||
Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashVV want_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (ComplN2 father_N2 (UsePron i_Pron))) (SlashV2a read_V2))))))))
|
Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashVV want_VV (SlashV2a read_V2)) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant DefArt NumSg) (ComplN2 father_N2 (UsePron i_Pron))) (SlashV2a read_V2))))))))
|
||||||
|
|||||||
Reference in New Issue
Block a user