- type Leafs
- type PlainLeaf
- type Trie
type Leafs *PlainLeaf
func LoadFromFile ¶
LoadFromFile loads a gib encoded wordlist from a file and creates a new Trie by Add()ing all of them.
func New() *Trie
NewTrie returns the pointer to a new Trie with an initialized root Branch
Find returns all entries of the Trie that have the given prefix with their counts as Leaf sorted by weights
func (*Trie) FindFirstN ¶
FindFirstN returns first N results for given prefix sorted by weights
func (*Trie) SaveToFile ¶
SaveToFile dumps all values into a slice of strings and writes that to a file using encoding/gob.
The Trie itself can currently not be encoded directly because gob does not directly support structs with a sync.Mutex on them.