Documentation ¶
Index ¶
- Constants
- type Group
- type Node
- type Trie
- func (tree *Trie) Add(word string) (no string)
- func (tree *Trie) AddRune(word []rune) (no string)
- func (tree *Trie) Del(word string)
- func (tree *Trie) DelRune(word []rune)
- func (tree *Trie) Filter(text string) string
- func (tree *Trie) FilterRune(text []rune) string
- func (tree *Trie) FindAll(text string) []*Group
- func (tree *Trie) FindIn(text string) (bool, string)
- func (tree *Trie) FindInGroup(text string) (bool, Group)
- func (tree *Trie) FindInReturnNo(text string) (bool, string, string)
- func (tree *Trie) FindRune(text []rune) (bool, Group)
- func (tree *Trie) FindRunes(text []rune) []*Group
- func (tree *Trie) Replace(text string, character rune) string
- func (tree *Trie) ReplaceRune(text []rune, character rune) string
- func (tree *Trie) Validate(text string) (bool, string)
- func (tree *Trie) ValidateReturnNo(text string) (bool, string, string)
- func (tree *Trie) ValidateRune(text []rune) (bool, Group)
Constants ¶
View Source
const (
Empty = ""
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Trie ¶
type Trie struct {
Root *Node
}
func (*Trie) FilterRune ¶ added in v1.5.5
func (*Trie) FindInReturnNo ¶ added in v1.1.29
FindInReturnNo 判断text中是否含有词库中的词
func (*Trie) ReplaceRune ¶ added in v1.5.5
func (*Trie) ValidateReturnNo ¶ added in v1.1.29
ValidateReturnNo 验证字符串是否合法,如不合法则返回false和检测到 的第一个敏感词
Click to show internal directories.
Click to hide internal directories.