Spelling corrector in Erlang

Spelling correction is one of the coolest practical challenges in Information Retrieval. Since the famous article from Peter Norvig was published, many implementations were done. This article gave an insight of how practical problems - such simple spelling correction - are solved in Information Retrieval. Here is my contribute, in Erlang.

usage

As improvement, the second expansion has to be optimized with some sort of pruning, as words with seven letters can generate more than one million of variations. Probably, character replacement based on soundex or QUERTY keyboard key distance can do the trick.