In this case, both fair and fare are words in English. Which shows that spell checking needs to know a lot about grammar and context to work in general. Basically you need an LLM. Or if not a 'large language model', perhaps at least a small language model.
I wonder how it does work, I remember MS Word having a fairly decent grammar checker when I was using it in school - which predated LLMs by many years!
I suspect an LLM wouldn’t be the most optimal choice