SupremeA SupremeA - 1 year ago 81
Ajax Question

Finding name variations from large list Ruby

I have a large list of words maybe 300-600 words and I want to make it so that as my user begins typing in a word the app suggest words that it found from my specific list that are close to the spelling that person is giving. Kind of like auto-complete but the list of words is dynamic and specific to that user. Any gems or techniques suggestions on how I can accomplish this?

Answer Source

If you want to do it in ruby you could use a fuzzy match algorithm, like the one used in this gem check the example:

>>['seamus', 'andy', 'ben']).find('Shamus')
=> "seamus"
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download