The EditDistance structure
Author: John Reppy
Keywords: Standard ML, SML, SML/NJ Library

The SML of NJ Library
The `EditDistance` structure

The `EditDistance` structure computes the "optimal string alignment" (or Levenshtein) distance between two strings.

## Synopsis

    structure EditDistance

## Interface

    val distance : string * string -> int

## Description

`val distance : string * string -> int`

  `distance (s1, s2)` returns the number of edit operations required to make the two strings equal. Edit operations include deleting a character, inserting a character, replacing a character with another, and swapping two adjacent characters.

## See Also

The Util Library, Wikipedia article on Damerau-Levenshtein distance

SML/NJ Version 110.99.6 (September 19, 2024)
Last updated 2024-09-18 22:36:43 UTC