Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dictionary ¶
type Dictionary struct {
// contains filtered or unexported fields
}
func NewDictionary ¶
func NewDictionary() *Dictionary
func (*Dictionary) Autocomplete ¶
func (d *Dictionary) Autocomplete(prefix string) []string
Autocomplete returns a slice of words gathered from the leaf nodes under the prefix node
func (*Dictionary) Collect ¶
func (d *Dictionary) Collect(prefix string) []string
Collect returns the dictionary as a sorted slice
func (*Dictionary) InsertWord ¶
func (d *Dictionary) InsertWord(word string)
InsertWord adds the word to the dictionary
func (*Dictionary) PopulateFromCSV ¶
func (d *Dictionary) PopulateFromCSV(file string) error
func (*Dictionary) Search ¶
func (d *Dictionary) Search(word string) bool
Search returns true if the given word is found in the trie
Click to show internal directories.
Click to hide internal directories.