From 7445e5638713276b471a0c8d5a53940704e8239d Mon Sep 17 00:00:00 2001 From: aarne Date: Sun, 6 Feb 2011 16:19:24 +0000 Subject: a simple clitic analysis command 'ca' --- src/runtime/haskell/PGF/Morphology.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/runtime/haskell') diff --git a/src/runtime/haskell/PGF/Morphology.hs b/src/runtime/haskell/PGF/Morphology.hs index d5a2d28bc..70fa70458 100644 --- a/src/runtime/haskell/PGF/Morphology.hs +++ b/src/runtime/haskell/PGF/Morphology.hs @@ -1,5 +1,5 @@ module PGF.Morphology(Lemma,Analysis,Morpho, - buildMorpho, + buildMorpho,isInMorpho, lookupMorpho,fullFormLexicon, morphoMissing,missingWordMsg) where @@ -42,6 +42,9 @@ collectWords pinfo = Map.fromListWith (++) lookupMorpho :: Morpho -> String -> [(Lemma,Analysis)] lookupMorpho (Morpho mo) s = maybe [] id $ Map.lookup s mo +isInMorpho :: Morpho -> String -> Bool +isInMorpho (Morpho mo) s = maybe False (const True) $ Map.lookup s mo + fullFormLexicon :: Morpho -> [(String,[(Lemma,Analysis)])] fullFormLexicon (Morpho mo) = Map.toList mo -- cgit v1.2.3