snowberry

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2024 License: MIT Imports: 3 Imported by: 0

README

Snowberry

A package that can group strings by similarity.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssignDebug

type AssignDebug struct {
	CounterID                  string
	Input, MaskedInput         string
	Weight                     int
	BestMatch, BestMatchMasked string
	BestMatchScore             float32
	BestMatchAccepted          bool
}

type Counter

type Counter struct {
	// contains filtered or unexported fields
}

func NewCounter

func NewCounter(
	step int,
	scoreThreshold float32,
	removeRegex, rejectRegex []*regexp.Regexp,
	debugChannel chan *AssignDebug,
) *Counter

func (*Counter) Assign

func (c *Counter) Assign(s string)

func (*Counter) Close

func (c *Counter) Close()

Close closes the debug channel, no-op if not set

func (*Counter) Counts

func (c *Counter) Counts() map[string]int

func (*Counter) WeightedAssign

func (c *Counter) WeightedAssign(input string, w int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL