QGram
Q-gram distance, as defined by Ukkonen in Approximate string-matching with q-grams and maximal matches. The distance between two strings is defined as the L1 norm of the difference of their profiles (the number of occurrences of each n-gram).
Q-gram distance is a lower bound on Levenshtein distance, but can be computed in O(m+n), where Levenshtein requires O(m.n).
Parameters
k
length of k-shingles