1
0
forked from GitHub/gf-rgl

Merge branch 'master' of github.com:LauretteM/gf-rgl

This commit is contained in:
Laurette Marais
2022-06-14 21:01:29 +02:00
41 changed files with 616 additions and 269 deletions

View File

@@ -27,6 +27,7 @@ Jpn,Japanese,japanese,,,,,,,,y
Kor,Korean,korean,,,n,y,y,y,n,n
Lat,Latin,latin,,,,,y,y,n,y
Lav,Latvian,latvian,,,,,,,y,y
May,Malay,malay,,,y,,,,n,y
Mlt,Maltese,maltese,,,,,,,,y
Mon,Mongolian,mongolian,,,,,,n,,y
Nep,Nepali,nepali,,,,,,n,,y
1 Code Name Directory Functor Unlexer Present All Try Symbolic Compatibility Synopsis
27 Kor Korean korean n y y y n n
28 Lat Latin latin y y n y
29 Lav Latvian latvian y y
30 May Malay malay y n y
31 Mlt Maltese maltese y
32 Mon Mongolian mongolian n y
33 Nep Nepali nepali n y

View File

@@ -1,4 +1,4 @@
abstract AllEstAbs =
Lang,
ExtraEstAbs
Extend
** {} ;

View File

@@ -22,7 +22,7 @@ concrete CatEst of Cat = CommonX ** open HjkEst, ResEst, Prelude in {
QCl = {s : ResEst.Tense => Anteriority => Polarity => Str} ;
IP = ResEst.IPhrase ;
IComp = {s : Agr => Str} ;
IDet = {s : Case => Str ; n : Number ; isNum : Bool} ;
IDet = ResEst.IDeterminer ;
IQuant = {s : Number => Case => Str} ;
-- Relative
@@ -98,8 +98,8 @@ concrete CatEst of Cat = CommonX ** open HjkEst, ResEst, Prelude in {
NP = linNP (NPCase Nom) ;
CN = linCN (NCase Sg Nom) ;
V,VS,VQ = linV ;
V2,VA,V2S,V2Q = linV2 ;
V2,VA,V2S,V2Q,V3 = linV2 ;
IDet = linIDet ;
}

View File

@@ -54,6 +54,9 @@ concrete ExtendEst of Extend =
VPI2 = X.VPI ** {c2 : Compl} ;
[VPI2] = X.ListVPI ** {c2 : Compl} ;
linref
VPS = X.linVPS (agrP3 Sg) ;
lin
MkVPS = X.MkVPS ;
BaseVPS = X.BaseVPS ;
@@ -298,8 +301,12 @@ concrete ExtendEst of Extend =
GerundAdv vp = {s = infVPdefault vp InfDes} ;
-- : VP -> CN -- publishing of the document (can get a determiner)
GerundCN vp = emptyCN ** {s = \\nf => infVPdefault vp InfMine} ;
GerundCN vp = emptyCN ** {
s = \\nf => infVPdefault vp {stem = InfM ; suf = []}
++ ine.s ! nf ;
} where {
ine : N = mkN "ine" "ise" "ist" "isesse" "iste" "isi"
} ;
-- : VP -> NP -- publishing the document (by nature definite)
GerundNP vp = MassNP (GerundCN vp) ;
@@ -345,7 +352,7 @@ concrete ExtendEst of Extend =
-- : VPSlash -> AP ; -- täna leitud
PastPartAP vp = {
s = \\_,_ => vp2adv vp True (VIPass Past) ;
s = \\_,_ => vp2adv <vp : VP> <True : Bool> <PastPart Pass : VForm> ;
infl = Invariable
} ;
@@ -357,7 +364,8 @@ concrete ExtendEst of Extend =
-- : VPSlash -> NP -> AP -- hobisukeldujate poolt leitud (süvaveepomm)
PastPartAgentAP vp np = {
s = \\_,_ => appCompl True Pos by8agent_Prep np ++ vp2adv vp True (VIPass Past) ;
s = \\_,_ => appCompl True Pos by8agent_Prep np
++ vp2adv <vp : VP> <True : Bool> <PastPart Pass : VForm> ;
infl = Invariable
} ;
@@ -385,17 +393,25 @@ concrete ExtendEst of Extend =
-- calling infVP with the "default arguments": NPCase Nom, Pos, agrP3 Sg
infVPdefault : VP -> InfForms -> Str = infVP (NPCase Nom) Pos (agrP3 Sg) ;
vp2adv : R.VP -> Bool -> VIForm -> Str = \vp,sentIsPos,vif ->
let vpforms : {fin,inf : Str} = case vif of {
VIInf if => applyInfFormsVP {stem=if ; suf="a"} vp ; --- this oper shouldn't be used if you want to use an InfForm but just trying to be robust here
_ => mkVPForms vp.v ! vif ! Simul ! Pos ! agrP3 Sg} ;
in vp.s2 ! sentIsPos ! Pos ! agrP3 Sg -- raamatut
++ vp.adv -- paremini
++ vp.p -- ära
++ vpforms.fin -- tunda/tundes/tundmata/...
++ vpforms.inf -- TODO is this necessary???
++ vp.ext ;
vp2adv = overload {
vp2adv : R.VP -> Bool -> VIForm -> Str = \vp,sentIsPos,vif ->
let vpforms : {fin,inf : Str} = case vif of {
VIInf if => applyInfFormsVP {stem=if ; suf="a"} vp ; --- this oper shouldn't be used if you want to use an InfForm but just trying to be robust here
_ => mkVPForms vp.v ! vif ! Simul ! Pos ! agrP3 Sg} ;
in vp.s2 ! sentIsPos ! Pos ! agrP3 Sg -- raamatut
++ vp.adv -- paremini
++ vp.p -- ära
++ vpforms.fin -- tunda/tundes/tundmata/...
++ vpforms.inf -- TODO is this necessary???
++ vp.ext ;
vp2adv : R.VP -> Bool -> VForm -> Str = \vp,sentIsPos,vf ->
vp.s2 ! sentIsPos ! Pos ! agrP3 Sg -- raamatut
++ vp.adv -- paremini
++ vp.p -- ära
++ vp.v.s ! vf -- tuntud
++ vp.ext
} ;
---------------------------------
-- S - W

View File

@@ -46,6 +46,7 @@ concrete ExtraEst of ExtraEstAbs = CatEst **
infVPIF : NPForm -> Polarity -> Agr -> VP -> InfStem -> Str = \sc,pol,agr,vp,if ->
infVPAnt Simul sc pol agr vp {stem=if ; suf="a"} ;
linVPS : Agr -> {s : Agr => Str} -> Str = \agr,vps -> vps.s ! agr ;
lincat
VPS = {

View File

@@ -160,7 +160,7 @@ lin
science_N = mkN "teadus" ;
sea_N = mkN "meri" "mere" "merd" "merre" "merede" "meresid" ;
seek_V2 = mkV2 (mkV "otsima") cpartitive ;
see_V2 = mkV2 (mkV "nägema" "näha") ;
see_V2 = mkV2 (mkV "nägema" "näha") cpartitive ;
sell_V3 = mkV3 (mkV "müüma" "müüa" "müüb" "müüakse" "müüge" "müüs" "müünud" "müüdud") accPrep callative ;
send_V3 = mkV3 (mkV "saatma") accPrep callative ;
sheep_N = mkN "lammas" "lamba" "lammast" ;

View File

@@ -44,53 +44,48 @@ concrete QuestionEst of Question = CatEst ** open ResEst, Prelude in {
postmod = ip.postmod ++ adv.s ;
} ;
-- The computation of $ncase$ is a special case of that in $NounEst.DetCN$,
-- since we don't have possessive suffixes or definiteness.
--- It could still be nice to have a common oper...
-- The computation of $IdetCN$ is a special case of that in $NounEst.DetCN$,
-- because the interrogative doesn't agree.
IdetCN idet cn = let n = idet.n in emptyIP ** {
IdetCN idet cn = emptyIP ** {
s = \\c =>
let
k : Case = npform2case n c ;
icase : Case = Nom ; --case k of { --mis kassiga
-- (Ess|Abess|Comit|Termin) => Gen ;
-- _ => k
-- } ;
ncase : NForm = case <icase,idet.isNum> of {
<Nom, True> => NCase Sg Part ; -- mitkä kolme kytkintä
<_, True> => NCase Sg k ; -- miksi kolmeksi kytkimeksi
_ => NCase n k -- mitkä kytkimet
k : Case = npform2case n c ;
ncase : NForm = case <k,idet.isNum> of {
<Nom, True> => NCase Sg Part ; -- TODO estonian example (Fin was "mitkä kolme kytkintä")
<_, True> => NCase Sg k ; -- TODO estonian example (Fin was "miksi kolmeksi kytkimeksi")
_ => NCase n k -- TODO estonian example (Fin was "mitkä kytkimet")
}
in
idet.s ! icase ++ cn.s ! ncase ;
n = n
} ;
idet.s ! Nom ++ -- mis
idet.post ! k ++ -- kolme
cn.s ! ncase ; -- kassi+ga
n = idet.n ; -- needed for agreement, "mis kolm kassi mängivad"
} where {
n : Number = case idet.isNum of {
True => Sg ;
False => idet.n } ;
} ;
IdetIP idet = let n = idet.n in emptyIP ** {
s = \\c =>
let
k = npform2case n c ;
in
idet.s ! k ;
case idet.isNum of {
True => idet.s ! Nom ++ idet.post ! k ;
False => idet.s ! k ++ idet.post ! k
} ;
n = n
} ;
IdetQuant idet num =
let
n = num.n ;
isn = num.isNum
in {
s = \\k =>
let
ncase = case <k,isn> of {
<Nom, True> => NCase Sg Part ; -- mitkä kolme kytkintä
<_, True> => NCase Sg k ; -- miksi kolmeksi kytkimeksi
_ => NCase n k -- mitkä kytkimet
}
in
idet.s ! n ! k ++ num.s ! Sg ! k ;
n = n ;
isNum = isn
-- The quant and the num may be inflected in different cases:
-- * mis kolme koeraga, mis kolmega
-- * millega
-- * mille 3-ga (this would be the preferable output, but currently outputs "mis 3ga")
IdetQuant idet num = num ** {
s = \\c => idet.s ! num.n ! c ;
post = \\c => num.s ! Sg ! c ;
} ;
AdvIAdv i a = {s = i.s ++ a.s} ;

View File

@@ -806,7 +806,9 @@ oper
isDef : Bool -- True (verb agrees in Pl, Nom is not Part) --I: actually, can we get rid of this?
} ;
IDeterminer : Type = {s : Case => Str ; n : Number ; isNum : Bool} ;
IDeterminer : Type = {s, post : Case => Str ; n : Number ; isNum : Bool} ;
linIDet : IDeterminer -> Str = \idet -> idet.s ! Nom ++ idet.post ! Nom ;
heavyDet : PDet -> Determiner = \d -> d ** {sp = d.s} ;
PDet : Type = {

View File

@@ -48,6 +48,7 @@ concrete StructuralEst of Structural = CatEst **
how8much_IAdv = ss "kui palju" ;
how8many_IDet = {
s = \\c => "kui" ++ (mkN "mitu" "mitme" "mitut" "TODO" "TODO" "TODO").s ! NCase Sg c ;
post = \\c => [] ;
n = Sg ;
isNum = False
} ;

View File

@@ -75,6 +75,10 @@ concrete VerbEst of Verb = CatEst ** open Prelude, ResEst in {
AdvVP vp adv = insertAdv adv.s vp ;
AdvVPSlash vp adv = insertAdv adv.s vp ** vp ;
VPSlashPrep vp prep = vp ** {c2 = prep} ;
AdVVP adv vp = insertAdv adv.s vp ;
ReflVP v = insertObjPre (\\fin,b,agr => appCompl fin b v.c2 (reflPron agr)) v ;

View File

@@ -12,11 +12,11 @@
Lang: PredVP (UsePron i_Pron) (AdvVP (UseV play_V) (PrepNP with_Prep (DetCN (DetQuant this_Quant NumSg) (UseN dog_N))))
LangEng: I play with this dog
LangEst: mina mängin koos selle koera &+ ga
LangEst: mina mängin koos selle koera BIND ga
Lang: PredVP (UsePron we_Pron) (AdvVP (UseV play_V) (PrepNP with_Prep (DetCN (DetQuant this_Quant NumPl) (UseN dog_N))))
LangEng: we play with these dogs
LangEst: meie mängime koos nende koerade &+ ga
LangEst: meie mängime koos nende koerte BIND ga
-- Interrogative versions
@@ -33,37 +33,32 @@ LangEst: mis keelt sina räägid
Lang: QuestIAdv (PrepIP with_Prep (IdetCN (IdetQuant which_IQuant NumSg) (UseN dog_N))) (PredVP (UsePron youSg_Pron) (UseV play_V))
LangEng: with which dog do you play
LangEst: koos mis koera &+ ga sina mängid
LangEst: koos mis koera BIND ga sina mängid
Lang: QuestIAdv (PrepIP with_Prep (IdetCN (IdetQuant which_IQuant NumPl) (UseN dog_N))) (PredVP (UsePron youPl_Pron) (UseV play_V))
LangEng: with which dogs do you play
LangEst: koos mis koerade &+ ga teie mängite
LangEst: koos mis koerte BIND ga teie mängite
-- Adding a number, does it affect the behaviour of
-- a) suffix attachment? b) agreement of interrogative?
Lang: PredVP (UsePron i_Pron) (AdvVP (UseV play_V) (PrepNP with_Prep (DetCN (DetQuant this_Quant (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n3)))))))) (UseN dog_N))))
LangEng: I play with these three dogs
LangEst: mina mängin koos nende kolme koera &+ ga
LangEst: mina mängin koos nende kolme koera BIND ga
Lang: PredVP (UsePron i_Pron) (AdvVP (UseV play_V) (PrepNP with_Prep (DetCN (DetQuant this_Quant (NumCard (NumDigits (IDig D_3)))) (UseN dog_N))))
LangEng: I play with these 3 dogs
LangEst: mina mängin koos nende 3 koera &+ ga
LangEst: mina mängin koos nende 3 koera BIND ga
Lang: QuestIAdv (PrepIP with_Prep (IdetCN (IdetQuant which_IQuant (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n3)))))))) (UseN dog_N))) (PredVP (UsePron youPol_Pron) (UseV play_V))
LangEng: with which three dogs do you play
-- Which one is best?
-- 1) koos mis kolm koeraga teie mängite
-- 2) koos mis kolme koeraga teie mängite
-- 3) koos mille kolme koeraga teie mängite
-- 4) All are ungrammatical (provide more grammatical translation that is still compositional, not paraphrase)
LangEst: koos mis kolme koera BIND ga teie mängite
Lang: QuestIAdv (PrepIP with_Prep (IdetCN (IdetQuant which_IQuant (NumCard (NumDigits (IDig D_3)))) (UseN dog_N))) (PredVP (UsePron youPl_Pron) (UseV play_V))
LangEng: with which 3 dogs do you play
-- Which one is best?
-- 1) koos mis 3 koeraga teie mängite
-- 2) koos mille 3 koeraga teie mängite
-- 3) All are ungrammatical (provide more grammatical translation)
LangEst: koos mis 3 koera BIND ga teie mängite
-- Technically the version below is better, but we'd need to add another param and who wants that :-P
-- LangEst: koos mille 3 koera BIND ga teie mängite
------------------------------------------------------------------------------------------
-- Now we skip the content word, and make the determiner (possibly with number) into NP/IP
@@ -72,75 +67,60 @@ LangEng: with which 3 dogs do you play
-- No number, case attaches to determiner/interrogative
Lang: PredVP (UsePron i_Pron) (AdvVP (UseV play_V) (PrepNP with_Prep (DetNP (DetQuant this_Quant NumPl))))
LangEng: I play with these
LangEst: mina mängin koos nende &+ ga
LangEst: mina mängin koos nende BIND ga
Lang: QuestIAdv (PrepIP with_Prep whoSg_IP) (PredVP (UsePron youSg_Pron) (UseV sing_V))
LangEng: with whom do you sing
LangEst: koos kelle &+ ga sina laulad
LangEst: koos kelle BIND ga sina laulad
Lang: QuestIAdv (PrepIP with_Prep whoPl_IP) (PredVP (UsePron youSg_Pron) (UseV sing_V))
LangEng: with whom do you sing
LangEst: koos kellede &+ ga sina laulad
LangEst: koos kellede BIND ga sina laulad
-- Adding a number to a determiner, does this affect the comitative suffix placement?
-- Context of the sentence is an ellipsis, "I sing with these 3 (singers)"
Lang: PredVP (UsePron i_Pron) (AdvVP (UseV sing_V) (PrepNP with_Prep (DetNP (DetQuant this_Quant (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n3)))))))))))
LangEng: I sing with these three
-- Which one is better?
-- 1) mina laulan koos nende kolmega
-- 2) mina laulan koos nendega kolme
LangEst: mina laulan koos nende kolme BIND ga
-- Orthography should be 3-ga, but this can be easily postprocessed in applications, so I don't bother
Lang: PredVP (UsePron i_Pron) (AdvVP (UseV sing_V) (PrepNP with_Prep (DetNP (DetQuant this_Quant (NumCard (NumDigits (IDig D_3)))))))
LangEng: I sing with these 3
LangEst: mina laulan koos nende 3 &+ ga
-- Which one is better?
-- 1) mina laulan koos nende 3ga
-- 2) mina laulan koos nendega 3
LangEst: mina laulan koos nende 3 BIND ga
-- Adding a number to an interrogative, how does suffix placement + agreement work now?
Lang: QuestIAdv (PrepIP with_Prep (IdetIP (IdetQuant which_IQuant (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n3)))))))))) (PredVP (UsePron youSg_Pron) (UseV sing_V))
LangEng: with which three do you sing
-- Which one is best?
-- 1) koos millede kolmega sina laulad
-- 2) koos mille kolmega sina laulad
-- 3) koos mis kolmega sina laulad
-- 4) koos millega kolme sina laulad
-- 5) koos milledega kolme sina laulad
-- 6) All are ungrammatical (provide more grammatical translation)
LangEst: koos mis kolme BIND ga sina laulad
Lang: QuestIAdv (PrepIP with_Prep (IdetIP (IdetQuant which_IQuant (NumCard (NumDigits (IDig D_3)))))) (PredVP (UsePron youSg_Pron) (UseV sing_V))
LangEng: with which 3 do you sing
-- Which one is best?
-- 1) koos millede 3ga sina laulad
-- 2) koos mille 3ga sina laulad
-- 3) koos mis 3ga sina laulad
-- 4) koos millega 3 sina laulad
-- 5) koos milledega 3 sina laulad
-- 6) All are ungrammatical (provide more grammatical translation)
LangEst: koos mis 3 BIND ga sina laulad
-- Also ok:
-- LangEst: koos mille 3 BIND ga sina laulad
-- Adding premodifiers to the number, does that change anything?
-- Weird sentence, but imagine like, you point to a group of people, "I sing with these at most three",
-- like you are the soloist and want at most 3 backup singers, who are among a group you are pointing at.
-- If there was no ellipsis, the phrase would just be "koos nende kuni kolme lauljatega"?
-- None of the alternatives sounds actually good, so we just use the same strategy as interrogative + number
-- This can be one of the cases where some trees in the RGL don't make sense, and so application grammarians should use other trees that make more sense.
-- Leaving these ungrammatical/nonsensical edge cases here just for documentation, and to catch any unintended side effects of later tweaks to the grammar.
Lang: PredVP (UsePron i_Pron) (AdvVP (UseV sing_V) (PrepNP with_Prep (DetNP (DetQuant this_Quant (NumCard (AdNum at_most_AdN (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n3))))))))))))
LangEng: I sing with these at most three
LangEst: mina laulan koos nende kuni kolme &+ ga
-- Which one is better?
-- 1) mina laulan koos nende kuni kolmega
-- 2) mina laulan koos nendega kuni kolme
LangEst: mina laulan koos nende kuni kolme BIND ga
Lang: QuestIAdv (PrepIP with_Prep (IdetIP (IdetQuant which_IQuant (NumCard (AdNum at_most_AdN (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n3))))))))))) (PredVP (UsePron youSg_Pron) (UseV sing_V))
LangEng: with which at most three do you sing
LangEst: koos millede kuni kolme &+ ga sina laulad
-- Which one is best?
-- 1) koos millede kuni kolmega sina laulad
-- 2) koos mille kuni kolmega sina laulad
-- 3) koos mis kuni kolmega sina laulad
-- 4) koos millega kuni kolme sina laulad
-- 5) koos milledega kuni kolme sina laulad
-- 6) All are ungrammatical (provide more grammatical translation)
LangEst: koos mis kuni kolme BIND ga sina laulad
-- Appendix: if you really want to ask "with which at most three do you sing", you can use these strategies
-- koos kellega (kuni kolmega) sina laulad? -- this one is by far the best
-- koos kellega (kuni kolm) sina laulad? --
-- koos kellega (kuni 3) sina laulad? --
-- koos kellega (kuni 3-ga) sina laulad? --
-- Now I get it, the sentence doesn't have any asking verb, "kellega koos sina laulad" VS "kellega koos sina *tahad* laulda?"
-- If you want the answerer to specify the up-to-three to sing together with, then you have to let specify also whether-or-not the answerer even wants to sing :-)
-- *) kuni kolmega nendest, kellega sina laulaud? -- this is correct but just weird
-- *) kuni kolmega nendest, kellega sina tahad laulda? -- this is correct and understandable

