mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-19 17:59:32 -06:00
a simple clitic analysis command 'ca'
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user