levenshtein

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: GPL-3.0, MIT Imports: 0 Imported by: 0

Documentation

Overview

Package levenshtein is a Go implementation to calculate Levenshtein Distance.

Implementation taken from https://gist.github.com/andrei-m/982927#gistcomment-1931258

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeDistance

func ComputeDistance(s1, s2 []rune) int

ComputeDistance computes the levenshtein distance between the two strings passed as an argument. The return value is the levenshtein distance

Works on runes (Unicode code points) but does not normalize the input strings. See https://blog.golang.org/normalization and the golang.org/x/text/unicode/norm package. THE CALLER MUST MAKE SURE THAT: len(s1) <= len(s2)

Types

This section is empty.

Jump to

Keyboard shortcuts

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