The problem of identifying and correcting confusibles, i.e. context-sensitive spelling errors, in text is typically tackled using specifically trained machine learning classifiers. For each different set of confusibles, a specific classifier is trained and tuned.
No takes yet. Share an insight, caveat, or question.
Stehouwer et al. (2009) studied this question.