There is an attempt to build and open source version of Grammarly using vale rules here[1]. Rules are mainly regex based, but some target readability measures[2] or use parts of speech[3].
[1]: https://github.com/testthedocs/Openly
[2]: https://github.com/testthedocs/Openly/blob/master/Openly/Rea...