Simply count words / punctuation character for each line. English will tend to have 4 or more, code less than 2.
The paragraph above has 18 words, and 4 punctuation characters, for example. This paragraph has 19 words and 4 punctuation, so within expectations.
Of course, this would need to be tested against newbie poor-english speakers questions, and it may be that in those cases, the statistics are skewed.
I expect that [non-whitespace].[whitespace or newline] is very rare in code, but common in English, so this could be counted as words, not punctuation.
I think the biggest problem will be inline code, where someone asks a question like:
If I say for (i=0; i>100; i++) {} what does that mean?
That's code and English, and should be marked up as with back-ticks:
If I say
for (i=0; i>100; i++) {}what does that mean?