Documentation
¶
Index ¶
- type AssignDebug
- type Counter
- func (c *Counter) Assign(input string)
- func (c *Counter) Close()
- func (c *Counter) Counts() map[string]int
- func (c *Counter) WithDebugChannel(debugChannel chan *AssignDebug) *Counter
- func (c *Counter) WithIgnoreAssign(r []*regexp.Regexp) *Counter
- func (c *Counter) WithRejectAssign(r []*regexp.Regexp) *Counter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssignDebug ¶
type AssignDebug struct {
Input, MaskedInput string
Rejected bool
BestMatch, BestMatchMasked string
BestMatchScore float32
BestMatchAccepted bool
}
AssignDebug contains details about every match processed
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
Counter accepts strings and groups similar strings together, based on input parameters
func NewCounter ¶
NewCounter a new Counter. `step` represents the size of substrings used when building the tree-like index. `scoreThreshold` is a value between 0.0 and 1.0, where 1.0 represents a perfect match. A match must have a score above the threshold to be matched. The match with the highest score in the candidate set is always chosen.
func (*Counter) WithDebugChannel ¶ added in v0.1.1
func (c *Counter) WithDebugChannel(debugChannel chan *AssignDebug) *Counter
WithDebugChannel returns a Counter which will pass AssignDebug to the passed in channel for debug/tuning purposes
func (*Counter) WithIgnoreAssign ¶ added in v0.1.1
WithIgnoreAssign returns a Counter which will ignore the targeted contents of assignments matching all regex