Can this be used to build a grammar checker for japanese language?
Most of the "rules" are common patterns made into guidelines, and they'll change depending on the speaker, context, society of the time (the "correct" way is fully dictated by the majority). And you could break the grammar rules as long as the other accepted guidelines are OK.
As a parallel you can learn to mechanically drive a car, but driving it "correctly" will require full knowledge of traffic code, societal rules and how to reasonably handle conflicting situations, including crashing it into a tree if it means avoiding a packed school bus.