Lably
Skip to content

Edit distance

Computer science metric of string similarity

  • 7 min read
  • 5 chapters

Related on Lably

Through Computer science, String (computer science) and Natural language processing

Different definitions of an edit distance use different sets of like operations. Levenshtein distance operations are the removal, insertion, or substitution of a character in the string. Being the most common metric, the term Levenshtein distance is often used interchangeably with edit distance.

Types of edit distance

Different types of edit distance allow different sets of string operations. For instance:

Some edit distances are defined as a parameterizable metric calculated with a specific set of allowed edit operations, and each operation is assigned a cost (possibly infinite). This is further generalized by DNA sequence alignment algorithms such as the Smith–Waterman algorithm, which make an operation's cost depend on where it is applied.

Sign in to keep reading

4 more chapters are free with a Lably account.

More in Computing and communication