From ace36f7129b2382dc464d8533c928567362517ce Mon Sep 17 00:00:00 2001 From: aarneranta Date: Fri, 4 Jun 2021 16:28:19 +0200 Subject: [PATCH] added ParadigmsFin.foreignN and ParadigmsSwe.geoPN --- src/finnish/ParadigmsFin.gf | 5 ++++- src/swedish/ParadigmsSwe.gf | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/finnish/ParadigmsFin.gf b/src/finnish/ParadigmsFin.gf index 6570c591..a5ef957a 100644 --- a/src/finnish/ParadigmsFin.gf +++ b/src/finnish/ParadigmsFin.gf @@ -159,6 +159,8 @@ oper s = \\c => (StemFin.snoun2nounBind veri).s ! NCase n Gen + paine.s ! c } ; + foreignN : Str -> N ; -- foreign word without Finnish alternations, e.g. sake/saken/sakeja + -- Nouns used as functions need a case, of which the default is -- the genitive. @@ -667,7 +669,8 @@ mkVS = overload { mkPN_1 : Str -> PN = \s -> lin PN (snoun2spn (mk1N s)) ; - foreignPN : Str -> PN = \s -> (lin PN (snoun2spn (nforms2snoun (noun s)))) where { + foreignPN : Str -> PN = \s -> mkPN (foreignN s) ; + foreignN : Str -> N = \s -> (lin N (nforms2snoun (noun s))) where { noun : Str -> NForms = \s -> case s of { _ + "i" => dPaatti s (s + "n") ; _ + "e" => dNukke s (s + "n") ; diff --git a/src/swedish/ParadigmsSwe.gf b/src/swedish/ParadigmsSwe.gf index b2315791..5528442e 100644 --- a/src/swedish/ParadigmsSwe.gf +++ b/src/swedish/ParadigmsSwe.gf @@ -44,6 +44,7 @@ oper utrum : Gender ; -- the "en" gender neutrum : Gender ; -- the "ett" gender + neuter : Gender ; -- synonym of neutrum -- To abstract over number names, we define the following. @@ -151,6 +152,7 @@ oper mkPN : (jesus,jesu : Str) -> Gender -> PN -- irregular genitive } ; + geoPN : Str -> PN ; -- neuter, with identical genitive if ends in a vowel --2 Adjectives @@ -348,6 +350,7 @@ oper Case = CommonScand.Case ; utrum = Utr ; neutrum = Neutr ; + neuter = Neutr ; singular = Sg ; plural = Pl ; nominative = Nom ; @@ -525,6 +528,14 @@ oper {s = table {Nom => jesus ; Gen => jesu} ; g = g ; lock_PN = <>} ; } ; + geoPN name = + let names : Str = case name of { + _ + ("a"|"e"|"i"|"o"|"u"|"y"|"å"|"ä"|"ö") => name ; + _ + "s" => name ; + _ => name + "s" + } in + mkPN name names neutrum ; + regPN n = regGenPN n utrum ; regGenPN n g = {s = \\c => mkCase c n ; g = g} ** {lock_PN = <>} ; nounPN n = {s = n.s ! singular ! Indef ; g = n.g ; lock_PN = <>} ;