trie

package
v0.1.67 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Trie

type Trie struct {
	// contains filtered or unexported fields
}

Trie defines an N-ary tree where a dictionary is loaded character by character into a new descendant.

func New

func New() *Trie

New creates a new dictionary trie.

func (*Trie) AddDictionary

func (t *Trie) AddDictionary(r io.Reader) error

AddDictionary adds a dictionary to the trie.

func (*Trie) AddWord

func (t *Trie) AddWord(word string)

AddWord adds a word to the trie.

func (*Trie) CheckWord

func (t *Trie) CheckWord(word string) bool

CheckWord sees if the word exists in the trie.

Jump to

Keyboard shortcuts

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