As I'm sure some of you have figured out I'm trying to build a slightly more intellegent search engine for my site. I was wondering if anyone had any ideas on a function that could account for spelling mistakes in the users data. For example if they type "Jamres Borwn" it would still match "James Brown". Does anyone know how spell checkers search to find possible matches on words? Any help or ideas would be gratefully recieved. Thanks in advance Rob
check out pspell ( http://pspell.sourceforge.net/ ). There's a module for php that allows u to check the spelling of any given word and also tries to give the correct word if it did not recognise a (misspelled) one.
Many of the words that may be used won't actually be dictionary found words (band names and artist names) so I really need something that will be able to teach me the theory of how to perform these searches efficiently. I have no c++ knowledge although I am going to try to muddle through this. Rob
maybe that link could still work out for you ohlordy
it will do "Jarmes" and find instance of that
and also "Borwn"
it just won't do both at once, but maybe you can split the string up somehow, i don't know too much about C, but it may work somehow
I would still suggest to use pspell - since u can add words to the dictionary, it's not a problem to insert band names etc. I guess u create some kinda search index?! So when u index your pages, simply add the band names etc. to the dictionary and u r able to provide spell checking search. Concerning the algorithms that check the spellin: I have no idea how they really work and I don't think that's easy to implement a fast and reliable solution - especially if u have little c++ knowlegde. Pspell uses a well tested method that actually should perfectly fit your needs, so give it at least a try. Hasta siempre