Grammar and Spelling Correction API, based on GPT-J

What are Grammar and Spelling Corrections and Why Use GPT-J?

Grammar correction and spelling correction are about removing mistakes from a piece of text.

It sounds easier than it is as there are several kind of mistakes. Sometimes it is just about a typo or a misspelled word, but it can also be a deeper sentence structure issue. Thanks to AI, it is now possible to reliably detect errors and propose a perfect correction, in most languages.

GPT-J is the most advanced open-source NLP model as of this writing, and this is the best GPT-3 alternative. This model is so big that it can adapt to many situations, and perfectly sounds like a human. It is very good at correcting mistakes.

Why Use a Grammar/Spelling Corrector?

Writing content with mistakes is bad for reputation, and it makes it hard to understand the underlying ideas. Here are a couple of examples:

Content Creation

Marketing teams write a lot of content on a regular basis. It is hard to write fast without making mistakes. In order to keep a high productivity, the best solution is perform a text correction on the content once it's finished and use the corrected text.

Support

Making mistakes when writing to customers is very bad for the brand. Good news is that it's easy to automatically correct every message before sending it!

Grammar and Spelling Correction with GPT-J

In order to make the most of GPT-J, it is crucial to have in mind the so-called few-shot learning technique: by giving only a couple of examples to the AI, it is possible to dramatically improve the relevancy of the results, without even training a dedicated AI.

Building an inference API for grammar and spelling correction based on GPT-J is a necessary step as soon a you want to use correction in production. But building such an API is hard... First because you need to code the API (easy part) but also because you need to build a highly available, fast, and scalable infrastructure to serve your models behind the hood (hardest part). It is especially hard for machine learning models as they consume a lot of resources (memory, disk space, CPU, GPU...).

Such an API is interesting because it is completely decoupled from the rest of your stack (microservice architecture), so you can easily scale it independently, and you can access it using any programming language. Most machine learning frameworks are developed in Python, but it's likely that you want to access them from other languages like Javascript, Go, Ruby...

NLP Cloud's Grammar and Spelling Correction API

NLP Cloud proposes a grammar and spelling correction API based on GPT-J that gives you the opportunity to perform correction out of the box, with breathtaking results.

For more details, see our documentation about text generation with GPT-J. Also see our few-shot learning example dedicated to grammar and spelling correction and easily test GPT-J correction on our playground.