/gec API gives you access to our top-of-the-line GEC engine. It was specifically developed for this, and it has been fine-tuned accordingly. By integrating this Wordtune API into your writing platform, you can provide your users with the confidence to write without the need to worry about grammar. This is also the engine behind Wordtune - our award winning writing assistant, so you know it's pretty awesome.
Whether you're an NLP enthusiast or have no prior knowledge, this API is for you. There are many clever mechanisms under the hood, but you don't have to understand them (if you don't want to). As a task-specific API, you can easily integrate it into your systems and get top-notch gramatical error corrections in a matter of minutes, with no prompt engineering required. Additionally, since it's optimized for this purpose, it's significantly more efficient than building it from scratch, and an order of magnitude cheaper.
You simply need to send some text to the API, and it will return a list of every grammar error, including its location and suggestions for corrections and the type of the error (to indicate to users why it should be fixed).
Allow your users to write with flawless grammar, including tenses, verb additions, changing the order, and everything else you forgot since English high school lessons. No more wondering if it's who or whom.
|I'm is going
|I'm going go
|I'm going to go
|I was in the there
|I was there
It difficult read a sentence like this, isn't it? The GEC API will make it easier for you to do this.
|This soup very tasty
|This soup is very tasty
Give your users peace of mind without having to worry about double whitespaces, incorrect punctuation, and answering the most annoying question - do I need a hyphen here?
|Are you going to be there!
|Are you going to be there?
A spell check, but so much more: Capitalizing, changing words that sound the same but spelled differently, and fixing errors caused by typos.
|I'm not aloud to go
|I'm not allowed to go
|i think i tough i saw you tryt
|i think i thought i saw you try
|Let it god
|Let it go
Do you know the song "I will will always love you"? How about “I will always love you you”? Doesn’t have the same ring, does it? With GEC API you can make sure you’ll always have a hit.
|Gimme Gimme Gimme a man after midnight
|Gimme a man after midnight
Did you ever use words with similar sounds or spellings? GEC API makes sure you
|At times, my job can be quite monogamous
|At times, my job can be quite monotonous
Imagine that you want to integrate the GEC API into your writing platform. To illustrate how you would do it, here is an example:
from ai21 import AI21Client
client = AI21Client(
# This is the default and can be omitted
text = "jazzz is a great stile of music"
response = client.gec.create(text=text)
# Use the corrections to fix the sentence
corrected_text = text
corrections = response.corrections
for curr_correction in reversed(corrections):
corrected_text = corrected_text[:curr_correction.start_index] + curr_correction.suggestion + corrected_text[curr_correction.end_index:]
And the fixed sentence:
// Jazz is a great style of music
Updated 11 days ago