cookbook-2.1.2.1: Tiered general-purpose libraries with domain-specific applications.

PortabilityPortable (Cookbook)
StabilityStable
Maintainernathanpisarski@gmail.com
Safe HaskellSafe-Inferred

Cookbook.Ingredients.Lists.Stats

Description

Library for determining mathematically whether two lists are similar.

Synopsis

Documentation

frequency :: Eq a => [a] -> [(a, Int)]Source

Creates a list with the frequency of elements in a list.

mostFrequent :: Eq a => [a] -> Int -> [a]Source

Returns the x-amount of most frequent elements in a list. If there is a tie, the order it appears in a list takes precedence.

wordscore :: Eq a => [a] -> [a] -> DoubleSource

Provides a mathematical score out of 1 based on the similarities between the two words. This is freqScore, but it takes into account length.

freqScore :: Eq a => [a] -> [a] -> DoubleSource

Provides a frequency score between two lists.