Damn Cool Algorithms: Levenshtein Automata
blog.notdot.net
blog.notdot.net
NFA = Nondeterministic Finite Automata (http://en.wikipedia.org/wiki/Nondeterministic_finite-state_m...) DFA = Deterministic Finite Automata (http://en.wikipedia.org/wiki/Deterministic_finite-state_mach...)
I've used the perl String::Approx module to great effect, but it takes a lot of resources to blast through a large dictionary.
It's pretty general and clever in its simplicity. It's really just trying all possible edits, recording the cost and progress until the costs exceed the budget or you've reached the goal.
To handle transposition, you need the state to remember the last character typed if it happens to match the next character, so the state space gets bigger. In your example for hello, from the start state you'll introduce a state for starting with e. This state encodes typed 'last char was e, matched nothing, cost 1'. From here, when you get an h, you move to the 'matched first two characters, used cost of one' state.
If you are a developer, esp Python and AppEngine, you really should read all the archives - it is one of the best general online sources for python, appengine (and the datastore) and dev.