glider-nlp is Haskell library for processing natural language.
The library can be installed from Hackage with the command:
cabal install glider-nlp
or build from the source
stack setup
stack build
stack test
import Glider.NLP.Statistics
doc <- readDocument "samples/haskell.txt"
countWords (docText doc)
import Data.Text
import Glider.NLP.Statistics
countWordsExample :: IO Int
countWordsExample = do
doc <- readDocument "haskell.txt"
return $ countWords (docText doc)
wordFreqExample :: IO [(Text, Int)]
wordFreqExample = do
doc <- readDocument "haskell.txt"
return $ wordFreq (docText doc)
This is alpha version of the library. It means that the API can change in the next releases.