An alternative approach, if your input data is separated words, would simply be to build a hash table of {error => correction}
.
Hash table lookup is fast, so if you can bend your input data to this format, it will almost certainly be fast enough.
An alternative approach, if your input data is separated words, would simply be to build a hash table of {error => correction}
.
Hash table lookup is fast, so if you can bend your input data to this format, it will almost certainly be fast enough.