glider-nlp-0.4: Natural Language Processing library

CopyrightCopyright (C) 2013-2016 Krzysztof Langner
LicenseBSD3
MaintainerKrzysztof Langner <klangner@gmail.com>
Stabilityalpha
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Glider.NLP.Statistics

Description

This module counts different statistics on the text

Synopsis

Documentation

countWords :: Text -> Int Source #

Count number of words in the text.

countWords "one two three" == 3

wordFreq :: Text -> [(Text, Int)] Source #

Count word frequency

wordFreq "one two, three one" == [("one", 2), ("two", 1), ("three", 1)]