If you know that all the text you wish to analyse is correct, a set of rules that overgenerate a grammar would be sufficient.
Wikipedia foundation.