Posted by Joachim Weiί on 07/20/05 15:32
Bob Bedford schrieb:
> given the text "Batman socks" I've to find the best matching result in
> choices like:
> -"mickey socks"
> -"robin socks"
> -"batman black socks" ->this should be found
> -"batman wallet"
> -"batman"
....
The trick is that you use an algortihm that seeks the nearest difference
between two texts.
> Any idea ?
>
Use the 'levenshtein' function. However the Problem might be that you
have to go through your database sequentially.
I've programmed somthing for single words (to suggest oranges when
orangse are typed). In that case the soundex function did a lot of work
to get a smaller subset of the database.
I'm afraid that if the database is very large, the world will be saved
by a barefooted batman. Tasty!
Jo
> Bob
>
Navigation:
[Reply to this message]
|