> Yep. In the same way as 'bag', 'pack', 'back', 'poke' and 'pike' all
> become 'PK'. I think the accurracy of this particular phonetic
> algorithm is disputable.

true.. and had I not been introduced to guitar hero 2 this weekend I think I 
might have realized that myself. I haven't good success with the Soundex 
algorithm either. Metaphone seemed good at first but I think you've convinced 
me otherwise. 'Pike' and 'bag' should not be the same.

> You should in any case index the actual terms, because the metaphones
> alone would make exact matches impossible.
>
> If you use FuzzySearch, you don't need an extra field and you
> autmatically get a score based on how close the match is.
>
> Example:
>
> i = Ferret::I.new
>
> i << "quick"
> i << "quikc"
> i << "quack"
> i << "quake"
> i << "quark"
> i << "quid"
> i << "quiche"
>
> i.search_each("quikc~0.3") do |doc, score|
>    printf "%6s %1.2f\n", i[doc][:id], score
> end
>
>   quikc 0.88
>   quick 0.53
>   quake 0.53
>    quid 0.44
>   quack 0.35
>   quark 0.35
> quiche 0.35
>
> As you can see, the exact match ranks highest.

I think I'll try this approach first and add in a phonetic algorithm if 
necessary.

At least I discovered how to write filters for Ferret, which was much easier 
that I would have imagined.

Thanks for the information, is nice to learn a bit more about the things 
Ferret can already do so well.

Curtis
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to