October 2006
Intermediate to advanced
888 pages
16h 55m
English
The concept of distance between strings is important in inductive learning (AI), cryptography, proteins research, and in other areas.
The Levenshtein distance is the minimum number of modifications needed to change one string into another, using three basic modification operations: del(-etion), ins(-ertion), and sub(-stitution). A substitution is also considered to be a combination of a deletion and insertion (indel).
There are various approaches to this, but we will avoid getting too technical. Suffice it to say that this Ruby implementation (in Listing 2.2) allows you to provide optional parameters to set the cost for the three types of modification operations and defaults to a ...
Read now
Unlock full access