View File

@@ -0,0 +1,52 @@
-- Test cases related to the agreement of interrogative pronouns
-- for tests about interrogative agreement in comitative, see comitative.gftest
-- As object: case of the numberal is determined by the verb's object case
-- For comparison, the Finnish linearisation is
-- LangFin: mitkä kahdeksan opiskelijaa sinä näet
-- Estonian partitive here comes from see_V2
Lang: QuestSlash (IdetCN (IdetQuant which_IQuant (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n8)))))))) (UseN student_N)) (SlashVP (UsePron youSg_Pron) (SlashV2a see_V2))
LangEng: which eight students do you see
LangEst: mis kaheksat tudengit sina näed
-- In Finnish, partitive comes from the number (mitkä kahdeksan opiskelijaa sinä myyt opettajille)
-- In Estonian, we have eight and student both in genitive.
Lang: QuestSlash (IdetCN (IdetQuant which_IQuant (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n8)))))))) (UseN student_N)) (SlashVP (UsePron youSg_Pron) (Slash3V3 sell_V3 (DetCN (DetQuant DefArt NumPl) (UseN teacher_N))))
LangEng: which eight students do you sell to the teachers
LangEst: mis kaheksa tudengi sina müüd õpetajatele
-- Both Finnish and Estonian inflect eight and student, Finnish also inflects which (mistä kahdeksasta opiskelijasta sinä pidät)
Lang: QuestSlash (IdetCN (IdetQuant which_IQuant (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n8)))))))) (UseN student_N)) (SlashVP (UsePron youSg_Pron) (SlashV2a like_V2))
LangEng: which eight students do you like
LangEst: mis kaheksast tudengist sina pead lugu
-- For comparison, this is Finnish partitive coming from the verb: the word "eight" is also inflected
Lang: QuestSlash (IdetCN (IdetQuant which_IQuant (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n8)))))))) (UseN student_N)) (SlashVP (UsePron youSg_Pron) (SlashV2a love_V2))
LangEng: which eight students do you love
LangEst: mis kaheksat tudengit sina armastad
-- LangFin: mitä kahdeksaa opiskelijaa sinä rakastat
-- As subject
-- No numeral in IDet
Lang: QuestVP (IdetCN (IdetQuant which_IQuant NumSg) (UseN horse_N)) (UseV play_V)
LangEng: which horse plays
LangEst: mis hobune mängib
Lang: QuestVP (IdetCN (IdetQuant which_IQuant NumPl) (UseN horse_N)) (UseV play_V)
LangEng: which horses play
LangEst: mis hobused mängivad
-- With numeral
-- Number 1 doesn't behave like numerals
Lang: QuestVP (IdetCN (IdetQuant which_IQuant (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 pot01))))))) (UseN horse_N)) (UseV play_V)
LangEng: which one horse plays
LangEst: mis üks hobune mängib
Lang: QuestVP (IdetCN (IdetQuant which_IQuant (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n8)))))))) (UseN horse_N)) (UseV play_V)
LangEng: which eight horses play
LangEst: mis kaheksa hobust mängivad

