Context-based spelling corrector