diff --git a/src/finnish/CatFin.gf b/src/finnish/CatFin.gf index 449496fcd..aaf9bb658 100644 --- a/src/finnish/CatFin.gf +++ b/src/finnish/CatFin.gf @@ -93,7 +93,7 @@ concrete CatFin of Cat = CommonX ** open ResFin, StemFin, Prelude in { A2 = {s : Degree => SAForm => Str ; h : Harmony ; c2 : Compl} ; N = SNoun ; - N2 = SNoun ** {c2 : Compl ; isPre : Bool} ; + N2 = SNoun ** {c2 : Compl ; isPre : Bool ; postmod : Number => Str} ; N3 = SNoun ** {c2,c3 : Compl ; isPre,isPre2 : Bool} ; PN = SPN ; diff --git a/src/finnish/NounFin.gf b/src/finnish/NounFin.gf index 4d7dbd111..fa9857fb0 100644 --- a/src/finnish/NounFin.gf +++ b/src/finnish/NounFin.gf @@ -191,41 +191,47 @@ concrete NounFin of Noun = CatFin ** open ResFin, MorphoFin, StemFin, Prelude in postmod = \\_ => [] } ; - UseN2 = UseN ; + UseN2 n = snoun2nounSep n ** { + postmod = n.postmod + } ; Use2N3 f = { s = f.s ; c2 = f.c2 ; h = f.h ; - isPre = f.isPre + isPre = f.isPre ; + postmod = \\_ => [] ; } ; Use3N3 f = { s = f.s ; c2 = f.c3 ; h = f.h ; - isPre = f.isPre2 + isPre = f.isPre2 ; + postmod = \\_ => [] ; } ; ComplN2 f x = { s = \\nf => case f.isPre of { - True => (snoun2nounSep f).s ! nf ; - False => compl ++ (snoun2nounSep f).s ! nf } ; - postmod = case f.isPre of { - True => \\_ => compl ; - False => \\_ => [] - } ; + True => cn.s ! nf ; + False => compl ++ cn.s ! nf } ; + postmod = \\num => + case f.isPre of { -- If N2 comes from ComplN3, postmod may be filled + True => cn.postmod ! num ++ compl ; + False => cn.postmod ! num } ; h = f.h } - where {compl : Str = appCompl True Pos f.c2 x} ; + where { + compl : Str = appCompl True Pos f.c2 x ; + cn : CN = UseN2 f ; + } ; - ---- If a possessive suffix is added here it goes after the complements... - - ComplN3 f x = { - s = \\nf => preOrPost f.isPre (f.s ! nf) (appCompl True Pos f.c2 x) ; + -- reuse the pre/post logic from ComplN2. + -- we just need to make the N3 into the lincat of N2 + ComplN3 f x = ComplN2 (toN2 f) x ** { c2 = f.c3 ; - h = f.h ; - isPre = f.isPre2 + isPre = f.isPre2 } + where { + toN2 : N3 -> N2 = \n3 -> lin N2 (n3 ** {postmod = \\_ => []}) } ; AdjCN ap cn = cn ** { diff --git a/src/finnish/ParadigmsFin.gf b/src/finnish/ParadigmsFin.gf index 82841f014..c988ae5da 100644 --- a/src/finnish/ParadigmsFin.gf +++ b/src/finnish/ParadigmsFin.gf @@ -631,7 +631,7 @@ mkVS = overload { mkN2 : N -> Prep -> N2 = mmkN2 } ; - mmkN2 : N -> Prep -> N2 = \n,c -> n ** {c2 = c ; isPre = mkIsPre c ; lock_N2 = <>} ; + mmkN2 : N -> Prep -> N2 = \n,c -> n ** {c2 = c ; isPre = mkIsPre c ; lock_N2 = <> ; postmod = \\_ => []} ; mkN3 = \n,c,e -> n ** {c2 = c ; c3 = e ; isPre = mkIsPre c ; -- matka Lontoosta Pariisiin isPre2 = mkIsPre e ; -- Suomen voitto Ruotsista