Classify text as logical/ not logical
What you need is simply a language model. This is a very common task so you should be able to find code and data easily. This question gives some pointers for Python (be careful, the accepted answer is incorrect according to the two other answers).
Applying the language model to a sentence gives you a probability (or a perplexity score,  which works the opposite way), so you have to define a threshold in order to classify as real language or not.