Safe Haskell | None |
---|
- spellChecker :: IO (Either ByteString SpellChecker)
- spellCheckerWithOptions :: [ACOption] -> IO (Either ByteString SpellChecker)
- spellCheckerWithDictionary :: ByteString -> IO (Either ByteString SpellChecker)
- check :: SpellChecker -> ByteString -> Bool
- suggest :: SpellChecker -> ByteString -> IO [ByteString]
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 []
.