diff --git a/lib/src/finnish/CatFin.gf b/lib/src/finnish/CatFin.gf index 51f54e6fb..be867e814 100644 --- a/lib/src/finnish/CatFin.gf +++ b/lib/src/finnish/CatFin.gf @@ -95,6 +95,6 @@ concrete CatFin of Cat = CommonX ** open ResFin, Prelude in { N3 = {s : NForm => Str} ** {c2,c3 : Compl ; isPre,isPre2 : Bool} ; PN = {s : Case => Str} ; -oper Verb1 = {s : VForm => Str ; sc : NPForm ; qp : Str} ; +oper Verb1 = {s : VForm => Str ; sc : NPForm ; qp : Bool} ; } diff --git a/lib/src/finnish/ExtraFin.gf b/lib/src/finnish/ExtraFin.gf index 147ee530c..5d4760d51 100644 --- a/lib/src/finnish/ExtraFin.gf +++ b/lib/src/finnish/ExtraFin.gf @@ -27,7 +27,7 @@ concrete ExtraFin of ExtraFinAbs = CatFin ** AdvExistNP adv np = mkClause (\_ -> adv.s) np.a (insertObj - (\\_,b,_ => np.s ! NPCase Nom) (predV (verbOlla ** {sc = NPCase Nom ; qp = "ko"}))) ; + (\\_,b,_ => np.s ! NPCase Nom) (predV (verbOlla ** {sc = NPCase Nom ; qp = True}))) ; RelExistNP prep rp np = { s = \\t,ant,bo,ag => @@ -38,7 +38,7 @@ concrete ExtraFin of ExtraFinAbs = CatFin ** np.a (insertObj (\\_,b,_ => np.s ! NPCase Nom) - (predV (verbOlla ** {sc = NPCase Nom ; qp = "ko"}))) ; + (predV (verbOlla ** {sc = NPCase Nom ; qp = True}))) ; in cl.s ! t ! ant ! bo ! SDecl ; c = NPCase Nom diff --git a/lib/src/finnish/ExtraFinAbs.gf b/lib/src/finnish/ExtraFinAbs.gf index 635ca1569..ea7798f75 100644 --- a/lib/src/finnish/ExtraFinAbs.gf +++ b/lib/src/finnish/ExtraFinAbs.gf @@ -21,15 +21,19 @@ abstract ExtraFinAbs = Extra [ cat ClPlus ; -- clause with more variation + Part ; -- discourse particle fun - S_SVO : Temp -> Pol -> ClPlus -> S ; -- me juomme maitoa - S_SOV : Temp -> Pol -> ClPlus -> S ; -- me maitoa juomme - S_OSV : Temp -> Pol -> ClPlus -> S ; -- maitoa me juomme - S_OVS : Temp -> Pol -> ClPlus -> S ; -- maitoa juomme me - S_VSO : Temp -> Pol -> ClPlus -> S ; -- juomme me maitoa - S_VOS : Temp -> Pol -> ClPlus -> S ; -- juomme maitoa me + S_SVO : Temp -> Pol -> ClPlus -> S ; -- mepäs juomme maitoa + S_SOV : Temp -> Pol -> ClPlus -> S ; -- mepäs maitoa juomme + S_OSV : Temp -> Pol -> ClPlus -> S ; -- maitoapas me juomme + S_OVS : Temp -> Pol -> ClPlus -> S ; -- maitoapas juomme me + S_VSO : Temp -> Pol -> ClPlus -> S ; -- juommepas me maitoa + S_VOS : Temp -> Pol -> ClPlus -> S ; -- juommepas maitoa me PredClPlus : NP -> VP -> ClPlus ; +---- noPart, han_Part, pa_Part, pas_Part, ko_Part, kos_Part, +---- kohan_Part, pahan_Part : Part ; + } diff --git a/lib/src/finnish/IdiomFin.gf b/lib/src/finnish/IdiomFin.gf index 3248b0b85..90c8e3d58 100644 --- a/lib/src/finnish/IdiomFin.gf +++ b/lib/src/finnish/IdiomFin.gf @@ -68,7 +68,7 @@ concrete IdiomFin of Idiom = CatFin ** } ; oper - olla = verbOlla ** {sc = NPCase Nom ; qp = "ko"} ; + olla = verbOlla ** {sc = NPCase Nom ; qp = True} ; noSubj : Polarity -> Str = \_ -> [] ; } diff --git a/lib/src/finnish/LangFin.gf b/lib/src/finnish/LangFin.gf index a5e679093..53eca61e4 100644 --- a/lib/src/finnish/LangFin.gf +++ b/lib/src/finnish/LangFin.gf @@ -1,7 +1,8 @@ --# -path=.:../abstract:../common:../prelude concrete LangFin of Lang = - GrammarFin, --- - [SlashV2VNP,SlashVV], ---- to speed up parsing grammar + GrammarFin - [SlashV2VNP,SlashVV], ---- to speed up compilation +-- GrammarFin, LexiconFin ** { diff --git a/lib/src/finnish/MorphoFin.gf b/lib/src/finnish/MorphoFin.gf index 1c3a52948..ce90d26d6 100644 --- a/lib/src/finnish/MorphoFin.gf +++ b/lib/src/finnish/MorphoFin.gf @@ -688,7 +688,7 @@ resource MorphoFin = ResFin ** open Prelude in { 11 => lienee } ; - vforms2V : VForms -> Verb ** {qp : Str} = \vh -> + vforms2V : VForms -> Verb ** {qp : Bool} = \vh -> let tulla = vh ! 0 ; tulen = vh ! 1 ; @@ -753,7 +753,7 @@ resource MorphoFin = ResFin ** open Prelude in { Inf Inf3Abess => tulema + "tt" + a } ; sc = NPCase Nom ; - qp = Predef.dp 2 tulko ; + qp = pbool2bool (Predef.eqStr (last tulko) "o") ; lock_V = <> } ; diff --git a/lib/src/finnish/ParadigmsFin.gf b/lib/src/finnish/ParadigmsFin.gf index 20eda230e..5f4272bee 100644 --- a/lib/src/finnish/ParadigmsFin.gf +++ b/lib/src/finnish/ParadigmsFin.gf @@ -578,7 +578,7 @@ oper caseV c v = {s = v.s ; sc = NPCase c ; qp = v.qp ; lock_V = <>} ; - vOlla = verbOlla ** {sc = NPCase Nom ; qp = "ko" ; lock_V = <>} ; ---- lieneekö + vOlla = verbOlla ** {sc = NPCase Nom ; qp = True ; lock_V = <>} ; ---- lieneekö mk2V2 : V -> Prep -> V2 = \v,c -> v ** {c2 = c ; lock_V2 = <>} ; caseV2 : V -> Case -> V2 = \v,c -> mk2V2 v (casePrep c) ; diff --git a/lib/src/finnish/QuestionFin.gf b/lib/src/finnish/QuestionFin.gf index 096ae5195..07ea5602e 100644 --- a/lib/src/finnish/QuestionFin.gf +++ b/lib/src/finnish/QuestionFin.gf @@ -31,7 +31,7 @@ concrete QuestionFin of Question = CatFin ** open ResFin, Prelude in { QuestIComp icomp np = { s = \\t,a,p => let - vp = predV (verbOlla ** {sc = NPCase Nom ; qp = "ko"}) ; + vp = predV (verbOlla ** {sc = NPCase Nom ; qp = True}) ; cl = mkClause (subjForm np vp.sc) np.a vp ; in icomp.s ! np.a ++ cl.s ! t ! a ! p ! SDecl diff --git a/lib/src/finnish/ResFin.gf b/lib/src/finnish/ResFin.gf index 69f844eca..15cc038ce 100644 --- a/lib/src/finnish/ResFin.gf +++ b/lib/src/finnish/ResFin.gf @@ -187,10 +187,10 @@ oper s2 : Bool => Polarity => Agr => Str ; -- talo/talon/taloa ext : Str ; sc : NPForm ; - qp : Str + qp : Bool -- True = back vowel } ; - predV : (Verb ** {sc : NPForm ; qp : Str}) -> VP = \verb -> { + predV : (Verb ** {sc : NPForm ; qp : Bool}) -> VP = \verb -> { s = \\vi,ant,b,agr0 => let @@ -284,7 +284,7 @@ oper } ; ClausePlus : Type = { - s : Tense => Anteriority => Polarity => {subj,fin,inf,compl,ext,qp : Str} + s : Tense => Anteriority => Polarity => {subj,fin,inf,compl,ext : Str ; qp : Bool} } ; mkClause : (Polarity -> Str) -> Agr -> VP -> Clause = @@ -292,7 +292,7 @@ oper s = \\t,a,b => let c = (mkClausePlus sub agr vp).s ! t ! a ! b in table { SDecl => c.subj ++ c.fin ++ c.inf ++ c.compl ++ c.ext ; - SQuest => c.fin ++ BIND ++ c.qp ++ c.subj ++ c.inf ++ c.compl ++ c.ext + SQuest => c.fin ++ BIND ++ questPart c.qp ++ c.subj ++ c.inf ++ c.compl ++ c.ext } } ; @@ -300,15 +300,18 @@ oper \sub,agr,vp -> { s = \\t,a,b => let - subj = sub b ; agrfin = case vp.sc of { NPCase Nom => ; _ => -- minun täytyy, minulla on } ; verb = vp.s ! VIFin t ! a ! b ! agrfin.p1 ; - compl = vp.s2 ! agrfin.p2 ! b ! agr ; - complext = compl ++ vp.ext - in {subj = subj ; fin = verb.fin ; inf = verb.inf ; compl = compl ; ext = vp.ext ; qp = questPart vp a b} + in {subj = sub b ; + fin = verb.fin ; + inf = verb.inf ; + compl = vp.s2 ! agrfin.p2 ! b ! agr ; + ext = vp.ext ; + qp = selectPart vp a b + } } ; -- This is used for subjects of passives: therefore isFin in False. @@ -316,11 +319,13 @@ oper subjForm : NP -> NPForm -> Polarity -> Str = \np,sc,b -> appCompl False b {s = [] ; c = sc ; isPre = True} np ; - questPart : VP -> Anteriority -> Polarity -> Str = \vp,a,p -> + questPart : Bool -> Str = \b -> if_then_Str b "ko" "kö" ; + + selectPart : VP -> Anteriority -> Polarity -> Bool = \vp,a,p -> case p of { - Neg => "kö" ; -- eikö tule + Neg => False ; -- eikö tule _ => case a of { - Anter => "ko" ; -- onko mennyt --# notpresent + Anter => True ; -- onko mennyt --# notpresent _ => vp.qp -- tuleeko, meneekö } } ; diff --git a/lib/src/finnish/VerbFin.gf b/lib/src/finnish/VerbFin.gf index 00847d934..3e96327bf 100644 --- a/lib/src/finnish/VerbFin.gf +++ b/lib/src/finnish/VerbFin.gf @@ -53,7 +53,7 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin in { ComplSlash vp np = insertObjPre (\\fin,b,_ => appCompl fin b vp.c2 np) vp ; UseComp comp = - insertObj (\\_,_ => comp.s) (predV (verbOlla ** {sc = NPCase Nom ; qp = "ko"})) ; + insertObj (\\_,_ => comp.s) (predV (verbOlla ** {sc = NPCase Nom ; qp = True})) ; SlashVV v vp = insertObj