strsim

package module
v0.0.0-...-ef9ead4 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2019 License: MIT Imports: 2 Imported by: 1

README

strsim

String Similarity library

Provides a number of string similarty metrics. Each of them has the signature

function(a,b string) float64

an return a value in [0.0..1.0] where 0.0 means "not similar at all" and 1.0 means "identical"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommonTrigrams

func CommonTrigrams(a, b string) float64

func JaroWinkler

func JaroWinkler(a, b string) float64

func LCS

func LCS(a, b string) float64

func Levenshein

func Levenshein(a, b string) float64

func ListSimilarity

func ListSimilarity(as, bs []string, f Comparer) float64

ListSimilarity compares all the as and bs and returns the max similarity

func StringCompare

func StringCompare(a, b string) float64

Types

type Comparer

type Comparer = func(a, b string) float64

func WrapNoCase

func WrapNoCase(f Comparer) Comparer

WrapNoCase take a comparer and returns a comparer that does a case insensitive comparison

Jump to

Keyboard shortcuts

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