diff --git a/src/estonian/CatEst.gf b/src/estonian/CatEst.gf index 433a5e029..e63e33fa9 100644 --- a/src/estonian/CatEst.gf +++ b/src/estonian/CatEst.gf @@ -13,7 +13,7 @@ concrete CatEst of Cat = CommonX ** open HjkEst, ResEst, Prelude in { -- Sentence - Cl = {s : ResEst.Tense => Anteriority => Polarity => SType => Str} ; + Cl = {s : ResEst.Tense => Anteriority => Polarity => Str} ; ClSlash = {s : ResEst.Tense => Anteriority => Polarity => Str ; c2 : Compl} ; Imp = {s : Polarity => Agr => Str} ; diff --git a/src/estonian/ExtendEst.gf b/src/estonian/ExtendEst.gf index b8e74da81..128a72ad0 100644 --- a/src/estonian/ExtendEst.gf +++ b/src/estonian/ExtendEst.gf @@ -260,12 +260,12 @@ concrete ExtendEst of Extend = -- : NP -> VS -> Utt -> Cl ; -- "I am here", she said FrontComplDirectVS np vs utt = let cl : Cl = PredVP np (UseV vs) ; - in cl ** {s = \\t,a,p,o => utt.s ++ bindComma ++ cl.s ! t ! a ! p ! o} ; + in cl ** {s = \\t,a,p => utt.s ++ bindComma ++ cl.s ! t ! a ! p} ; -- : NP -> VQ -> Utt -> Cl ; -- "where", she asked FrontComplDirectVQ np vq utt = let cl : Cl = PredVP np (UseV vq) ; - in cl ** {s = \\t,a,p,o => utt.s ++ bindComma ++ cl.s ! t ! a ! p ! o} ; + in cl ** {s = \\t,a,p => utt.s ++ bindComma ++ cl.s ! t ! a ! p} ; --------------------------------- diff --git a/src/estonian/ExtraEst.gf b/src/estonian/ExtraEst.gf index f78923f86..b58901def 100644 --- a/src/estonian/ExtraEst.gf +++ b/src/estonian/ExtraEst.gf @@ -135,7 +135,7 @@ concrete ExtraEst of ExtraEstAbs = CatEst ** (\\_,b,_ => linNP (NPCase Nom) np) (predV (verbOlema ** {sc = NPCase Nom}))) ; in - cl.s ! t ! ant ! bo ! SDecl ; + cl.s ! t ! ant ! bo ; c = NPCase Nom } ; @@ -144,18 +144,20 @@ concrete ExtraEst of ExtraEstAbs = CatEst ** (\\_,b,_ => linNP (NPCase Nom) np) (predV v)) ; ICompExistNP adv np = - let cl = mkClause (\_ -> adv.s ! np.a) np.a (insertObj - (\\_,b,_ => linNP (NPCase Nom) np) (predV (verbOlema ** {sc = NPCase Nom}))) ; - in { - s = \\t,a,p => cl.s ! t ! a ! p ! SDecl - } ; + let subj : Polarity -> Str = \_ -> adv.s ! np.a ; + pred : VP = insertObj + (\\_,b,_ => linNP (NPCase Nom) np) + (predV (verbOlema ** {sc = NPCase Nom})) ; + in mkClause subj np.a pred ; + IAdvPredNP iadv v np = - let cl = mkClause (\_ -> iadv.s) np.a (insertObj - (\\_,b,_ => linNP v.sc np) (predV v)) ; - in { - s = \\t,a,p => cl.s ! t ! a ! p ! SDecl - } ; + let subj : Polarity -> Str = \_ -> iadv.s ; + pred : VP = insertObj + (\\_,b,_ => linNP v.sc np) + (predV v) ; + in mkClause subj np.a pred ; + -- i_implicPron = mkPronoun [] "minun" "minua" "minuna" "minuun" Sg P1 ; whatPart_IP = emptyIP ** { diff --git a/src/estonian/IdiomEst.gf b/src/estonian/IdiomEst.gf index 8ae3c7caa..63ddb8ecb 100644 --- a/src/estonian/IdiomEst.gf +++ b/src/estonian/IdiomEst.gf @@ -5,23 +5,17 @@ concrete IdiomEst of Idiom = CatEst ** lin ExistNP np = - let - cas : Polarity -> NPForm = \p -> case p of { - Pos => NPCase Nom ; -- on olemas lammas - Neg => NPCase Part -- ei ole olemas lammast - } ; - vp = insertObj (\\_,b,_ => "olemas" ++ linNP (cas b) np) (predV olla) - in - existClause noSubj (agrP3 Sg) vp ; + let cas : Polarity -> NPForm = \p -> case p of { + Pos => NPCase Nom ; -- on olemas lammas + Neg => NPCase Part } ; -- ei ole olemas lammast + vp = insertObj (\\_,b,_ => "olemas" ++ linNP (cas b) np) (predV olla) + in existClause noSubj (agrP3 Sg) vp ; ExistIP ip = - let - cas : NPForm = NPCase Nom ; ---- also partitive in Extra - vp = insertObj (\\_,b,_ => "olemas") (predV olla) ; - cl = existClause (subjForm (ip ** {isPron = False ; a = agrP3 ip.n}) cas) (agrP3 Sg) vp - in { - s = \\t,a,p => cl.s ! t ! a ! p ! SDecl - } ; + let cas : NPForm = NPCase Nom ; ---- also partitive in Extra + vp : VP = insertObj (\\_,b,_ => "olemas") (predV olla) ; + subj : NP = ip ** {isPron = False ; a = agrP3 ip.n} ; + in existClause (subjForm subj cas) (agrP3 Sg) vp ; -- Notice the nominative in the cleft $NP$: "se on Matti josta Liisa pitää" -- Est: "see on Mati, kellest Liis lugu peab" diff --git a/src/estonian/QuestionEst.gf b/src/estonian/QuestionEst.gf index 01335b101..cbb07e98c 100644 --- a/src/estonian/QuestionEst.gf +++ b/src/estonian/QuestionEst.gf @@ -5,15 +5,10 @@ concrete QuestionEst of Question = CatEst ** open ResEst, Prelude in { lin QuestCl cl = { - s = \\t,a,p => cl.s ! t ! a ! p ! SQuest + s = \\t,a,p => "kas" ++ cl.s ! t ! a ! p } ; - QuestVP ip vp = - let - cl = mkClause (subjForm (ip ** {isPron = False ; a = agrP3 ip.n}) vp.sc) (agrP3 ip.n) vp - in { - s = \\t,a,p => cl.s ! t ! a ! p ! SDecl - } ; + QuestVP ip vp = mkClause (subjForm (ip ** {isPron = False ; a = agrP3 ip.n}) vp.sc) (agrP3 ip.n) vp ; QuestSlash ip slash = { s = \\t,a,p => @@ -25,7 +20,7 @@ concrete QuestionEst of Question = CatEst ** open ResEst, Prelude in { } ; QuestIAdv iadv cl = { - s = \\t,a,p => iadv.s ++ cl.s ! t ! a ! p ! SDecl + s = \\t,a,p => iadv.s ++ cl.s ! t ! a ! p } ; QuestIComp icomp np = { @@ -34,7 +29,7 @@ concrete QuestionEst of Question = CatEst ** open ResEst, Prelude in { vp = predV (verbOlema ** {sc = NPCase Nom}) ; cl = mkClause (subjForm np vp.sc) np.a vp ; in - icomp.s ! np.a ++ cl.s ! t ! a ! p ! SDecl + icomp.s ! np.a ++ cl.s ! t ! a ! p } ; PrepIP p ip = {s = diff --git a/src/estonian/RelativeEst.gf b/src/estonian/RelativeEst.gf index 7cf10c345..a887476d8 100644 --- a/src/estonian/RelativeEst.gf +++ b/src/estonian/RelativeEst.gf @@ -5,7 +5,7 @@ concrete RelativeEst of Relative = CatEst ** open Prelude, ResEst, MorphoEst in lin RelCl cl = { - s = \\t,a,p,_ => "nii" ++ "et" ++ cl.s ! t ! a ! p ! SDecl ; + s = \\t,a,p,_ => "nii" ++ "et" ++ cl.s ! t ! a ! p ; ---- sellainen c = NPCase Nom } ; @@ -23,7 +23,7 @@ concrete RelativeEst of Relative = CatEst ** open Prelude, ResEst, MorphoEst in vp.sc) agr vp in - cl.s ! t ! ant ! b ! SDecl ; + cl.s ! t ! ant ! b ; c = NPCase Nom } ; diff --git a/src/estonian/ResEst.gf b/src/estonian/ResEst.gf index fd3a716c1..7bd9af595 100644 --- a/src/estonian/ResEst.gf +++ b/src/estonian/ResEst.gf @@ -180,8 +180,6 @@ oper glue (vf ! Inf if.stem) if.suf ; param - SType = SDecl | SQuest | SInv ; - --2 For $Relative$ RAgr = RNoAg | RAg Agr ; @@ -365,51 +363,34 @@ oper -- For $Sentence$. Clause : Type = { - s : Tense => Anteriority => Polarity => SType => Str + s : Tense => Anteriority => Polarity => Str } ; ClausePlus : Type = { s : Tense => Anteriority => Polarity => {subj,fin,inf,compl,adv,p,ext : Str} } ; - -- The Finnish version of SQuest featured a word order change and - -- the question particle "ko". The Estonian version just prefixes the - -- declarative sentence with the yes/no-queryword "kas". - -- SQuest: "kas" + SDecl - -- It would be also correct to use the Finnish structure, just without the ko-particle. - -- Inari: added a third SType, SInv. - -- Not sure if SInv is needed, but keeping it for possible future use. - -- There's need for an inverted word order with auxiliary verbs; infVP handles that. ComplVV calls infVP, which inverts the word order for the complement VP, and puts it into the resulting VP's `compl' field. - -- SInv made by mkClause would be for cases where you just need to construct an inverted word order, and then call it from some other place; application grammar (TODO: api oper for SType) or ExtraEst. mkClause : (Polarity -> Str) -> Agr -> VP -> Clause = \sub,agr,vp -> { s = \\t,a,b => let c = (mkClausePlus sub agr vp).s ! t ! a ! b ; - -- saan sinust aru 0 - -- ma olen täna sinust aru saanud - declCl = c.subj ++ c.fin ++ c.adv ++ c.compl ++ c.p ++ c.inf ++ c.ext ; - -- [sind näha] 0 tahtnud - -- täna olen ma sinust aru saanud - invCl = c.adv ++ c.fin ++ c.subj ++ c.compl ++ c.p ++ c.inf ++ c.ext in - table { - SDecl => declCl ; - SQuest => "kas" ++ declCl ; - SInv => invCl - } - } ; + -- saan sinust aru + -- ma olen täna sinust aru saanud + c.subj ++ c.fin ++ c.adv ++ c.compl ++ c.p ++ c.inf ++ c.ext ; + } ; existClause : (Polarity -> Str) -> Agr -> VP -> Clause = \sub,agr,vp -> { s = \\t,a,b => let c = (mkClausePlus sub agr vp).s ! t ! a ! b ; - -- (mis) on olnud olemas (lammas) - declCl = c.subj ++ c.fin ++ c.inf ++ c.compl ; in - table { - SQuest => "kas" ++ declCl ; - _ => declCl - } + -- c.subj ++ c.fin ++ c.inf ++ c.compl ; + -- saan sinust aru + -- ma olen täna sinust aru saanud + -- (mis) on olnud täna olemas … + c.subj ++ c.fin ++ c.inf ++ c.adv ++ c.p ++ c.compl ++ c.ext ; + } ; mkClausePlus : (Polarity -> Str) -> Agr -> VP -> ClausePlus = diff --git a/src/estonian/SentenceEst.gf b/src/estonian/SentenceEst.gf index 7209fc209..4ed8b7082 100644 --- a/src/estonian/SentenceEst.gf +++ b/src/estonian/SentenceEst.gf @@ -19,8 +19,7 @@ concrete SentenceEst of Sentence = CatEst ** open Prelude, ResEst in { -- The object case is formed at the use site of $c2$, in $Relative$ and $Question$. - SlashVP np vp = { - s = \\t,a,p => (mkClause (subjForm np vp.sc) np.a vp).s ! t ! a ! p ! SDecl ; + SlashVP np vp = mkClause (subjForm np vp.sc) np.a vp ** { c2 = vp.c2 } ; @@ -29,26 +28,23 @@ concrete SentenceEst of Sentence = CatEst ** open Prelude, ResEst in { c2 = slash.c2 } ; - SlashPrep cl prep = { - s = \\t,a,p => cl.s ! t ! a ! p ! SDecl ; + SlashPrep cl prep = cl ** { c2 = prep } ; - SlashVS np vs slash = { - s = \\t,a,p => - (mkClause (subjForm np vs.sc) np.a - (insertExtrapos (etta_Conj ++ slash.s) - (predV vs)) - ).s ! t ! a ! p ! SDecl ; - c2 = slash.c2 - } ; + SlashVS np vs slash = + let cl : Clause = + mkClause + (subjForm np vs.sc) np.a + (insertExtrapos (etta_Conj ++ slash.s) (predV vs)) + in cl ** {c2 = slash.c2} ; EmbedS s = {s = etta_Conj ++ s.s} ; EmbedQS qs = {s = qs.s} ; EmbedVP vp = {s = infVP (NPCase Nom) Pos (agrP3 Sg) vp InfDa} ; --- case,pol,agr,infform - UseCl t p cl = {s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! SDecl} ; + UseCl t p cl = {s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p} ; UseQCl t p cl = {s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p} ; UseRCl t p cl = { s = \\r => t.s ++ p.s ++ cl.s ! t.t ! t.a ! p.p ! r ;