strcmp

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JaroWinkler

func JaroWinkler(a, b string) float64

JaroWinkler is a more accurate version of the Jaro algorithm. It works by boosting the score of exact matches at the beginning of the strings. By doing this, Winkler says that typos are less common to happen at the beginning.

For this to happen, it introduces two more parameters: the boostThreshold and the prefixSize. These are commonly set to 0.7 and 4, respectively.

From: https://godoc.org/github.com/xrash/smetrics

func Levenshtein

func Levenshtein(a, b string) float64

Levenshtein is the "edit distance" between two strings. This is the count of operations (insert, delete, replace) needed for two strings to be equal.

func Soundex

func Soundex(a, b string) float64

Soundex is a phonetic algorithm that considers how the words sound in english. Soundex maps a name to a 4-byte string consisting of the first letter of the original string and three numbers. Strings that sound similar should map to the same thing.

Retruned is Hamming computed over both phonetic outputs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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