Copyright | (c) 2016 Al Zohali |
---|---|
License | BSD3 |
Maintainer | Al Zohali <zohl@fmap.me> |
Stability | experimental |
Safe Haskell | Safe |
Language | Haskell2010 |
NLP.Dictionary.StarDict
Description
Description
Tools for StarDict dictionaries.
This module (re)exports core classes that are needed to work with
dictionaries. To create dictionary, use mkDictionary
method
together with tag
from one of implementations:
import NLP.Dictionary.StarDict (StarDict(..)) import qualified NLP.Dictionery.StarDict.Regular as SDR ... dictionary <- mkDictionary (SDR.tag "pathtoadictionary.ifo") renderer
Documentation
Possible dictionary entry formats.
type Renderer = DataEntry -> Text Source #
Type of function to transform dictionary entries to a text.
class Dictionary d => StarDict d where Source #
Classtype for stardict dictionaries.
Minimal complete definition
Methods
getIfoFile :: d -> IfoFile Source #
mkDictionary :: (MonadThrow m, MonadIO m) => Tagged d IfoFilePath -> Renderer -> m d Source #