This method calculates Levenshtein distance between two strings. In information theory and computer science, the Levenshtein distance is a metric for measuring the amount of difference between two sequences (called edit distance). The Levenshtein distance between two strings is given by minimum number of operations needed to transform one string into another given string, where possible operations are insertion, deletion, or substitution of a single character. The Levenshtein distance algorithm has been used in: * Spell checking * Speech recognition * DNA analysis * plagiarism detection
The complexity of the algorithm is O(mXn), where n and m are the length of string1 and string2.
How to use
First you must to include the JS files in the head of your HTML document.