Versions in this module Expand all Collapse all v0 v0.0.1 Mar 5, 2025 Changes in this version + type Filter struct + func New() *Filter + func (filter *Filter) AddWord(words ...string) + func (filter *Filter) DelWord(words ...string) + func (filter *Filter) Filter(text string) string + func (filter *Filter) FindAll(text string) []string + func (filter *Filter) FindIn(text string) (bool, string) + func (filter *Filter) Load(rd io.Reader) error + func (filter *Filter) LoadNetWordDict(url string) error + func (filter *Filter) LoadWordDict(path string) error + func (filter *Filter) RemoveNoise(text string) string + func (filter *Filter) Replace(text string, repl rune) string + func (filter *Filter) UpdateNoisePattern(pattern string) + func (filter *Filter) Validate(text string) (bool, string) + type Node struct + Character rune + Children map[rune]*Node + func NewNode(character rune) *Node + func NewRootNode(character rune) *Node + func (node *Node) IsLeafNode() bool + func (node *Node) IsPathEnd() bool + func (node *Node) IsRootNode() bool + func (node *Node) SoftDel() + type Trie struct + Root *Node + func NewTrie() *Trie + func (tree *Trie) Add(words ...string) + func (tree *Trie) Del(words ...string) + func (tree *Trie) Filter(text string) string + func (tree *Trie) FindAll(text string) []string + func (tree *Trie) FindIn(text string) (bool, string) + func (tree *Trie) Replace(text string, character rune) string + func (tree *Trie) Validate(text string) (bool, string)