Grammar Fixer

A simple script to fix grammar follies

: python

Concepts Used

  • string replace
  • file operations


  • file as input
  • backup file



Often when I write, I forget to capitalize ā€œiā€ , forget to use apostrophes etc, so I made this little scrip to fix them ..


It has the following features.

  • Takes one file as args . (use some shell magic to include more)
  • Has a dict of words to replace..
  • Replaces in place.
  • Creates a backup file when replacing, un-comment marked code to remove backup automatically, if you want.


This was just a small utility script I made and use on a daily basis, even for this page.