Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizeLatin1 ¶
NormalizeLatin1 lowercases, replaces codepoints beyond 255 with a space.
Types ¶
type Countdown ¶
type Countdown struct {
// contains filtered or unexported fields
}
Countdown represents a dictionary of words of some minimum and maximum length, and partitioned by length.
func NewCountdown ¶
NewCountdown creates a new Countdown search object.
func (*Countdown) AddDictionary ¶
AddDictionary adds words from a dictionary (io.Reader interface) to the database.
func (*Countdown) AddDictionaryFile ¶
AddDictionaryFile adds lines from a file to the database.
type CountdownSearchEntry ¶
type CountdownSearchEntry struct {
// contains filtered or unexported fields
}
CountdownSearchEntry represents a single word.
func NewCountdownSearchEntry ¶
func NewCountdownSearchEntry(word string) CountdownSearchEntry
NewCountdownSearchEntry takes a word and generates a search-entry from it.
type CountdownWords ¶
type CountdownWords struct {
// contains filtered or unexported fields
}
CountdownWords represents a set of search words of the same length.
func NewCountdownWords ¶
func NewCountdownWords() CountdownWords
NewCountdownWords creates a new Countdown words database
func (*CountdownWords) Add ¶
func (cdw *CountdownWords) Add(se CountdownSearchEntry)
Add a search entry to the database.
type FindWordsResult ¶
type FindWordsResult struct { Query string Words []WordDistResult NumChecked int NumHits int NumFalseBits int NumInvalid int NumDistFail int }
FindWordsResult is a result-set returned by FindWords
func NewFindWordsResult ¶
func NewFindWordsResult(capacity int) FindWordsResult
NewFindWordsResult creates and initializes a new result-set
func (*FindWordsResult) Sort ¶
func (result *FindWordsResult) Sort() []WordDistResult
Sort on word distance and sub-sort on word length
type WordDistResult ¶
WordDistResult represents words and their distance to the sought word.