Visitar URL original
GitHub - klangner/glider-nlp: NLP library for Haskell · GitHub
Skip to content

About

NLP library for Haskell

Resources

Stars

8 stars

Watchers

2 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

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

Stars

8 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages