ruby implementation of Norvig's spell corrector
Perl Ruby
Switch branches/tags
Nothing to show
Pull request Compare This branch is 1 commit ahead of cloudhead:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Ruby code fork from : 
My implementation of Peter Norvig's python spell-corrector, found here: 

Focus is on conciseness, not performance.

I provided a .txt file to train it, called holmes.txt; it's all the sherlock holmes books concated together. For better results, download which contains a million words or so..

Note that the training material cannot be a dictionary, as it must help the corrector figure out which words are the most frequently used.

==Perl solution==
Read words from a dictionary file named 'dict.txt' and check the iput word list, if miss-spelled words found ,output a suggestion word;
Usage: perl "That is quitee the extravagent armchir"
Spelling: quitee -> quite
Spelling: extravagent -> extravagant
Spelling: armchir -> armchair

Many improvement needed !