Skip to content

klangner/glider-nlp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hackage

Glider NLP

glider-nlp is Haskell library for processing natural language.

Installation

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

Usage

Count number of words in the document

import Glider.NLP.Statistics

doc <- readDocument "samples/haskell.txt"
countWords (docText doc)

Get word frequency in the document

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.

About

NLP library for Haskell

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published