levenshtein

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 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(caseSensitive bool, a, b string) int

Distance returns the Lewenshtein distance.

func MinDistance

func MinDistance(caseSensitive bool, l []string, s string) (rv string)

MinDistance returns the string out of string list l with the minimal Lewenshtein distance.

Types

This section is empty.

Jump to

Keyboard shortcuts

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