a simple clitic analysis command 'ca'

This commit is contained in:
aarne
2011-02-06 16:19:24 +00:00
parent a710e3fdee
commit e4eccba450
3 changed files with 81 additions and 1 deletions

View File

@@ -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