View File

@@ -62,7 +62,7 @@ concrete StructuralFin of Structural = CatFin **
less_CAdv = X.mkCAdv "vähemmän" "kuin" ;
many_Det = MorphoFin.mkDet Sg (snoun2nounBind (mkN "moni" "monia")) ;
more_CAdv = X.mkCAdv "enemmän" "kuin" ;
most_Predet = {s = \\n,c => (nForms2N (dSuurin "useinta")).s ! NCase n (npform2case n c)} ;
most_Predet = {s = \\n,c => (nForms2N (dSuurin "usein")).s ! NCase n (npform2case n c)} ;
much_Det = MorphoFin.mkDet Sg (snoun2nounBind (exceptNomN (mkN "paljo") "paljon")) ** {isNum = True} ; --Harmony not relevant, it's just a CommonNoun
must_VV = mkVV (caseV genitive (mkV "täytyä")) ;
no_Utt = ssp "INTERJ" "ei" ;

View File

@@ -4,6 +4,11 @@ concrete AdjectiveMay of Adjective = CatMay ** open ResMay, Prelude in {
lin
-- : AP -> Adv -> AP ; -- warm by nature
AdvAP ap adv = ap ** {
s = ap.s ++ adv.s ;
} ;
-- : A -> AP ;
PositA a = a ** {
compar = [] ;
@@ -39,6 +44,8 @@ concrete AdjectiveMay of Adjective = CatMay ** open ResMay, Prelude in {
-- AdjOrd ord = ord ** {
-- compar = []
-- } ;
-- AdjOrd : Ord -> AP =
AdjOrd ord = ord ;
-- Sentence and question complements defined for all adjectival
-- phrases, although the semantics is only clear for some adjectives.
@@ -56,7 +63,6 @@ concrete AdjectiveMay of Adjective = CatMay ** open ResMay, Prelude in {
-- It can also be postmodified by an adverb, typically a prepositional phrase.
-- : AP -> Adv -> AP ; -- warm by nature
-- AdvAP ap adv = ap ** {} ;
}

View File

@@ -13,6 +13,8 @@ lin
-- : Prep -> NP -> Adv ;
PrepNP prep np = {s = applyPrep prep np} ;
-- PrepNP to_Prep (UsePron youSg_Pron)
-- Adverbs can be modified by 'adadjectives', just like adjectives.
--AdAdv : AdA -> Adv -> Adv ; -- very quickly

View File

@@ -3,6 +3,6 @@
concrete AllMay of AllMayAbs =
LangMay,
ExtendMay
** {
** open ParadigmsMay in {
lin sing_V2 = mkV2 "nyanyi" ;
} ;

View File

@@ -120,4 +120,16 @@ concrete CatMay of Cat = CommonX - [IAdv] ** open ResMay, Prelude in {
N2 = ResMay.Noun2 ;
N3 = ResMay.Noun3 ;
PN = ResMay.PNoun ;
linref
CN = \cn -> cn.s ! NF Sg Bare ++ cn.heavyMod;
ClSlash = \cl -> cl.subj ++ cl.pred ! Root ! Pos ++ cl.c2.s;
RCl = \cl -> cl.subj ++ cl.pred ! P1 ! Pos;
Cl = \cl -> cl.subj ++ cl.pred ! Active ! Pos;
Det = linDet ;
}
-- Determiner : Type = Quant ** {
-- pr : Str ; -- prefix for numbers
-- n : NumType ; -- number as in 5 (noun in singular), Sg or Pl
-- } ;

View File

@@ -1,8 +1,105 @@
--# -path=.:../common:../abstract
concrete ExtendMay of Extend = CatMay
-- ** ExtendFunctor - []
-- with (Grammar=GrammarMay)
** open Prelude, ResMay, NounMay in {
** ExtendFunctor - [
VPS -- finite VP's with tense and polarity
, ListVPS
, VPI
, ListVPI -- infinitive VP's (TODO: with anteriority and polarity)
, MkVPS
, 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] {2} ; -- has loved, hates"
-- VPI2 ; -- to love (binary version of VPI)
-- [VPI2] {2} ; -- to love, to hate
]
with (Grammar=GrammarMay)
** open Prelude, Coordination, ResMay, NounMay in {
lincat
VPS, VPI = SS ;
ListVPS, ListVPI = ListX ;
lin
-- MkVPS : Temp -> Pol -> VP -> VPS ; -- hasn't slept
MkVPS t p vp = {
s = t.s ++ p.s ++ vp.s ! Active ! p.p;
} ;
-- BaseVPS : VPS -> VPS -> ListVPS ;
BaseVPS vps vps2 = twoSS vps vps2 ;
-- ConsVPS : VPS -> ListVPS -> ListVPS ;
ConsVPS str listvps vps = consSS "," listvps vps ;
-- ConjVPS : Conj -> [VPS] -> VPS ; -- has walked and won't sleep
ConjVPS conj listvps = conjunctX conj listvps ;
-- PredVPS : NP -> VPS -> S ; -- she [has walked and won't sleep]
PredVPS np vps = {
s = np.s ! Bare ++ vps.s ;
} ;
-- SQuestVPS : NP -> VPS -> QS ; -- has she walked
-- QuestVPS : IP -> VPS -> QS ; -- who has walked
-- RelVPS : RP -> VPS -> RS ; -- which won't sleep
-- MkVPI : VP -> VPI ; -- to sleep (TODO: Ant and Pol)
MkVPI vp = {s = linVP vp} ;
-- BaseVPI : VPI -> VPI -> ListVPI ;
BaseVPI vpi vpi2 = twoSS vpi vpi2 ;
-- ConsVPI : VPI -> ListVPI -> ListVPI ;
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
-- ConjVPS2 : Conj -> [VPS2] -> VPS2 ; -- has loved and now hates
-- ComplVPS2 : VPS2 -> NP -> VPS ; -- has loved and now hates that person
-- ReflVPS2 : VPS2 -> RNP -> VPS ; -- have loved and now hate myself and my car
-- MkVPI2 : VPSlash -> VPI2 ; -- to love
-- ConjVPI2 : Conj -> [VPI2] -> VPI2 ; -- to love and hate
-- ComplVPI2 : VPI2 -> NP -> VPI ; -- to love and hate that person
} ;

View File

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

View File

@@ -1,7 +1,7 @@
--1 Idiom: Idiomatic Expressions
concrete IdiomMay of Idiom = CatMay ** open Prelude, ResMay, VerbMay, NounMay, StructuralMay in {
concrete IdiomMay of Idiom = CatMay ** open Prelude, ResMay, VerbMay, QuestionMay, NounMay, StructuralMay in {
-- This module defines constructions that are formed in fixed ways,
-- often different even in closely related languages.
@@ -14,10 +14,17 @@ concrete IdiomMay of Idiom = CatMay ** open Prelude, ResMay, VerbMay, NounMay, S
subj = [] ;
pred = \\vf,pol => vp.s ! Root ! pol -- force no prefix -- TODO check if legit?
} ;
{-
-- GenericCl : VP -> Cl ; -- one sleeps
GenericCl = \vp -> predVP impersNP (passVP vp) ;
-- : NP -> Cl ; -- there is a house
ExistNP np = predVP np (useV copula) ;
-- ExistIP : IP -> QCl ; -- which houses are there
ExistIP ip = QuestVP ip (useV copula) ;
-- GenericCl : VP -> Cl ; -- one sleeps
GenericCl = \vp -> predVP emptyNP vp ;
{-
CleftNP : NP -> RS -> Cl ; -- it is I who did it
CleftAdv : Adv -> S -> Cl ; -- it is here she slept

View File

@@ -4,54 +4,54 @@ concrete LexiconMay of Lexicon = CatMay **
----
-- A
-- lin add_V3 = mkV3 "" ;
-- lin airplane_N = mkN "" ;
-- lin add_V3 = mkV3 "tambah" ;
lin airplane_N = mkN "kapal terbang" ;
-- lin alas_Interj = mkInterj "" ;
-- lin already_Adv = mkA "" ;
-- lin animal_N = mkN "동물" ;
-- lin answer_V2S = mkV2S "" ;
-- lin apartment_N = mkN "" ;
-- lin apple_N = mkN "" ;
-- lin art_N = mkN "" ;
-- lin ashes_N = mkN "" ;
-- lin ask_V2Q = mkV2 "" ;
lin already_Adv = mkA "sudah" ;
lin animal_N = mkN "haiwan" ;
-- lin answer_V2S = mkV2S "jawab" ;
lin apartment_N = mkN "pangsapuri" ;
lin apple_N = mkN "epal" ;
lin art_N = mkN "seni" ;
lin ashes_N = mkN "abu" ;
lin ask_V2Q = mkV2 "tanya" ;
----
-- B
-- lin baby_N = mkN "" ;
-- lin back_N = mkN "" ;
lin baby_N = mkN "bayi" Animate ;
lin back_N = mkN "belakang" ;
-- lin bad_A = mkA "" ;
-- lin bank_N = mkN "" ;
lin bank_N = mkN "bank" ;
-- lin bark_N = mkN "" ;
lin beautiful_A = mkA "cantik" ;
-- lin become_VA = mkVA "" ;
-- lin beer_N = mkN "" ;
-- lin become_VA = mkVA "jadi" ;
lin beer_N = mkN "bir" ;
-- lin beg_V2V = mkV2 "" ;
-- lin belly_N = mkN "" ;
-- lin big_A = mkA "" ;
-- lin bike_N = mkN "" ;
-- lin bird_N = mkN "" ;
lin big_A = mkA "besar" ;
lin bike_N = mkN "basikal" ;
lin bird_N = mkN "burung" ;
-- lin bite_V2 = mkV2 "" ;
lin black_A = mkA "hitam" ;
-- lin blood_N = mkN "" ;
lin blood_N = mkN "darah" ;
-- lin blow_V = mkV "" ;
-- lin blue_A = mkA "" ;
-- lin boat_N = mkN "" ;
-- lin bone_N = mkN "" ;
lin blue_A = mkA "biru" ;
lin boat_N = mkN "perahu" ;
lin bone_N = mkN "tulang" ;
-- lin boot_N = mkN "" ;
-- lin boss_N = mkN "" ;
lin book_N = mkN "buku" ;
-- lin boy_N = mkN "" ;
-- lin bread_N = mkN "" ;
lin break_V2 = mkV2 "patahkan" ; -- TODO figure out if -kan needs to be separated
lin bread_N = mkN "roti" ;
lin break_V2 = mkV4 "patah" "kan"; -- TODO figure out if -kan needs to be separated
-- lin breast_N = mkN "" ;
-- lin breathe_V = mkV "" ;
-- lin broad_A = mkA "" ;
-- lin brother_N2 = mkN "" ;
-- lin brother_N2 = mkN "abang" Animate;
-- lin brown_A = mkA "" ;
-- lin burn_V = mkV "" ;
-- lin butter_N = mkN "" ;
lin burn_V = mkV "bakar" ;
lin butter_N = mkN "mentega" ;
lin buy_V2 = mkV2 "beli" ;
----
@@ -68,10 +68,10 @@ lin cat_N = mkN "kucing" ;
-- lin child_N = mkN "" ;
-- lin church_N = mkN "" ;
-- lin city_N = mkN "" ;
-- lin clean_A = mkA "" ;
lin clean_A = mkA "bersih" ;
-- lin clever_A = mkA "" ;
-- lin close_V2 = mkV2 "" ;
-- lin cloud_N = mkN "" ;
lin cloud_N = mkN "awan" ;
-- lin coat_N = mkN "" ;
-- lin cold_A = mkA "" ;
lin come_V = mkV "datang" ;
@@ -80,7 +80,7 @@ lin come_V = mkV "datang" ;
-- lin count_V2 = mkV2 "" ;
-- lin country_N = mkN "" ;
-- lin cousin_N = mkN "" ;
-- lin cow_N = mkN "" ;
lin cow_N = mkN "embu" ;
-- lin cut_V2 = mkV2 "" ;
----
@@ -94,8 +94,10 @@ lin come_V = mkV "datang" ;
-- lin do_V2 = lin V2 egin_V ;
-- lin doctor_N = mkN "" ;
lin dog_N = mkN "anjing" ;
-- lin door_N = mkN "" ;
lin drink_V2 = mkV2 "minum" ;
lin door_N = mkN "pintu" ;
lin drink_V2 = let drink' : V2 = mkV2 "minum" in drink' ** {
s = \\_ => "minum" ;
};
-- lin dry_A = mkA "" ;
-- lin dull_A = mkA "" ;
-- lin dust_N = mkN "" ;
@@ -105,7 +107,9 @@ lin drink_V2 = mkV2 "minum" ;
-- lin ear_N = mkN "" ;
-- lin earth_N = mkN "" ;
lin eat_V2 = mkV2 "makan" ;
lin eat_V2 = let eat' : V2 = mkV2 "makan" in eat' ** {
s = \\_ => "makan" ;
};
-- lin egg_N = mkN "" ;
-- lin empty_A = mkA "" ;
-- lin enemy_N = mkN "" ;
@@ -148,7 +152,7 @@ lin father_N2 = mkN2 "bapa" ;
-- lin garden_N = mkN "" ;
-- lin girl_N = mkN "" ;
lin give_V3 = mkV3 (mkV "beri" Meng) emptyPrep datPrep ;
lin give_V3 = mkV3 (mkV "beri" Meng) emptyPrep datPrep ; -- memberi for living and memberikan for nonliving
-- lin glove_N = mkN "" ;
lin go_V = mkV "pergi" ;
-- lin gold_N = mkN "" ;
@@ -186,7 +190,7 @@ lin house_N = mkN "rumah" ;
-- lin ice_N = mkN "" ;
-- lin industry_N = mkN "" ;
-- lin iron_N = mkN "" ;
-- lin john_PN = mkPN "" ;
lin john_PN = mkPN "Yohanes" ;
-- lin jump_V = mkV "" ;
-- lin kill_V2 = mkV2 "" ;
lin king_N = mkN "raja" ;
@@ -220,7 +224,11 @@ lin long_A = mkA "panjang" ;
-- lin lose_V2 = mkV2 "" ;
-- lin louse_N = mkN "" ;
-- lin love_N = mkN "" ;
lin love_V2 = mkV2 "cinta" ;
-- lin love_V2 = let love' : V2 = mkV2 "cinta" in love' ** {
-- s = \\_ => "mencintai" ;
-- passive = "dicintai" ;
-- } ;
lin love_V2 = mkV4 "cinta" "i";
----
-- M
@@ -255,7 +263,7 @@ lin now_Adv = mkAdv "sekarang" ;
-- lin oil_N = mkN "" ;
lin old_A = mkA "tua" ;
-- lin open_V2 = mkV2 "" ;
lin open_V2 = mkV2 "buka" ;
lin paint_V2A = mkV2 "cat" ;
-- lin paper_N = mkN "" ;
-- lin paris_PN = mkPN "Paris" ;
@@ -296,7 +304,7 @@ lin read_V2 = mkV2 "baca" ;
-- lin round_A = mkA "" ;
-- lin rub_V2 = mkV2 "" ;
-- lin rubber_N = mkN "" ;
-- lin rule_N = mkN "" ;
lin rule_N = mkN "peraturan" ;
-- lin run_V = mkV "" ;
----
@@ -312,7 +320,7 @@ lin science_N = mkN "sains" ;
lin see_V2 = mkV2 "lihat" ;
-- lin seed_N = mkN "" ;
-- lin seek_V2 = mkV2 "" ;
lin sell_V3 = mkV3 (mkV "jual" Meng) emptyPrep emptyPrep ; -- TODO
-- lin sell_V3 = mkV3 (mkV "jual" Meng) emptyPrep emptyPrep ; -- TODO
-- lin send_V3 = mkV3 "" ;
-- lin sew_V = mkV "" ;
-- lin sharp_A = mkA "" ;
@@ -347,7 +355,7 @@ lin song_N = mkN "lagu" ;
-- lin steel_N = mkN "" ;
-- lin stick_N = mkN "" ;
-- lin stone_N = mkN "" ;
-- lin stop_V = mkV "" ;
lin stop_V = mkV "henti" ;
-- lin stove_N = mkN "" ;
-- lin straight_A = mkA "" ;
-- lin student_N = mkN "" ;
@@ -414,7 +422,7 @@ lin woman_N = mkN "perempuan" ;
-- lin wonder_VQ = mkVQ "" ;
-- lin wood_N = mkN "" ;
-- lin worm_N = mkN "" ;
-- lin write_V2 = mkV2 "" ;
lin write_V2 = mkV2 "tulis" ;
-- lin year_N = mkN "" ;
-- lin yellow_A = mkA "" ;
lin young_A = mkA "muda" ;

View File

@@ -9,8 +9,6 @@ oper AdjCN : AP -> CN -> CN = notYet "AdjCN" ;
oper AdjDAP : DAP -> AP -> DAP = notYet "AdjDAP" ;
oper AdjOrd : Ord -> AP = notYet "AdjOrd" ;
oper AdnCAdv : CAdv -> AdN = notYet "AdnCAdv" ;
oper AdvAP : AP -> Adv -> AP = notYet "AdvAP" ;
oper AdvCN : CN -> Adv -> CN = notYet "AdvCN" ;
oper AdvIAdv : IAdv -> Adv -> IAdv = notYet "AdvIAdv" ;
oper AdvIP : IP -> Adv -> IP = notYet "AdvIP" ;
oper AdvNP : NP -> Adv -> NP = notYet "AdvNP" ;
@@ -114,7 +112,6 @@ oper Use2N3 : N3 -> N2 = notYet "Use2N3" ;
oper Use3N3 : N3 -> N2 = notYet "Use3N3" ;
oper UseA2 : A2 -> AP = notYet "UseA2" ;
oper UseComparA : A -> AP = notYet "UseComparA" ;
oper UsePN : PN -> NP = notYet "UsePN" ;
oper UseQCl : Temp -> Pol -> QCl -> QS = notYet "UseQCl" ;
oper UseSlash : Temp -> Pol -> ClSlash -> SSlash = notYet "UseSlash" ;
oper UttAP : AP -> Utt = notYet "UttAP" ;
@@ -192,7 +189,6 @@ oper but_PConj : PConj = notYet "but_PConj" ;
oper butter_N : N = notYet "butter_N" ;
oper camera_N : N = notYet "camera_N" ;
oper can8know_VV : VV = notYet "can8know_VV" ;
oper can_VV : VV = notYet "can_VV" ;
oper cap_N : N = notYet "cap_N" ;
oper carpet_N : N = notYet "carpet_N" ;
oper ceiling_N : N = notYet "ceiling_N" ;
@@ -363,7 +359,6 @@ oper mountain_N : N = notYet "mountain_N" ;
oper mouth_N : N = notYet "mouth_N" ;
oper much_Det : Det = notYet "much_Det" ;
oper music_N : N = notYet "music_N" ;
oper must_VV : VV = notYet "must_VV" ;
oper n_unit_CN : Card -> CN -> CN -> CN = notYet "n_unit_CN" ;
oper n_units_AP : Card -> CN -> A -> AP = notYet "n_units_AP" ;
oper n_units_of_NP : Card -> CN -> NP -> NP = notYet "n_units_of_NP" ;

View File

@@ -19,8 +19,7 @@ concrete NounMay of Noun = CatMay ** open ResMay, Prelude in {
} ;
-- : PN -> NP ;
-- UsePN pn = pn ** {
-- } ;
UsePN pn = MassNP (UseN pn) ;
-- : Pron -> NP ;
UsePron pron = pron ** {
@@ -40,7 +39,9 @@ concrete NounMay of Noun = CatMay ** open ResMay, Prelude in {
-- s = \\c => v2.s ! ??? ++ np.s ! c } ; ----
-- : NP -> Adv -> NP ; -- Paris today ; boys, such as ..
--AdvNP,ExtAdvNP = \np,adv -> np ** {} ;
AdvNP,ExtAdvNP = \np,adv -> np ** {
s = \\pos => np.s ! pos ++ adv.s
} ;
-- : NP -> RS -> NP ; -- Paris, which is here
RelNP np rs = np ** {
@@ -51,7 +52,7 @@ concrete NounMay of Noun = CatMay ** open ResMay, Prelude in {
-- : Det -> NP ;
DetNP det = emptyNP ** {
s = \\_ => det.s ;
s = \\_ => linDet det ;
} ;
-- MassNP : CN -> NP ;
@@ -68,13 +69,17 @@ concrete NounMay of Noun = CatMay ** open ResMay, Prelude in {
DetQuant quant num = quant ** {
pr = num.s ; -- if it's not a number or digit, num.s is empty
s = quant.s ;
n = num.n
n = num.n ;
count = "ke" ++ BIND ++ num.s ++ BIND ++ "-" ++ BIND ++ num.s;
} ;
-- : Quant -> Num -> Ord -> Det ; -- these five best
-- DetQuantOrd quant num ord =
-- let theseFive = DetQuant quant num in theseFive ** {
-- } ;
-- : Quant -> Num -> Ord -> Det ;
DetQuantOrd quant num ord = quant ** {
pr = num.s ;
n = num.n ;
s = ord.s ++ quant.s ;
count = "" ;
} ;
-- Whether the resulting determiner is singular or plural depends on the
-- cardinal.
@@ -107,18 +112,21 @@ concrete NounMay of Noun = CatMay ** open ResMay, Prelude in {
OrdDigits digs = digs ** { s = digs.s ! NOrd } ;
-}
-- : Numeral -> Ord ;
-- OrdNumeral num = num ** {
-- s = \\_ => num.ord
-- } ;
OrdNumeral num = {
s = num.ord
} ;
-- : A -> Ord ;
-- OrdSuperl a = {
-- } ;
OrdSuperl a = {
s = "ter" ++ BIND ++ a.s
} ;
-- One can combine a numeral and a superlative.
-- : Numeral -> A -> Ord ; -- third largest
-- OrdNumeralSuperl num a = num ** { } ;
OrdNumeralSuperl num a = {
s = num.ord ++ "ter" ++ BIND ++ a.s
} ;
-- : Quant
DefArt = mkQuant [] ;
@@ -167,6 +175,11 @@ concrete NounMay of Noun = CatMay ** open ResMay, Prelude in {
heavyMod = cn.heavyMod ++ rs.s ! P3
} ;
-- : CN -> Adv -> CN ;
AdvCN cn adv = cn ** {
heavyMod = cn.heavyMod ++ adv.s
} ;
{-
-- : CN -> Adv -> CN ;
AdvCN cn adv = cn ** { } ;
@@ -199,6 +212,14 @@ concrete NounMay of Noun = CatMay ** open ResMay, Prelude in {
}
} ;
-- : Det -> NP -> NP ;
CountNP det np = np **
{
s = \\pos => det.count ++ np.s ! pos;
} ; -- Nonsense for DefArt or IndefArt
-- : CN -> NP -> CN ; -- glass of wine / two kilos of red apples
-- PartNP cn np = cn ** {
-- } ;

View File

@@ -96,6 +96,7 @@ oper
} ;
-- To make Sub* funs directly from a string.
-- ordnumeral from here
mkNum : Str -> LinNumber = \s -> {
n = Pl ;
s = \\_ => s ; -- Indep vs. Attrib only matters for number 1

View File

@@ -9,6 +9,7 @@ oper
-- should always use these constants instead of the constructors
-- defined in $ResSom$.
noPrep : Prep = mkPrep "" ;
--2 Nouns
@@ -26,7 +27,9 @@ oper
mkA : (adj : Str) -> A ;
} ;
-- mkA2 : Str -> Prep -> A2 ;
mkA2 : overload {
mkA2 : (adj : Str) -> Prep -> A2 ;
} ;
--2 Verbs
@@ -56,8 +59,10 @@ oper
-- = \s -> lin VA (regV s) ;
-- mkVQ : Str -> VQ
-- = \s -> lin VQ (regV s) ;
-- mkVS : Str -> VS
-- = \s -> lin VS (regV s) ;
mkVS : overload {
mkV : (root : Str) -> V ; -- Verb that takes meng as a active prefix
mkV : (root : Str) -> Prefix -> V -- Root and prefix
} ;
--
-- mkV2A : Str -> V2A
-- = \s -> lin V2A (regV s ** {c2 = noPrep}) ;
@@ -93,6 +98,7 @@ oper
mkN = overload {
mkN : Str -> N = \s -> lin N (mkNoun s) ;
mkN : Str -> Animacy -> N = \s,a -> lin N (mkNoun s) ;
} ;
@@ -101,6 +107,12 @@ oper
mkN2 : N -> N2 = \n -> lin N2 (n ** {c2 = dirPrep}) ;
} ;
mkN3 = overload {
mkN3 : Str -> N3 = \s -> lin N3 (mkNoun s ** {c2,c3 = dirPrep}) ;
mkN3 : N -> N3 = \n -> lin N3 (n ** {c2,c3 = dirPrep}) ;
mkN3 : N -> Prep -> Prep -> N3 = \n,c2,c3 -> lin N3 (n ** {c2,c3 = dirPrep}) ;
} ;
mkPN = overload {
mkPN : Str -> PN = \s -> lin PN {s = \\_ => s} ;
} ;
@@ -109,6 +121,11 @@ oper
mkA : (adj : Str) -> A = \s -> lin A (mkAdj s) ;
} ;
mkA2 = overload {
mkA2 : (adj : Str) -> A = \s -> lin A2 (mkAdj s) ;
mkA2 : A -> Prep -> A = \a,p -> lin A2 (a) ;
} ;
mkV = overload {
mkV : Str -> V = \v -> lin V (mkVerb v Ber) ;
mkV : Str -> Prefix -> V = \v,p -> lin V (mkVerb v p)
@@ -133,6 +150,12 @@ oper
lin V3 (mkVerb3 v p q)
} ;
mkV4 = overload {
mkV4 : Str -> Str -> V2 = \v2,str ->
lin V2 (mkVerb4 (mkVerb v2 Meng) dirPrep str) ;
mkV4 : V -> Prep -> Str -> V2 = \v,p,str -> lin V2 (mkVerb4 v p str)
} ;
mkVV = overload {
mkVV : Str -> VV = \vv -> lin VV (ss vv)
} ;

View File

@@ -85,6 +85,8 @@ param
NPAgr = NotPron | IsPron Person ;
Animacy = Animate | Inanimate ;
oper
poss2str : Possession -> Str = \p -> case p of {
Bare => [] ;
@@ -130,12 +132,17 @@ param
param
PrepType = DirObj | EmptyPrep | OtherPrep ;
--------------------------------------------------------------------------------
-- Adverbs
--------------------------------------------------------------------------------
-- Verbs
param
VForm =
Root -- infinitive, imperative, …
| Active
| Imperative
;
Prefix =

View File

@@ -8,16 +8,15 @@ concrete PhraseMay of Phrase = CatMay ** open Prelude, ResMay in {
UttIAdv iadv = iadv ;
UttNP np = {s = np.s ! Bare} ;
UttIP ip = {s = ip.sp ! NF Sg Bare} ;
UttImpSg pol imp = { s = pol.s ++ imp.s ! Sg ! pol.p } ;
UttImpPol pol imp = {s = pol.s ++ imp.s ! Sg ! pol.p} ;
UttVP vp = {s = linVP vp} ;
UttAP ap = { s = ap.s } ;
{-
UttImpSg pol imp =
UttImpPl pol imp =
UttImpPol = UttImpSg ;
UttVP vp = {s = } ;
UttAdv adv = {s = } ;
UttCN n = {s = } ;
UttCard n = {s = } ;
UttAP ap = { s = ap.s ! } ;
UttInterj i = i ;
-}
NoPConj = {s = []} ;

View File

@@ -21,7 +21,8 @@ lin
-- if isPre is True, then: "berapa kucing"
s = case iquant.isPre of { False => iquant.s ; True => [] };
-- if isPre is False, use s: "kucing berapa"
n = num.n
n = num.n ;
count = "" ;
} ;
-- : IP -> ClSlash -> QCl ; -- whom does John love
@@ -59,7 +60,6 @@ lin
} ;
} ;
-- : IP -> IComp ;
CompIP ip = {s = ip.s ! Bare } ; -- who (is it)

View File

@@ -3,33 +3,36 @@ concrete RelativeMay of Relative = CatMay ** open
lin
-- : Cl -> RCl ; -- such that John loves her
-- RelCl cl = ;
-- : Cl -> RCl ; -- such that John loves her
-- RelCl cl = cl ** {
-- subj = cl.subj ;
-- pred = cl.pred ;
-- };
-- : RP -> VP -> RCl ;
RelVP rp vp = {
subj = rp.s ;
pred = \\per => vp.s ! Root ;
pred = \\per,pol => vp.s ! Active ! pol;
} ;
-- : RP -> ClSlash -> RCl ; -- who I went with
RelSlash rp cls = {
subj = rp.s -- yang
++ cls.subj ; -- saya
++ cls.subj ; -- aku
pred = \\per,pol =>
let object : Str = case cls.c2.prepType of {
OtherPrep
=> cls.c2.obj ! per ; -- depends on the head, not known yet
_ => [] -- if the preposition is dir.obj or empty, no obj. pronoun
} ;
in cls.pred ! Root ! pol -- ikut sama
in cls.pred ! Active ! pol -- ikut sama
++ object -- dengan+nya
} ;
-- : RP ;
IdRP = {s = "yang"} ;
-- Mintz page 49: Saya jumpa orang /yang kaki+nya/ patah.
-- Mintz page 49: aku jumpa orang /yang kaki+nya/ patah.
-- 'I met a man /whose foot/ was broken.'
-- : Prep -> NP -> RP -> RP ; -- the mother of whom
-- FunRP prep np rp = {} ;

View File

@@ -60,6 +60,12 @@ oper
empty = []
} ;
mkNounPhrase : Str -> NounPhrase = \str -> {
s = \\_ => str ;
a = NotPron ;
empty = []
} ;
mkIP : Str -> IPhrase = \str -> {
s = \\_ => str ;
a = NotPron ;
@@ -81,9 +87,14 @@ oper
isPre : Bool ;
} ;
linDet : Determiner -> Str = \det -> det.pr ++ det.s ;
-- add field in determiner for kedua-dua numbers
Determiner : Type = Quant ** {
pr : Str ; -- prefix for numbers
n : NumType ; -- number as in 5 (noun in singular), Sg or Pl
count: Str ;
} ;
CardNum : Type = {
@@ -127,16 +138,17 @@ oper
sp = \\_ => str
} ;
mkDet : Str -> Number -> Determiner = \str, num -> mkQuant str ** {
mkDet : Str -> Str -> Number -> Determiner = \cnt, str, num -> mkQuant str ** {
pr = "" ;
n = NoNum num ;
count = "" ;
} ;
mkIdet : Str -> Str -> Number -> Bool -> Determiner = \str, standalone, num, isPre -> mkDet str num ** {
mkIdet : Str -> Str -> Str -> Number -> Bool -> Determiner = \cnt, str, standalone, num, isPre -> mkDet cnt str num ** {
pr = case isPre of {True => str ; False => [] } ;
-- if isPre is True, then: "berapa kucing"
s = case isPre of { False => str ; True => [] };
count = cnt ;
sp = \\_ => standalone ;
} ;
@@ -209,23 +221,35 @@ oper
c3 : Preposition
} ;
Verb4 : Type = Verb ** {
c2 : Preposition ;
passive : Str
} ;
-- VV : Type = Verb ** {vvtype : VVForm} ;
mkVerb : Str -> Prefix -> Verb = \str,p -> {
s = table {
Root => str ;
Active => prefix p str
Active => prefix p str ;
Imperative => str ++ BIND ++ "kan"
}
} ;
mkVerb2 : Verb -> Preposition -> Verb2 = \v,pr -> v ** {
c2 = pr ;
passive = "di" + v.s ! Root -- TODO check
passive = "di" ++ BIND ++ v.s ! Root
} ;
mkVerb3 : Verb -> (p,q : Preposition) -> Verb3 = \v,p,q ->
mkVerb2 v p ** {c3 = q} ;
mkVerb4 : Verb -> Preposition -> Str -> Verb4 = \v,pr,str -> v ** {
s = \\_ => v.s ! Active ++ str;
c2 = pr ;
passive = "di" ++ BIND ++ v.s ! Root ++ str
} ;
copula : Verb = {s = \\_ => "ada"} ; -- TODO
------------------
-- Adv
@@ -259,6 +283,9 @@ oper
s = \\vf,pol => nounneg pol ++ s ;
} ;
linVP : VerbPhrase -> Str = \vp -> vp.s ! Active ! Pos;
-- https://www.reddit.com/r/indonesian/comments/gsizsv/when_to_use_tidak_bukan_jangan_belum/
verbneg : Polarity -> Str = \pol -> case pol of {
Neg => "tidak" ; -- or "tak"?
@@ -269,6 +296,11 @@ oper
Neg => "bukan" ;
Pos => []
} ;
impneg : Polarity -> Str = \pol -> case pol of {
Neg => "jangan" ;
Pos => []
} ;
--------------------------------------------------------------------------------
-- Cl, S

View File

@@ -24,6 +24,19 @@ lin
-- : Cl -> Prep -> ClSlash ; -- (with whom) he walks
SlashPrep cl prep = cl ** {c2 = prep} ;
--2 Imperatives
-- : VP -> Imp ;
ImpVP vp = {
s = \\num,pol => case pol of {
Neg => "jangan" ++ vp.s ! Imperative ! Pos;
Pos => vp.s ! Imperative ! Pos
}
} ;
-- : VP -> SC ;
EmbedVP vp = {s = vp.s ! Root ! Pos} ;
{-
-- : NP -> VS -> SSlash -> ClSlash ; -- (whom) she says that he loves
SlashVS np vs ss = {} ;
@@ -34,7 +47,7 @@ lin
--2 Imperatives
-- : VP -> Imp ;
ImpVP vp = {s = \\num,pol => linVP (VImp num pol) Statement vp} ;
-- ImpVP vp = {s = \\num,pol => linVP (VImp num pol) Statement vp} ;
--2 Embedded sentences

View File

@@ -55,15 +55,14 @@ lin and_Conj = {s2 = "dan" ; s1 = [] ; n = Pl} ;
-----------------
-- *Det and Quant
lin how8many_IDet = mkIdet "berapa" "berapa banyak" Sg True;
lin how8many_IDet = mkIdet "berapa" "berapa banyak" "" Sg True;
lin every_Det = mkDet "semua" "semua" Sg ; -- to check
{-}
lin all_Predet = {s = ""} ;
lin not_Predet = { s = "" } ;
lin only_Predet = { s = "" } ;
lin most_Predet = {s = ""} ;
lin every_Det = {s = ""} ;
lin few_Det = R.indefDet "" pl ;
lin many_Det = R.indefDet "" pl ;
lin much_Det = R.indefDet "" sg ;
@@ -78,6 +77,9 @@ lin which_IQuant = mkQuant "yang mana" ** {isPre = False} ;
-----
-- NP
lin somebody_NP = mkNounPhrase "seorang" ; --todo
{-
lin everybody_NP = defNP "" N.NumPl ;
lin everything_NP = defNP "" N.NumSg ;
@@ -110,7 +112,18 @@ lin in_Prep = mkPrep "di" ;
-- lin part_Prep = mkPrep ;
lin possess_Prep = mkPrep [] ; -- TODO check Mintz p. 39-40, 2.2.1.2
-- lin through_Prep = mkPrep ;
lin to_Prep = mkPrep "ke" ;
-- lin to_Prep = mkPrep "ke" ;
lin to_Prep =
let ke : Preposition = mkPrep "ke";
kepada : Preposition = mkPrep "kepada" ;
in ke ** {
obj = kepada.obj
} ;
-- lin have_V2 = let have' : V2 = mkV2 "ada" in have' ** {
-- s = \\_ => "ada" ;
-- passive = "diadakan" ;
-- } ;
-- lin under_Prep = mkPrep "" ;
lin with_Prep = mkPrep "dengan" ;
-- lin without_Prep = mkPrep "" ;
@@ -120,9 +133,9 @@ lin with_Prep = mkPrep "dengan" ;
-- Pronouns are closed class, no constructor in ParadigmsMay.
lin it_Pron = mkPron "dia" P3 ;
lin i_Pron = mkPron "saya" P1 ;
lin i_Pron = mkPron "aku" P1 ;
lin youPol_Pron = mkPron "kamu" P2 ;
lin youSg_Pron = mkPron "awak" P2 ;
lin youSg_Pron = mkPron "kamu" P2 ;
lin he_Pron = mkPron "dia" P3 ;
lin she_Pron = mkPron "dia" P3 ;
-- inclusive we
@@ -163,8 +176,8 @@ lin have_V2 = let have' : V2 = mkV2 "ada" in have' ** {
passive = "diadakan" ;
} ;
-- lin can8know_VV = can_VV ; -- can (capacity)
-- lin can_VV = mkVV "" ; -- can (possibility)
-- lin must_VV = mkVV "" ;
lin can_VV = mkVV "boleh" ; -- can (possibility)
lin must_VV = mkVV "perlu" ;
lin want_VV = mkVV "mahu" ;
------

View File

@@ -16,7 +16,7 @@ lin
-- : VV -> VP -> VP ;
ComplVV vv vp = vp ** useV {
s = \\vf => vv.s ++ vp.s ! Root ! Pos
s = \\vf => vv.s ++ linVP vp
} ;
-- : VS -> S -> VP ;
@@ -54,12 +54,11 @@ lin
-- : V3 -> NP -> VPSlash ; -- give (it) to her
Slash3V3 v3 iobj = useV {
s = \\vf => v3.s ! vf ++ iobj.s ! Bare ++ applyPrep v3.c3 emptyNP;
s = \\vf => v3.s ! vf ++ applyPrep v3.c3 emptyNP ++ iobj.s ! Bare;
--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
adjCompl = []
} ;
-- insertObjc : (Agr => Str) -> SlashVP -> SlashVP = \obj,vp ->
@@ -101,6 +100,13 @@ lin
adjCompl = vps.adjCompl ;
} ;
-- SlashVV vv vp = vp ** useV {
-- s = \\vf => vv.s ++ linVP vp ;
-- c2 = vp.c2 ;
-- passive = vv.s ++ vp.passive;
-- adjCompl = vp.adjCompl ;
-- } ;
-- : V2V -> NP -> VPSlash -> VPSlash ; -- beg me to buy
-- SlashV2VNP v2v np vps =
@@ -112,6 +118,11 @@ lin
s = \\vf,pol => vp.s ! vf ! pol ++ adv.s
} ;
-- : AdV -> VP -> VP ; -- always sleep
AdVVP adv vp = vp ** {
s = \\vf,pol => vp.s ! vf ! pol ++ adv.s
} ;
{-
-- : VPSlash -> Adv -> VPSlash ; -- use (it) here
AdvVPSlash = insertAdv ;
@@ -119,9 +130,6 @@ lin
-- : VP -> Adv -> VP ; -- sleep , even though ...
ExtAdvVP vp adv = ;
-- : AdV -> VP -> VP ; -- always sleep
AdVVP adv vp = vp ** {adv = adv} ;
-- : AdV -> VPSlash -> VPSlash ; -- always use (it)
AdVVPSlash adv vps = vps ** { adv = adv.s ++ vps.adv } ;
-}

View File

@@ -3,4 +3,4 @@ Lang: UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron he_Pron) (ComplSlas
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
LangMay: dia memberi aku kucing

View File

@@ -8,4 +8,32 @@ LangMay: lima kucing ini
Lang: DetCN (DetQuant (PossPron i_Pron) (NumCard (NumNumeral (num (pot2as3 (pot2 (pot0 n7))))))) (UseN cat_N)
LangEng: my seven hundred cats
LangMay: tujuh ratus kucing saya
LangMay: tujuh ratus kucing aku
Lang: AdjCN (AdjOrd (OrdNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n2))))))) (UseN cat_N)
LangEng: second cat
LangMay: kucing kedua
Lang: DetQuantOrd IndefArt NumPl (OrdNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n2))))))
LangEng: second
LangMay: kedua
Lang: UttNP (DetCN (DetQuantOrd (PossPron i_Pron) NumSg (OrdNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n2))))))) (UseN cat_N))
LangEng: my second cat
LangMay: kucing kedua aku
Lang: UttNP (DetCN (DetQuantOrd (PossPron i_Pron) (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n2))))))) (OrdNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n2))))))) (UseN cat_N))
LangEng: my two second cats
LangMay: dua kucing kedua aku
Lang: CountNP (DetQuant IndefArt (NumCard (NumNumeral (num (pot2as3 (pot1as2 (pot0as1 (pot0 n2)))))))) (DetCN (DetQuant (PossPron i_Pron) NumPl) (UseN cat_N))
LangEng: two of my cats
LangMay: kedua-dua kucing aku
Lang: MassNP (AdjCN (AdjOrd (OrdNumeralSuperl (num (pot2as3 (pot1as2 (pot0as1 (pot0 n3))))) big_A)) (UseN cat_N))
LangEng: third biggest cat
LangMay: kucing ketiga terbesar
Lang: MassNP (AdjCN (AdjOrd (OrdSuperl big_A)) (UseN cat_N))
LangEng: biggest cat
LangMay: kucing terbesar

