fingerprinter

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFingerprinter

func NewFingerprinter(opts ...Option) *fingerprinterImpl

Types

type ClusterManager added in v0.4.2

type ClusterManager struct {
	Clusters []MessageCluster
	// contains filtered or unexported fields
}

func (*ClusterManager) Cluster added in v0.4.2

func (cm *ClusterManager) Cluster(messages []*Message, threshold float64) (map[string]string, map[string]string)

type Fingerprinter

type Fingerprinter interface {
	IsWord(word string) bool
	Fingerprint(input string) (fingerprint int64, level string, err error)
	TokenizeInput(input string) (string, string, error)
	Tokenize(input string) (string, string, error)
}

type Message added in v0.4.2

type Message struct {
	Text        string
	Fingerprint string
}

type MessageCluster added in v0.4.2

type MessageCluster struct {
	Fingerprint string
	Messages    []*Message
}

type Option added in v0.4.1

type Option func(*fingerprinterImpl)

func WithMaxTokens added in v0.4.1

func WithMaxTokens(maxlen int) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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