Grammarly and Writer.com features

Hello everyone,

I am interested in how grammarly and writer built some of their NLP features.

More specifically, how did they build their auto-suggestion feature or text analytic feature?

If you had to build it from scratch, how would you do it?