Versions in this module Expand all Collapse all v1 v1.0.0 Oct 13, 2023 Changes in this version + func BasicSanitizer(s string) string + func Tokenize(input string, maxNgram int) (tokens []string) + type Match struct + Confidence float64 + Tag string + type Rule struct + Blocks []string + Excludes []string + Includes []string + Score int + Tag string + func NewRule(tag string) Rule + func (r Rule) Block(l ...string) Rule + func (r Rule) Exc(l ...string) Rule + func (r Rule) Inc(l ...string) Rule + type RuleGroup struct + Blocks []string + Excludes []string + Includes [][]string + Tag string + func NewRuleGroup(tag string) RuleGroup + func (g RuleGroup) Block(l ...string) RuleGroup + func (g RuleGroup) Exc(l ...string) RuleGroup + func (g RuleGroup) Inc(l ...string) RuleGroup + func (g RuleGroup) ToList() (l []Rule) + type RuleSet struct + func NewRuleSet() *RuleSet + func NewRuleSetFromList(rules []Rule) *RuleSet + func (t *RuleSet) Add(ruleOrGroup ...interface{}) + func (t *RuleSet) AddRule(rules ...Rule) + func (t *RuleSet) AddRuleGroup(ruleGroups ...RuleGroup) + func (t *RuleSet) Match(input string) []Match + func (t *RuleSet) MatchRules(input string) (rules []*Rule)