fingerprinter

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	LogLevelPlaceHolder   = "<Loglevel>"
	IdentifierPlaceHolder = "<Identifier>"
)

Variables

This section is empty.

Functions

func NewFingerprinter

func NewFingerprinter(opts ...Option) *fingerprinterImpl

Types

type Fingerprinter

type Fingerprinter interface {
	IsWord(word string) bool
	Fingerprint(input string) (fingerprint int64, tokens *TokenMap, level string, js map[string]any, err error)
	TokenizeInput(input string) (*TokenMap, string, map[string]any, error)
	Tokenize(input string) (*TokenMap, string, error)
}

type Option added in v0.4.1

type Option func(*fingerprinterImpl)

func WithMaxTokens added in v0.4.1

func WithMaxTokens(maxlen int) Option

type TokenMap added in v0.4.25

type TokenMap struct {
	TMap  map[int]string
	Items []string
	// contains filtered or unexported fields
}

func (*TokenMap) Get added in v0.4.25

func (tm *TokenMap) Get(index int) string

func (*TokenMap) Put added in v0.4.25

func (tm *TokenMap) Put(replacement string, orig string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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