View File

@@ -1,11 +1,19 @@
Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant that_Quant NumSg) (UseN dog_N)) (PassV2 love_V2))
LangEng: that dog is loved
LangMay: anjing itu dicinta
LangMay: anjing itu dicintai
Lang: UseCl (TTAnt TPres ASimul) PNeg (PredVP (DetCN (DetQuant that_Quant NumSg) (UseN dog_N)) (PassV2 love_V2))
LangEng: that dog isn't loved
LangMay: anjing itu tidak dicinta
LangMay: anjing itu tidak dicintai
Lang: UseCl (TTAnt TPres ASimul) PNeg (PredVP (DetCN (DetQuant that_Quant NumSg) (UseN dog_N)) (ComplVV want_VV (PassV2 love_V2)))
LangEng: that dog doesn't want to be loved
LangMay: anjing itu tidak mahu dicinta
LangMay: anjing itu tidak mahu dicintai
Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant that_Quant NumSg) (UseN book_N)) (PassV2 read_V2))
LangEng: that book is read
LangMay: buku itu dibaca
Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant that_Quant NumSg) (UseN book_N)) (AdvVP (PassV2 read_V2) (PrepNP to_Prep (UsePron youSg_Pron))))
LangEng: that book is read to you
LangMay: buku itu dibacakan kepada kamu

