Using edit distance and language models for spelling correction