Safe Haskell | None |
---|
The module provides functionality for manipulating PoliMorf, the
morphological dictionary for Polish. Apart from IO utilities there
is a merge
function which can be used to merge the PoliMorf with
another dictionary resources.
- type Form = Text
- type Base = Text
- type Tag = Text
- type Cat = Text
- data Entry = Entry {}
- atomic :: Entry -> Bool
- readPoliMorf :: FilePath -> IO [Entry]
- parsePoliMorf :: Text -> [Entry]
- data Rule = Rule {}
- apply :: Rule -> Text -> Text
- type DAWG a = DAWG Trans Char () a
- type AnaMap = DAWG (Map Rule (Set Tag))
- mkAnaMap :: [Entry] -> AnaMap
- anaWord :: AnaMap -> Form -> Map Base (Set Tag)
- mkRuleMap :: [(Text, Text)] -> DAWG (Set Rule)
- type BaseMap = DAWG (Set Rule)
- mkBaseMap :: [Entry] -> BaseMap
- type FormMap = DAWG (Set Rule)
- mkFormMap :: [Entry] -> FormMap
Core types
An entry from the PoliMorf dictionary.
Is the entry an atomic one? More precisely, we treat all negative forms starting with ''nie'' and all superlatives starting with ''naj'' as non-atomic entries.
Parsing
readPoliMorf :: FilePath -> IO [Entry]Source
Read the PoliMorf from the file.
parsePoliMorf :: Text -> [Entry]Source
Parse the PoliMorf into a list of entries.
Utilities
A rule for translating a form into another one.
type AnaMap = DAWG (Map Rule (Set Tag))Source
A map from forms to their potential interpretations. It can be used directly to determine all potential dictionary interpretations of a given form.