Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Approximate string matching in Ruby

I am implementing user search functionality in my Rails application. I want the application to suggest the correct spellings if the user makes a mistake in typing the spelling. Is there any plugin for this in ruby. Can this be done in sql?

Regards, Pankaj

like image 549
Pankaj Avatar asked Feb 19 '26 11:02

Pankaj


1 Answers

It looks like hunspell gem is there to help you. It requires some external dependencies so it's not pure Ruby. But according to this readme it seem to be exactly what you are looking for.

Alternatively, you can try BOSSMan. It looks like it spell checks via Yahoo.

like image 154
detunized Avatar answered Feb 21 '26 06:02

detunized



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!