levenshtein

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

Package levenshtein provides functions for calculating Levenshtein distances.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DistancePhrases

func DistancePhrases(s, t []string) int

DistancePhrases returns the Levenshtein distance between the two string slices.

func DistancePhrasesReuseSlice

func DistancePhrasesReuseSlice(x, y []string, d []int) (int, []int)

DistancePhrasesReuseSlice is like DistancePhrases, but reuses the distance slice.

func DistanceWordsMax

func DistanceWordsMax(a, b string, k int) int

DistanceWordsMax returns k-bounded Levenshtein distance between a and b.

func DistanceWordsMax2

func DistanceWordsMax2(a, b string) int

DistanceWordsMax2 returns 2-bounded Levenshtein distance between a and b.

func DistanceWordsMaxReuseSlice

func DistanceWordsMaxReuseSlice(a, b string, k int, d []int) (int, []int)

DistanceWordsMaxReuseSlice is like DistanceWordsMax, but reuses the distance slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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