View File

@@ -14,18 +14,18 @@ LangMay: kucing-kucingku dengan orang itu
-- 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)))
LangMay: saya memukul dia
LangMay: aku memukul dia
-------------
-- 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
LangMay: itu kucing aku
-- 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)))))
LangMay: kucing itu saya
LangMay: kucing itu aku
-- his/her cat is green
Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant (PossPron he_Pron) NumSg) (UseN cat_N)) (UseComp (CompAP (PositA green_A))))
@@ -33,14 +33,14 @@ LangMay: kucing dia hijau
-- I read his/her book -- two variants, different trees
Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant IndefArt NumSg) (PossNP (UseN book_N) (UsePron she_Pron)))))
LangMay: saya membaca bukunya
LangMay: aku membaca bukunya
Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant (PossPron he_Pron) NumSg) (UseN book_N))))
LangMay: saya membaca buku dia
LangMay: aku membaca buku dia
-- I read his/her father's book
Lang: UseCl (TTAnt TPast ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (PossNP (UseN book_N) (DetCN (DetQuant DefArt NumSg) (PossNP (UseN2 father_N2) (UsePron she_Pron)))))))
LangMay: saya membaca buku bapanya
LangMay: aku membaca buku bapanya
-- Only the noun phrase
Lang: MassNP (PossNP (UseN book_N) (UsePron he_Pron))
@@ -66,4 +66,4 @@ LangMay: kucingku dia
Lang: DetCN (DetQuant (PossPron i_Pron) NumSg) (PossNP (UseN cat_N) (UsePron she_Pron))
LangEng: my cat of hers
LangMay: kucingnya saya
LangMay: kucingnya aku

