diff --git a/lib/src/finnish/kotus/Kotus.gf b/lib/src/finnish/kotus/Kotus.gf index 4e007b977..92874aee0 100644 --- a/lib/src/finnish/kotus/Kotus.gf +++ b/lib/src/finnish/kotus/Kotus.gf @@ -299,7 +299,11 @@ oper = c99 ; -- dummy -- compound nouns, latter part inflected - compoundNK : (Str -> NForms) -> Str -> Str -> NForms = \d,x,y -> + compoundNK : Str -> NForms -> NForms = \x,y -> + \\v => x + y ! v ; + +--- this is a lot slower + fcompoundNK : (Str -> NForms) -> Str -> Str -> NForms = \d,x,y -> let ys = d y in \\v => x + ys ! v ; } diff --git a/lib/src/finnish/kotus/Kotus.hs b/lib/src/finnish/kotus/Kotus.hs index a5048970e..effd6e7f6 100644 --- a/lib/src/finnish/kotus/Kotus.hs +++ b/lib/src/finnish/kotus/Kotus.hs @@ -56,7 +56,7 @@ mkCompound compMap (w,ent) = Just (e,b) -> return (w, ent { word = word e, tn = tn e, - par = "compoundNK " ++ par e ++ " " ++ quoted b, + par = unwords ["compoundNK",par e,quoted b], isDummy = tn e == 0 } ) @@ -112,7 +112,9 @@ mkRules e = do | otherwise = putStrLn mkFun fun cat = unwords ["fun",fun,":",cat,";"] -mkLin fun par w = unwords ["lin",fun,"=",par,quoted w,";"] +mkLin fun par w = case words par of + f@"compoundNK":p:v:_ -> unwords ["lin",fun,"=",f,v,"("++ p,quoted w ++")",";"] + _ -> unwords ["lin",fun,"=",par,quoted w,";"] mkId = concatMap trim where trim c = case fromEnum c of diff --git a/lib/src/finnish/kotus/prelDictCompFin b/lib/src/finnish/kotus/prelDictCompFin index c4cdef534..ef8df6b5c 100644 --- a/lib/src/finnish/kotus/prelDictCompFin +++ b/lib/src/finnish/kotus/prelDictCompFin @@ -2,5 +2,8 @@ concrete DictCompFin of DictCompFinAbs = DictFin ** open MorphoFin, Kotus, Prelude in { +-- extracted from http://kaino.kotus.fi/sanat/nykysuomi/, licensed under LGPL +-- non-compounds in DictFin (inherited) + flags coding = utf8 ; diff --git a/lib/src/finnish/kotus/prelDictFin b/lib/src/finnish/kotus/prelDictFin index ddabe432e..6281e3eb1 100644 --- a/lib/src/finnish/kotus/prelDictFin +++ b/lib/src/finnish/kotus/prelDictFin @@ -2,6 +2,9 @@ concrete DictFin of DictFinAbs = open MorphoFin, Kotus, Prelude in { +-- extracted from http://kaino.kotus.fi/sanat/nykysuomi/, licensed under LGPL +-- compounds in DictCompFin + flags coding = utf8 ; lincat NK = NForms ; AK = NForms ; VK = VForms ; AdvK = SS ;