Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Trie ¶
type Trie interface { Filter(text string) (string, []string, bool) FindKeywords(text string) []string }
A Trie is a tree implementation that used to find elements rapidly.
type TrieOption ¶
type TrieOption func(trie *trieNode)
TrieOption defines the method to customize a Trie.
func WithMask ¶
func WithMask(mask rune) TrieOption
WithMask customizes a Trie with keywords masked as given mask char.
func WithSkip ¶
func WithSkip(skip []rune) TrieOption
Click to show internal directories.
Click to hide internal directories.