-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell bindings to the Snowball stemming library. -- -- Haskell bindings to the Snowball stemming library. @package stemmer @version 0.2 -- | Haskell bindings for the Snowball stemming library. This module -- contains all the low-level functions and are more or less direct -- translations of the foreign function calls. The stem function -- expects strings to use UTF-8 encoding. module NLP.Stemmer.C -- | Available algorithms. For English, English is recommended over -- Porter. data Algorithm Danish :: Algorithm Dutch :: Algorithm English :: Algorithm Finnish :: Algorithm French :: Algorithm German :: Algorithm Hungarian :: Algorithm Italian :: Algorithm Norwegian :: Algorithm Portuguese :: Algorithm Romanian :: Algorithm Russian :: Algorithm Spanish :: Algorithm Swedish :: Algorithm Turkish :: Algorithm Porter :: Algorithm -- | Pointer to a stemmer instance type Stemmer = Ptr StemmerStruct -- | Create a new stemmer instance. When you're done using the stemmer, you -- should delete it, freeing the memory. new :: Algorithm -> IO Stemmer -- | Delete a stemmer instance. Don't use it after deleting. delete :: Stemmer -> IO () -- | Stem a word using the stemmer instance. stem :: Stemmer -> String -> IO String -- | Perform stemming using a wrapper handling the low-level creation and -- deletion of the stemmer instance. withStemmer :: Algorithm -> (Stemmer -> IO a) -> IO a instance Show Algorithm -- | Haskell bindings for the Snowball stemming library A pure -- stemming interface. Strings should use UTF-8 encoding. module NLP.Stemmer -- | Available algorithms. For English, English is recommended over -- Porter. data Algorithm Danish :: Algorithm Dutch :: Algorithm English :: Algorithm Finnish :: Algorithm French :: Algorithm German :: Algorithm Hungarian :: Algorithm Italian :: Algorithm Norwegian :: Algorithm Portuguese :: Algorithm Romanian :: Algorithm Russian :: Algorithm Spanish :: Algorithm Swedish :: Algorithm Turkish :: Algorithm Porter :: Algorithm -- | Stem a word stem :: Algorithm -> String -> String -- | Stem a list of words, more efficient than map stem stemWords :: Algorithm -> [String] -> [String]