similarity

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2020 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StringToBytes

func StringToBytes(s string) (b []byte)

Types

type Compare

type Compare func(s1, s2 string) float64

type DiceCoefficient

type DiceCoefficient struct {
	Ngram int
	// contains filtered or unexported fields
}

func (*DiceCoefficient) CompareAscii

func (d *DiceCoefficient) CompareAscii(s1, s2 string) float64

func (*DiceCoefficient) CompareUtf8

func (d *DiceCoefficient) CompareUtf8(s1, s2 string) float64

type EditDistance

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

func (*EditDistance) CompareAscii

func (e *EditDistance) CompareAscii(s1, s2 string) float64

ascii

func (*EditDistance) CompareUtf8

func (e *EditDistance) CompareUtf8(utf8Str1, utf8Str2 string) float64

utf8

type Hamming

type Hamming struct{}

func (*Hamming) CompareAscii

func (h *Hamming) CompareAscii(s1, s2 string) float64

func (*Hamming) CompareUtf8

func (h *Hamming) CompareUtf8(utf8Str1, utf8Str2 string) float64

type Jaro

type Jaro struct {
	MatchWindow int
	// contains filtered or unexported fields
}

func (*Jaro) CompareAscii

func (j *Jaro) CompareAscii(s1, s2 string) float64

func (*Jaro) CompareUtf8

func (j *Jaro) CompareUtf8(s1, s2 string) float64

type Match

type Match struct {
	S     string
	Score float64
}

type MatchResult

type MatchResult struct {
	AllResult []*Match
	Match     *Match
	BestIndex int
}

Jump to

Keyboard shortcuts

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