Data.Elocrypt.Trigraph

Description

Generate a letter frequency trigraph, based on a dictionary

Synopsis

# Documentation

Arguments

 :: String The two letter prefix -> Maybe [(Char, Rational)]

Search for the character frequencies and return a weighted list

Search for the character frequencies based on the first a two-letter string

defaultFrequencies :: [Rational] -> [Rational] Source #

Fix frequencies if they are all 0, since MonadRandom prohibits this. In this case, use all 1s to give every item an equal weight

frequencies :: [(String, [Rational])] Source #

A map of character frequencies, based on a dictionary. The key is a two-letter string, and the value is a list of probabilities (a-z). It's form is:

[("aa", [2,0,3,0,0,0,1,0,0,0,0,1,1,1,0,0,0,3,2,0,0,0,0,0,0,0]),
...
("zz", [7,0,0,0,1,0,0,0,7,0,0,17,0,0,2,0,0,0,0,0,0,0,1,0,5,0])]