View File

@@ -16,11 +16,11 @@ LangMay: berapa banyak kucing
Lang: UseQCl (TTAnt TPres ASimul) PPos (QuestCl (PredVP (UsePron youSg_Pron) (ComplSlash (SlashV2a teach_V2) (DetCN (DetQuant DefArt NumSg) (UseN cat_N)))))
LangEng: do you teach the cat
LangMay: adakah awak mengajar kucing
LangMay: adakah kamu mengajar kucing
Lang: UseQCl (TTAnt TPres ASimul) PNeg (QuestCl (PredVP (UsePron youSg_Pron) (ComplSlash (SlashV2a teach_V2) (DetCN (DetQuant DefArt NumSg) (UseN cat_N)))))
LangEng: don't you teach the cat
LangMay: adakah awak tidak mengajar kucing
LangMay: adakah kamu tidak mengajar kucing
Lang: UseQCl (TTAnt TPres ASimul) PPos (QuestVP (IdetCN (IdetQuant which_IQuant NumSg) (UseN cat_N)) (ComplSlash (SlashV2a teach_V2) (UsePron he_Pron)))
LangEng: which cat teaches him
@@ -28,19 +28,19 @@ LangMay: kucing yang mana mengajar dia
Lang: UseQCl (TTAnt TPast ASimul) PPos (QuestIAdv where_IAdv (PredVP (UsePron youSg_Pron) (UseV go_V)))
LangEng: where did you go
LangMay: awak pergi mana
LangMay: kamu pergi mana
Lang: UseQCl (TTAnt TPast ASimul) PPos (QuestIAdv why_IAdv (PredVP (UsePron youSg_Pron) (UseV go_V)))
LangEng: why did you go
LangMay: mengapa awak pergi
LangMay: mengapa kamu pergi
Lang: UseQCl (TTAnt TPast ASimul) PNeg (QuestIAdv why_IAdv (PredVP (UsePron youSg_Pron) (UseV go_V)))
LangEng: why didn't you go
LangMay: mengapa awak tidak pergi
LangMay: mengapa kamu tidak pergi
Lang: UseQCl (TTAnt TPast ASimul) PPos (QuestSlash (IdetCN (IdetQuant which_IQuant NumSg) (UseN woman_N)) (SlashVP (UsePron youSg_Pron) (SlashV2a see_V2)))
LangEng: which woman did you see
LangMay : awak melihat perempuan yang mana
LangMay : kamu melihat perempuan yang mana
# -- should be to whom did mother give the meat
Lang: UseQCl (TTAnt TPast ASimul) PPos (QuestSlash whoSg_IP (SlashVP (MassNP (UseN2 mother_N2)) (Slash3V3 give_V3 (DetCN (DetQuant DefArt NumSg) (UseN meat_N)))))
@@ -50,7 +50,7 @@ LangMay: ibu memberi daging kepada siapa
# -- should be to whom did mother talk the meat
Lang: UseQCl (TTAnt TPast ASimul) PPos (QuestSlash whoSg_IP (SlashVP (MassNP (UseN2 mother_N2)) (Slash3V3 talk_V3 (DetCN (DetQuant DefArt NumSg) (UseN meat_N)))))
LangEng: whom did mother talk about the meat to
LangMay: ibu bercakap daging dengan siapa
LangMay: ibu bercakap tentang daging dengan siapa
Lang: UseQCl (TTAnt TPres ASimul) PPos (QuestVP whoSg_IP (ComplVV want_VV (UseV go_V)))
LangEng: who wants to go
@@ -62,7 +62,7 @@ LangMay: siapa kucing
Lang: UseQCl (TTAnt TPres ASimul) PPos (QuestIAdv how_IAdv (PredVP (DetCN (DetQuant (PossPron youSg_Pron) NumSg) (UseN2 mother_N2)) (ComplSlash (SlashV2A paint_V2A (PositA black_A)) (DetCN (DetQuant DefArt NumSg) (UseN house_N)))))
LangEng: how does your mother paint the house black
LangMay: bagaimana ibu awak mengecat rumah hitam
LangMay: bagaimana ibu kamu mengecat rumah hitam
Lang: UseQCl (TTAnt TPast ASimul) PPos (QuestIAdv why_IAdv (PredVP (UsePron she_Pron) (ComplSlash (SlashV2a eat_V2) (DetCN (DetQuant DefArt NumSg) (UseN meat_N)))))
LangEng: why did she eat the meat

