Skip to content

Instantly share code, notes, and snippets.

@oasic
oasic / grammarbot_custom_spelling_dictionary.py
Created Jun 11, 2020
Filtering flagged spelling words using a custom dictionary
View grammarbot_custom_spelling_dictionary.py
import requests
def flag_errors(text, custom_dictionary=None):
r = requests.post("https://grammarbot.p.rapidapi.com/check",
data = {'text': text, 'language': 'en-US'},
headers={
'x-rapidapi-host': "grammarbot.p.rapidapi.com",
'x-rapidapi-key': "your_rapid_api_key_2a1c27dp1af3afjsn67a3e57142d6",
'content-type': "application/x-www-form-urlencoded"
@oasic
oasic / flag_errors.py
Last active Jun 11, 2020
Markup errors using the GrammarBot API
View flag_errors.py
import requests
def flag_errors(text):
r = requests.post("https://grammarbot.p.rapidapi.com/check",
data = {'text': text, 'language': 'en-US'},
headers={
'x-rapidapi-host': "grammarbot.p.rapidapi.com",
'x-rapidapi-key': "your_rapid_api_key_2a1c27dp1af3afjsn67a3e57142d6",
'content-type': "application/x-www-form-urlencoded"
})
@oasic
oasic / autocorrect.py
Last active Jun 11, 2020
Automatic Grammar and Spelling Correction using GrammarBot
View autocorrect.py
# tutorial here: https://www.grammarbot.io/grammar-autocorrection
import requests
def auto_correct_text(text):
r = requests.post("https://grammarbot.p.rapidapi.com/check",
data = {'text': text, 'language': 'en-US'},
headers={
'x-rapidapi-host': "grammarbot.p.rapidapi.com",
'x-rapidapi-key': "your_rapid_api_key_2a1c27dp1af3afjsn67a3e57142d6",
'content-type': "application/x-www-form-urlencoded"