haspell-0.2.0.0: Haskell bindings to aspell

Safe HaskellNone

Language.Aspell

Contents

Synopsis

Constructors

spellChecker :: IO (Either ByteString SpellChecker)Source

Creates a spell checker with default options.

 spellChecker = spellCheckerWithOptions []

spellCheckerWithOptions :: [ACOption] -> IO (Either ByteString SpellChecker)Source

Creates a spell checker with a custom set of options.

spellCheckerWithDictionary :: ByteString -> IO (Either ByteString SpellChecker)Source

Convenience function for specifying a dictionary.

You can determine which dictionaries are available to you with aspell dump dicts.

 spellCheckerWithDictionary dict = spellCheckerWithOptions [Dictionary dict]

Using the spell checker

check :: SpellChecker -> ByteString -> BoolSource

Checks if a word has been spelled correctly.

suggest :: SpellChecker -> ByteString -> IO [ByteString]Source

Lists suggestions for misspelled words.

If the input is not misspelled according to the dictionary, returns [].