require 'spellingbee'
speller = SpellingBee.new
speller.correct('speling') #=> 'spelling'
Delete, Transpose, Replace, Insert
rewd -> .ewd r.wd re.d rew
ewd rwd red rew
rewd -> (er)wd r(we)d re(dw)
erwd rwed redw
rewd -> (a)ewd (b)ewd (c)ewd ...
r(a)wd r(b)wd r(c)wd ...
re(a)d re(b)d re(c)d ...
...
rewd -> (a)rewd (b)rewd (c)rewd ... r(a)ewd r(b)ewd ...
Time (s) Accuracy
Python 7.0 74 %
Ruby 1.3 54 %
(270 tests)
CLEARK -> CLEAR or CLERK?
61% accuracy
45 seconds
66% accuracy
Well... 89%
GNU aspell