I'm aware of how a computer can easily detect typos etc by comparing to a dictionary, but how does the system accurately make grammar corrections, e.g. between then/than, it's/its...
I'm assuming it's not machine learning yet (although I'm assuming this is how it will be solved in the future), as those grammar checkers have been around for a while, but rather a complex set of rules about the grammar of a given language? What language would such a system be usually written in?
I'm referring to for example the spell checker in Windows/macOS/Chrome (or is that one just using the system spell checker?)