Edit Distance

In information theory and computer science, the edit distance between two strings of characters generally refers to the Levenshtein distance. However, according to Nico Jacobs, “The term ‘edit distance’ is sometimes used to refer to the distance in which insertions and deletions have equal cost and replacements have twice the cost of an insertion”.

It may also refer to the whole class of string metrics that measure distance as the (weighted or unweighted) number of operations required to transform a string into another. There are several different ways to define an edit distance, depending on which edit operations are allowed: replace, delete, insert, transpose, and so on. There are algorithms to calculate its value under various definitions:

  • Hamming distance
  • Levenshtein distance (the most common definition, calculated by Hirschberg's algorithm or the Wagner–Fischer algorithm)
  • Damerau–Levenshtein distance
  • Jaro–Winkler distance

Famous quotes containing the words edit and/or distance:

    To a philosopher all news, as it is called, is gossip, and they who edit it and read it are old women over their tea.
    Henry David Thoreau (1817–1862)

    Her personality had an architectonic quality; I think of her when I see some of the great London railway termini, especially St. Pancras, with its soot and turrets, and she overshadowed her own daughters, whom she did not understand—my mother, who liked things to be nice; my dotty aunt. But my mother had not the strength to put even some physical distance between them, let alone keep the old monster at emotional arm’s length.
    Angela Carter (1940–1992)