I just read something about how when people tried to make coding languages to seem write like english, they realized how hard that is since the english language has so many rules, ambiguities, etc..
so yea, it wouldn't be possible to determine a valid sentence programatically, in my opionion