Grammar correction of sentences



import language_tool_python


tool = language_tool_python.LanguageTool('en-US')
text = input("enter text\n")
matches = tool.check(text)  

for x in matches:
print(x.message)#to print the grammatical error

for y in x.replacements: # to print replacements
print(y)
pass

pass