spell checking based on patterns