dictionary

package module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 6 Imported by: 0

README

Dictionary

Dictionary codecov Go Report Card Go Reference

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

func (Dictionary) String

func (l Dictionary) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL