levenshtein

package
v1.7.9 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package levenshtein includes the levenshtein distance algorithm plus additional helper functions. The algorithm is taken from https://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#Go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Distance

func Distance(a, b string, caseSensitive bool) int

Distance returns the Lewenshtein distance.

func MinString added in v1.6.7

func MinString[S ~[]E, E any](x S, fn func(a E) string, s string, caseSensitive bool) (rv string)

MinString returns the string attribute determined by fn out of x with the minimal Lewenshtein distance to s.

Types

This section is empty.

Jump to

Keyboard shortcuts

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