From d8783c512e3c90c705ce61a225df39f962db9ab3 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Tue, 7 Aug 2001 16:47:43 +0000 Subject: Per this discussion, here's a patch to implement both levenshtein() and metaphone() in a contrib. There seem to be a fair number of different approaches to both of these algorithms. I used the simplest case for levenshtein which has a cost of 1 for any character insertion, deletion, or substitution. For metaphone, I adapted the same code from CPAN that the PHP folks did. A couple of questions: 1. Does it make sense to fold the soundex contrib together with this one? 2. I was debating trying to add multibyte support to levenshtein (it would make no sense at all for metaphone), but a quick search through the contrib directory found no hits on the word MULTIBYTE. Should worry about adding multibyte support to levenshtein()? Joe Conway --- contrib/README | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'contrib/README') diff --git a/contrib/README b/contrib/README index 2e071e2f83..5823520c0f 100644 --- a/contrib/README +++ b/contrib/README @@ -55,6 +55,10 @@ fulltextindex - Full text indexing using triggers by Maarten Boekhold +fuzzystrmatch - + Levenshtein and Metaphone fuzzy string matching + by Joe Conway + intarray - Index support for arrays of int4, using GiST by Teodor Sigaev and Oleg Bartunov -- cgit v1.2.1