View File

@@ -3,7 +3,7 @@
Lang: DetCN (DetQuant IndefArt NumSg) (RelCN (UseN cat_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (UseV walk_V))))
LangEng: a cat that walks
LangMay: kucing yang jalan
LangMay: kucing yang berjalan
Lang: DetCN (DetQuant IndefArt NumSg) (RelCN (UseN cat_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a drink_V2) (MassNP (UseN milk_N))))))
LangEng: a cat that drinks milk
@@ -17,7 +17,7 @@ LangMay: susu yang kucing minum
-- We can find another RGL tree that produces the more natural variant. This tree produces this variant.
Lang: DetCN (DetQuant DefArt NumSg) (RelCN (UseN cat_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashPrep (PredVP (DetCN (DetQuant DefArt NumSg) (UseN dog_N)) (UseV walk_V)) with_Prep))))
LangEng: the cat that the dog walks with
LangMay: kucing yang anjing jalan dengannya
LangMay: kucing yang anjing berjalan dengannya
--------------------------------------------------------------
-- Determiner placement
@@ -25,30 +25,31 @@ LangMay: kucing yang anjing jalan dengannya
-- TODO check determiner placement?
Lang: DetCN (DetQuant this_Quant NumSg) (RelCN (UseN cat_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (UseV walk_V))))
LangEng: this cat that walks
LangMay: kucing ini yang jalan
LangMay: kucing ini yang berjalan
Lang: DetCN (DetQuant (PossPron i_Pron) NumSg) (RelCN (UseN cat_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a drink_V2) (MassNP (UseN milk_N))))))
LangEng: my cat that drinks milk
LangMay: kucing saya yang minum susu
LangMay: kucing aku yang minum susu
-- TODO verb form?
Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (DetNP (DetQuant this_Quant NumSg)) (UseComp (CompNP (DetCN (DetQuant DefArt NumSg) (RelCN (UseN cat_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (UseV walk_V))))))))
LangEng: this is the cat that walks
LangMay: ini kucing yang jalan
LangMay: ini kucing yang berjalan
--------------------------------------------------------------
-- Complex example: "the book that his/her father gave him/her"
-- 1. His father gave him a book
-- should be "memberikan buku" as book is dead
Lang: UseCl (TTAnt TPast ASimul) PPos (PredVP (MassNP (ComplN2 father_N2 (UsePron he_Pron))) (ComplSlash (Slash2V3 give_V3 (MassNP (UseN book_N))) (UsePron he_Pron)))
LangMay: bapanya memberi buku kepadanya
-- 2. A book that her father gave her
-- TODO: would it be better as "buku yang bapanya beri kepadanya"? (Or any other variation?)
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
LangMay: buku yang bapanya memberi kepada dia
-- 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
@@ -61,14 +62,14 @@ LangMay: buku yang bapanya beri dia
-- then we can do it in the resource grammar.
-- I want to read the book that my father gave me
-- TODO check: would "saya mahu baca buku yang bapaku beri kepadaku" be better?
-- TODO check: would "aku 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)))))))))
LangMay: saya mahu baca buku yang bapaku beri saya
LangMay: aku mahu membaca buku yang bapaku memberi kepada aku
-- 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))))))))
LangMay: saya mahu baca buku yang bapaku baca
LangMay: aku mahu membaca buku yang bapaku membaca
-- bonus tree: we can also generate "bapa saya", not just "bapaku"
-- bonus tree: we can also generate "bapa aku", not just "bapaku"
Lang: UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplVV want_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant DefArt NumSg) (RelCN (UseN book_N) (UseRCl (TTAnt TPast ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant (PossPron i_Pron) NumSg) (UseN2 father_N2)) (SlashV2a read_V2)))))))))
LangMay: saya mahu baca buku yang bapa saya baca
LangMay: aku mahu membaca buku yang bapa aku membaca

