Subject Re: [firebird-support] Hypothetical near-match search
Author Kjell Rilbe
Nigel Weeks wrote:

>>2.) You will need some way to classify (score, relevance,
>>etc.) the search result.
> Hmm. Relevance...Possible a Levenstein distance between the search term, and
> resultant words?...

I missed the start of this thread due to some e-mail problems, but I'm
very intreseted in what might come out of it.

About a year ago I investigated approximate matching a bit and tried to
augment the Levenstein distance (or something similar) to include these

- add char (ab->acb)
- remove char (abc->ac)
- change char (a->b)
- swap chars (ab->ba)

It's the swap that I wanted to add. It wasn't all that difficult - I
have a working(?) implementation in D7. But only the actual distance
calculation mind you - nothing adapted for FB.

I also wanted to create a similar algorithm but for phonetic matching in
some way. SoundEx and similar algorithms are too weak. I would need to
include all sounds in the strings but make mismatches in similar sounds,
e.g. "g" and "k", have low weight in the comparison.

Who started the thread? Could you keep me posted on your progress?

Kjell Rilbe
Adressmarknaden AM AB
E-post: kjell.rilbe@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64