1
0
forked from GitHub/gf-rgl

Merge pull request #397 from inariksit/estonian-interrogative-agreement

Estonian interrogative agreement
This commit is contained in:
Inari Listenmaa
2022-06-03 14:49:28 +02:00
committed by GitHub
7 changed files with 124 additions and 94 deletions

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

@@ -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

@@ -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