From: Oleg Bartunov <oleg@sai.msu.su>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: Joe Conway <joseph.conway@home.com>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: pgsql-sql@postgresql.org
Subject: Re: Fuzzy matching?
Date: Thu, 2 Aug 2001 19:16:29 +0300 (GMT)
Message-ID: <Pine.GSO.4.33.0108021911500.27718-100000@ra.sai.msu.su> (raw)
In-Reply-To: <24625.996610191@sss.pgh.pa.us>
I have C-codes which implement Levenstein Distance Algorithms
Here is a header for soe info:
// Levenstein Distance Algorithms Module
//
// Contains functions to do "Inexact Alphanumeric Comparisons". The original
// concept for this code came from "The C Users Journal", May 1991, starting
// on page 127. The author was Hans Z. Zwakenberg.
//
// These routines have been modified so they do not need to use double
// subscripted arrays in the CUJ code. An additional function was created to
// "look up" a word from a list, returning the most likely matches.
//
// Written initailly by R. Bruce Roberts, MCI Systems Engineering, 1/7/93
// Compiled with Borland C++, V3.1
//
It's compiled and works well. Don't know about license but it's published
and it's possible to ask author directly
zen:~/app/algo/dist/ldist$ ./test simple sample
Returns 'Levenstein Distance' of two strings on command line.
Determining Distance for simple and sample.
Length is limited to 40 characters.
Words are alike, L Distance is 1, Threshold was 3.
PLease let me know if you need it. I thought about implementing the
same feature as Google has into our OpenFTS search
Regards,
Oleg
On Tue, 31 Jul 2001, Tom Lane wrote:
> "Josh Berkus" <josh@agliodbs.com> writes:
> > I'm quite interested, myself. How difficult is it for somebody that
> > doesn't program C to attach a function from the Contrib directory?
>
> Run the install script.
>
> > If it's not very difficult, then I'd recommend putting metaphone in
> > /contrib, and levenstein in the backend. My reasoning is that
> > levenstein is useful for all roman alphabets, but metaphone is not so
> > useful for non-english versions of postgres.
>
> 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.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://www.postgresql.org/search.mpl
>
Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: oleg@sai.msu.su, tgl@sss.pgh.pa.us, josh@agliodbs.com, joseph.conway@home.com, pgman@candle.pha.pa.us
Subject: Re: Fuzzy matching?
In-Reply-To: <Pine.GSO.4.33.0108021911500.27718-100000@ra.sai.msu.su>
References: <24625.996610191@sss.pgh.pa.us> <Pine.GSO.4.33.0108021911500.27718-100000@ra.sai.msu.su>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox