From 9c762efcb44ccf284e0141b4727c9a7826bfbc6f Mon Sep 17 00:00:00 2001 From: Aarne Ranta Date: Wed, 8 Nov 2017 14:47:33 +0100 Subject: [PATCH] pos-neg and ExistCN in Finnish --- src/finnish/ExtendFin.gf | 25 ++++++++++++++++++++++++- src/finnish/ResFin.gf | 8 +++++++- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/src/finnish/ExtendFin.gf b/src/finnish/ExtendFin.gf index c3467e78..cc6ac85b 100644 --- a/src/finnish/ExtendFin.gf +++ b/src/finnish/ExtendFin.gf @@ -1,7 +1,10 @@ --# -path=.:../common:../abstract concrete ExtendFin of Extend = - CatFin ** ExtendFunctor - [VPI2,VPS2,MkVPS2,ConjVPS2,ComplVPS2,MkVPI2,ConjVPI2,ComplVPI2,ComplVPIVV] + CatFin ** ExtendFunctor - [ + VPI2,VPS2,MkVPS2,ConjVPS2,ComplVPS2,MkVPI2,ConjVPI2,ComplVPI2,ComplVPIVV + ,ExistCN, ExistMassCN + ] with (Grammar = GrammarFin) ** @@ -15,6 +18,26 @@ concrete ExtendFin of Extend = MorphoFin, ParadigmsFin in { +lin + ExistCN cn = + let + pos = ExistNP (DetCN (DetQuant IndefArt NumSg) cn) ; + neg = ExistNP (partCN cn) ; + in posNegClause pos neg ; + ExistMassCN cn = ExistNP (partCN cn) ; + +oper + partCN : CN -> GrammarFin.NP ; + partCN cn = + let + acn = DetCN (DetQuant IndefArt NumSg) cn + in acn ** { + s = table { + NPCase Nom | NPAcc => acn.s ! NPCase ResFin.Part ; + c => acn.s ! c + } + } ; + lincat VPS = {s : Agr => Str } ; diff --git a/src/finnish/ResFin.gf b/src/finnish/ResFin.gf index 3f929647..aac5568a 100644 --- a/src/finnish/ResFin.gf +++ b/src/finnish/ResFin.gf @@ -305,7 +305,13 @@ oper glueTok : Str -> Str = \s -> "&+" ++ s ; - +-- for pos/neg variation other than just negation word, e.g. case in "on ongelma"/"ei ole ongelmaa" + posNegClause : Clause -> Clause -> Clause = \pos,neg -> { + s = \\t,a,b,o => case b of { + Pos => pos.s ! t ! a ! b ! o ; + _ => neg.s ! t ! a ! b ! o + } + } ; -- This is used for subjects of passives: therefore isFin in False. subjForm : NP -> SubjCase -> Polarity -> Str = \np,sc,b ->