Documentation ¶
Index ¶
- Constants
- Variables
- func Reverse(s string) string
- type AhoCorasick
- func (ac *AhoCorasick) Add(keyword string) int
- func (ac *AhoCorasick) Close() error
- func (ac *AhoCorasick) Debug()
- func (ac *AhoCorasick) Find(text string) []string
- func (ac *AhoCorasick) Flush()
- func (ac *AhoCorasick) Info() *AhoCorasickInfo
- func (ac *AhoCorasick) Remove(keyword string) int
- func (ac *AhoCorasick) Suggest(input string) []string
- type AhoCorasickArgs
- type AhoCorasickInfo
Constants ¶
View Source
const ( KeywordKey = "%s:keyword" PrefixKey = "%s:prefix" SuffixKey = "%s:suffix" OutputKey = "%s:output" NodeKey = "%s:node" )
Key type constants
Variables ¶
View Source
var (
RedisAlreadyClosed = errors.New("redis client was already closed")
)
Functions ¶
Types ¶
type AhoCorasick ¶
type AhoCorasick struct {
// contains filtered or unexported fields
}
func Create ¶
func Create(args *AhoCorasickArgs) *AhoCorasick
func (*AhoCorasick) Add ¶
func (ac *AhoCorasick) Add(keyword string) int
func (*AhoCorasick) Close ¶
func (ac *AhoCorasick) Close() error
func (*AhoCorasick) Debug ¶
func (ac *AhoCorasick) Debug()
func (*AhoCorasick) Find ¶
func (ac *AhoCorasick) Find(text string) []string
func (*AhoCorasick) Flush ¶
func (ac *AhoCorasick) Flush()
func (*AhoCorasick) Info ¶
func (ac *AhoCorasick) Info() *AhoCorasickInfo
func (*AhoCorasick) Remove ¶
func (ac *AhoCorasick) Remove(keyword string) int
func (*AhoCorasick) Suggest ¶
func (ac *AhoCorasick) Suggest(input string) []string
type AhoCorasickArgs ¶
type AhoCorasickInfo ¶
Click to show internal directories.
Click to hide internal directories.