Documentation
¶
Index ¶
Constants ¶
View Source
const SPLIT_FLAG = "|"
View Source
const VERSION = "v1.0.0"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) EditUserDict ¶
rpc handler 修改用户词典内容
func (*App) FindKeyWords ¶
rpc handler 根据文本查找关键词
func (*App) GetUserDict ¶
rpc handler 获取用户词典内容
type Dict ¶
type Dict struct {
//默认脏词库
DefaultDictDataPath string
//自定义脏词库
UserDictDataPath string
MaxWordLength int
//trie 树
Trie *Trie
sync.RWMutex
}
字典
func (*Dict) FindKeyWords ¶
从文本中找出 所有关键词 采用正向最大匹配算法
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
grpc_client
command
|
|
|
word_filter
command
|
|
|
pb
|
|
|
word_filter
Package word_filter is a generated protocol buffer package.
|
Package word_filter is a generated protocol buffer package. |
Click to show internal directories.
Click to hide internal directories.