6 ms·
I added a spelling corrector to an application a while back. I tried a couple of libraries that implement these ideas. Problem is it can be slow for big words
by r-c-r 10y ago
I added a spelling corrector to an application a while back. I tried a couple of libraries that implement these ideas. Problem is it can be slow for big words.
I stumbled across this algorithm which is much faster if you allow some time to pre-process your dictionary. http://blog.faroo.com/2012/06/07/improved-edit-distance-based-spelling-correction/ http://blog.faroo.com/2012/06/07/improved-edit-distance-base...
I implemented it here for fun in common lisp. Excuse the ugly code. https://github.com/RyanRiddle/lispell https://github.com/RyanRiddle/lispell