Skip to content

Instantly share code, notes, and snippets.

@MahraibFatima
Created February 7, 2024 08:36
Show Gist options
  • Save MahraibFatima/05d0667261368a690df2326f7164a322 to your computer and use it in GitHub Desktop.
Save MahraibFatima/05d0667261368a690df2326f7164a322 to your computer and use it in GitHub Desktop.
This code will attempt to correct spelling, basic grammar, and some common punctuation errors in the input line.
from textblob import TextBlob
line = input("Enter any incorrect phrase: ")
corrected_line = TextBlob(line).correct()
print("Original line:", line)
print("Corrected line:", corrected_line)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment