Documentation
¶
Overview ¶
Package lang holds a small embedded English language model used to score candidate plaintexts during cipher solving (e.g. the monoalphabetic substitution hill-climb). The model is built at init from an embedded public-domain English corpus (corpus.txt) — no network, no external data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FreqOrder ¶
func FreqOrder() []int
FreqOrder returns the 26 letter indices ordered from most to least frequent in the corpus. Used to seed a frequency-matched starting key.
func LetterIndex ¶
Letters maps a byte to a 0..25 letter index, or -1 for non-letters (case-folded).
Types ¶
Click to show internal directories.
Click to hide internal directories.