View File

@@ -18,8 +18,11 @@ LangMay: kucing akan berjalan
Lang: ExtAdvS (SubjS if_Subj (UseCl (TTAnt TPast ASimul) PPos (PredVP (UsePron i_Pron) (UseV walk_V)))) (UseCl (TTAnt TCond ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumSg) (UseN cat_N)) (UseV walk_V)))
LangEng: if I walked , the cat would walk
LangMay: sekiranya saya berjalan , kucing akan berjalan
LangMay: sekiranya aku berjalan , kucing akan berjalan
Lang: ExtAdvS (SubjS when_Subj (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (UseV walk_V)))) (UseCl (TTAnt TFut ASimul) PPos (PredVP (DetCN (DetQuant DefArt NumSg) (UseN cat_N)) (UseV walk_V)))
LangEng: when I walk , the cat will walk
LangMay: kalau saya berjalan , kucing akan berjalan
LangMay: kalau aku berjalan , kucing akan berjalan
---

View File

@@ -9,42 +9,41 @@
Lang: UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant (PossPron i_Pron) NumSg) (UseN cat_N)) (UseV walk_V)))
LangEng: my cat walks
LangMay: kucing saya berjalan
LangMay: kucing aku berjalan
-- As a verbal complement
Lang: UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant (PossPron i_Pron) NumSg) (UseN cat_N)) (ComplVV want_VV (UseV walk_V))))
LangEng: my cat wants to walk
LangMay: kucing saya mahu jalan
LangMay: kucing aku mahu berjalan
-- Transitive verbs
Lang: UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant this_Quant NumSg) (UseN book_N)))))
LangEng: I read this book
LangMay: saya membaca buku ini
LangMay: aku membaca buku ini
-- As a verbal complement
Lang: UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplVV want_VV (ComplSlash (SlashV2a read_V2) (DetCN (DetQuant this_Quant NumSg) (UseN book_N))))))
LangEng: I want to read this book
LangMay: saya mahu baca buku ini
LangMay: aku mahu membaca buku ini
-- How about words like mengajar and belajar? Is the prefix more important here?
Lang: UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (AdvVP (ComplSlash (SlashV2a learn_V2) (MassNP (UseN science_N))) (PrepNP in_Prep (DetCN (DetQuant DefArt NumSg) (UseN school_N))))))
LangEng: I learn science in the school
LangMay: saya belajar sains di sekolah
LangMay: aku belajar sains di sekolah
Lang: UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (AdvVP (ComplSlash (SlashV2a teach_V2) (MassNP (UseN science_N))) (PrepNP in_Prep (DetCN (DetQuant DefArt NumSg) (UseN school_N))))))
LangEng: I teach science in the school
LangMay: saya mengajar sains di sekolah
LangMay: aku mengajar sains di sekolah
-- The way the grammar is currently defined, we'd get the same output for both "I want to learn/study science". Is this correct, or should one or both of the verbs keep the ber/meng prefix in this context?
Lang: UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (AdvVP (ComplVV want_VV (ComplSlash (SlashV2a teach_V2) (MassNP (UseN science_N)))) (PrepNP in_Prep (DetCN (DetQuant DefArt NumSg) (UseN school_N))))))
LangEng: I want to teach science in the school
LangMay: saya mahu ajar sains di sekolah
LangMay: aku mahu mengajar sains di sekolah
Lang: UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (AdvVP (ComplVV want_VV (ComplSlash (SlashV2a learn_V2) (MassNP (UseN science_N)))) (PrepNP in_Prep (DetCN (DetQuant DefArt NumSg) (UseN school_N))))))
LangEng: I want to learn science in the school
LangMay: saya mahu belajar sains di sekolah
LangMay: aku mahu belajar sains di sekolah
-- How about interaction with passive? These sentences are very artificial, but imagine they made sense:
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant this_Quant NumSg) (UseN book_N)) (AdvVP (PassV2 learn_V2) (PrepNP in_Prep (DetCN (DetQuant DefArt NumSg) (UseN school_N))))))) NoVoc
@@ -62,12 +61,12 @@ LangMay: buku ini diajar di sekolah
Lang: DetCN (DetQuant IndefArt NumSg) (RelCN (UseN cat_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (UseV walk_V))))
LangEng: a cat that walks
LangMay: kucing yang jalan
LangMay: kucing yang berjalan
-- In a context
Lang: UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a buy_V2) (DetCN (DetQuant IndefArt NumSg) (RelCN (UseN cat_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (UseV walk_V))))))))
LangEng: I buy a cat that walks
LangMay: saya membeli kucing yang jalan
LangMay: aku membeli kucing yang berjalan
-- Transitive verbs
@@ -84,11 +83,11 @@ LangMay: susu yang kucing minum
-- Both in context
Lang: UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a buy_V2) (DetCN (DetQuant IndefArt NumSg) (RelCN (UseN cat_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP IdRP (ComplSlash (SlashV2a drink_V2) (MassNP (UseN milk_N))))))))))
LangEng: I buy a cat that drinks milk
LangMay: saya membeli kucing yang minum susu
LangMay: aku membeli kucing yang minum susu
Lang: UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (ComplSlash (SlashV2a buy_V2) (MassNP (RelCN (UseN milk_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP (DetCN (DetQuant IndefArt NumSg) (UseN cat_N)) (SlashV2a drink_V2)))))))))
LangEng: I buy milk that a cat drinks
LangMay: saya membeli susu yang kucing minum
LangMay: aku membeli susu yang kucing minum
----------------------------------------
@@ -102,11 +101,21 @@ LangMay: hujan sekarang
-- In a context
Lang: UttS (AdvS (SubjS if_Subj (UseCl (TTAnt TPast ASimul) PNeg (ImpersCl (UseV rain_V0)))) (ExtAdvS now_Adv (UseCl (TTAnt TCond ASimul) PPos (PredVP (UsePron i_Pron) (UseV walk_V)))))
LangEng: if it didn't rain now , I would walk
LangMay: sekiranya tidak hujan sekarang , saya akan berjalan
LangMay: sekiranya tidak hujan sekarang , aku akan berjalan
----------------------------------------
-- Imperative
Lang: UttImpSg PPos (ImpVP (ComplSlash (SlashV2a open_V2) (DetCN (DetQuant DefArt NumSg) (UseN door_N))))
LangEng: open the door
LangMay: buka pintu
Lang: UttImpSg PNeg (ImpVP (ComplSlash (SlashV2a open_V2) (DetCN (DetQuant DefArt NumSg) (UseN door_N))))
LangEng: don't open the door
LangMay: jangan buka pintu
Lang: UttImpPol PPos (ImpVP (ComplSlash (SlashV2a open_V2) (DetCN (DetQuant DefArt NumSg) (UseN door_N))))
LangEng: open the door
LangMay: bukakan pintu
----------------------------------------
-- Questions