A word spelling corrector based on bayesian inference