glider-nlp-0.1: Natural Language Processing library

Portabilityportable
Stabilityalpha
MaintainerKrzysztof Langner <klangner@gmail.com>
Safe HaskellSafe-Inferred

Glider.NLP.Statistics

Description

This module counts different statistics on the text

Synopsis

Documentation

countWords :: Text -> IntSource

Count number of words in the text.

 countWords (T.pack "one two three") == 3

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

Count word frequency

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