For better-looking documentation, run haddock -h DX1.hs
.
Every line of a .dx1
file contains a word, its number of occurrences
(in the corpus it originates from), and its pronunciation (as a sequence
of phonemes). Typically, this data is encoded in the form of a
space-separated string. For example:
A 23310 AH0
AARON 8 EH1 R AH0 N
ABANDON 18 AH0 B AE1 N D AH0 N
ABANDONED 26 AH0 B AE1 N D AH0 N D
In the interest of robustness, this library supports tab-separation
between a word's name, count, and pronunciation, as well as both DOS
-
and UNIX
-style newlines.
Stores a word, its number of occurrences, and its phonemes.
- Eq DX1Entry
- Read DX1Entry
- Show DX1Entry
Sum the counts of each DX1Entry
in a list.
Pair each DX1Entry
in a list with its frequency.
O(nlog n). Sort each DX1Entry
in a list by its frequency.
Parses a .dx1
file to a list of DX1Entry
s (uses Parsec
internally).
O(nlog n). Parses a .dx1
file from stdin
or a given filename,
computes the frequency of each word, sorts by frequency in ascending
order, and prints the result.
Produced by Haddock version 2.11.0. Munged by Pandoc version 1.9.4.2. Cleaned by hand.