diff --git a/src/estonian/CatEst.gf b/src/estonian/CatEst.gf index 945f55d1..433a5e02 100644 --- a/src/estonian/CatEst.gf +++ b/src/estonian/CatEst.gf @@ -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 ; } diff --git a/src/estonian/QuestionEst.gf b/src/estonian/QuestionEst.gf index 0df94f21..01335b10 100644 --- a/src/estonian/QuestionEst.gf +++ b/src/estonian/QuestionEst.gf @@ -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 of { - => 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 of { + => 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 of { - => 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} ; diff --git a/src/estonian/ResEst.gf b/src/estonian/ResEst.gf index 5e7f45c6..a6c2e9b3 100644 --- a/src/estonian/ResEst.gf +++ b/src/estonian/ResEst.gf @@ -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 = { diff --git a/src/estonian/StructuralEst.gf b/src/estonian/StructuralEst.gf index b5e2857a..fc2b8db1 100644 --- a/src/estonian/StructuralEst.gf +++ b/src/estonian/StructuralEst.gf @@ -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 } ;