From: | "Joe Conway" <joseph(dot)conway(at)home(dot)com> |
---|---|
To: | <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: Fuzzy matching |
Date: | 2001-08-03 20:00:52 |
Message-ID: | 025b01c11c57$00280600$48d210ac@jecw2k1 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches pgsql-sql |
> > Our usual practice with stuff of uncertain usefulness has been to
> > stick
> > it in contrib for awhile and see if anyone uses it. If there's
> > sufficient interest, we'll promote it to mainstream in a future
> > release.
>
> Makes sense to me. Go, Joe!
>
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()?
Thanks,
Joe
Attachment | Content-Type | Size |
---|---|---|
fuzzystrmatch.diff | application/octet-stream | 26.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-08-03 21:08:51 | Re: Re: Fuzzy matching |
Previous Message | Bruce Momjian | 2001-08-03 17:50:51 | Re: Current cvs does not compile jdbc1 driver |
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Ruprecht | 2001-08-03 21:00:37 | Feature Requests for 7.2 or 7.3 ... |
Previous Message | rocael | 2001-08-03 18:19:54 | Re: [Re: `postgresql.conf' has wrong permissions??? ] |