# Cities spell checker

**URL:** <https://www.ruby-forum.com/t/cities-spell-checker/190490>\
**Category:** Rails\
**Created:** [June 21, 2010, 1:58pm UTC](https://www.ruby-forum.com/t/cities-spell-checker/190490 "2010-06-21T13:58:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rorra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/df788c/32.png) [@rorra](https://www.ruby-forum.com/u/rorra)\
**Post date:** [June 21, 2010, 1:58pm UTC](https://www.ruby-forum.com/t/cities-spell-checker/190490/1 "2010-06-21T13:58:48Z")

</div>

I’m totally lost with this feature so I wanted to ask to the community  
for some links in order to implement this feature

I’m trying to make a city spell checker (actually a spell checker that  
will work for anything at all that I have in the database)

So I.e. if I have in my database these two cities:

hollywood  
bollywood

and the user writes and submit:

collywood

I want to show him something like?

Did you wanted to say any of these?

hollywood  
bollywood

Can anyone point me in the right direction?

Thank you

---

<div class="post-metadata">

**Author:** ![rorra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/df788c/32.png) [@rorra](https://www.ruby-forum.com/u/rorra)\
**Post date:** [June 21, 2010, 2:05pm UTC](https://www.ruby-forum.com/t/cities-spell-checker/190490/2 "2010-06-21T14:05:53Z")

</div>

try auto complete that may help full for user .  
something llike this [GitHub - rails/auto\_complete: NOTICE: official repository moved to https://github.com/david-kerins/auto\_complete](http://github.com/rails/auto_complete)

On Mon, Jun 21, 2010 at 5:28 PM, Rodrigo D.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:

> To post to this group, send email to removed\_email\_address@domain.invalid.  
> To unsubscribe from this group, send email to  
> removed\_email\_address@domain.invalid[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> .  
> For more options, visit this group at  
> [http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).

–  
Thanks:  
Rajeev sharma

---

<div class="post-metadata">

**Author:** ![rorra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/df788c/32.png) [@rorra](https://www.ruby-forum.com/u/rorra)\
**Post date:** [June 21, 2010, 2:13pm UTC](https://www.ruby-forum.com/t/cities-spell-checker/190490/3 "2010-06-21T14:13:07Z")

</div>

Hi, thanks for the tip, but I already have implemented the autocomplete  
for that field

However, my client asked me to let the user to go on without selecting a  
city from the autocomplete, and if that happens, then show him a screen  
with possible matches for what he wrote, so I’m trying to know what the  
people use for doing that

Thank you

kannav rajeev wrote:

> try auto complete that may help full for user .  
> something llike this [GitHub - rails/auto\_complete: NOTICE: official repository moved to https://github.com/david-kerins/auto\_complete](http://github.com/rails/auto_complete)
> 
> On Mon, Jun 21, 2010 at 5:28 PM, Rodrigo D.  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:
> 
> > To post to this group, send email to removed\_email\_address@domain.invalid.  
> > To unsubscribe from this group, send email to  
> > removed\_email\_address@domain.invalid[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> > .  
> > For more options, visit this group at  
> > [http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).
> 
> –  
> Thanks:  
> Rajeev sharma

---

<div class="post-metadata">

**Author:** ![rorra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/df788c/32.png) [@rorra](https://www.ruby-forum.com/u/rorra)\
**Post date:** [June 21, 2010, 2:55pm UTC](https://www.ruby-forum.com/t/cities-spell-checker/190490/4 "2010-06-21T14:55:39Z")

</div>

On Jun 21, 1:13 pm, Rodrigo D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi, thanks for the tip, but I already have implemented the autocomplete  
> for that field
> 
> However, my client asked me to let the user to go on without selecting a  
> city from the autocomplete, and if that happens, then show him a screen  
> with possible matches for what he wrote, so I’m trying to know what the  
> people use for doing that

I once did something similar using raspell (ruby bindings for aspell).  
You can supply custom dictionaries, one containing just the list of  
cities you know about should do the trick

Fred

---

<div class="post-metadata">

**Author:** ![rorra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/df788c/32.png) [@rorra](https://www.ruby-forum.com/u/rorra)\
**Post date:** [June 22, 2010, 12:15am UTC](https://www.ruby-forum.com/t/cities-spell-checker/190490/5 "2010-06-22T00:15:56Z")

</div>

Frederick C. wrote:

> On Jun 21, 1:13ï¿½pm, Rodrigo D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Hi, thanks for the tip, but I already have implemented the autocomplete  
> > for that field
> > 
> > However, my client asked me to let the user to go on without selecting a  
> > city from the autocomplete, and if that happens, then show him a screen  
> > with possible matches for what he wrote, so I’m trying to know what the  
> > people use for doing that
> 
> I once did something similar using raspell (ruby bindings for aspell).  
> You can supply custom dictionaries, one containing just the list of  
> cities you know about should do the trick
> 
> Fred  
> Great, now I know what to implement in order to implement this feature

Thank you so much 🙂
