Robert Haas wrote: > And the underlying Levenshtein implementation is here: > > https://github.com/git/git/blob/398dd4bd039680ba98497fbedffa415a43583c16/levenshtein.c > > Apparently what they're doing is charging 0 for a transposition (which > we don't have as a separate concept), 2 for a substitution, 1 for an > insertion, and 3 for a deletion, with the constraint that anything > with a total distance of more than 6 isn't considered.
0 for a transposition, wow. I suggested adding transpositions but there was no support for that idea. I suggested it because I thikn it's the most common form of typo, and charging 2 for a deletion plus 1 for an insertion makes a single transposition mistaek count as 3, which seems wrong -- particularly seeing the git precedent. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers