AUTOMATION SCRIPTS YOU NEED TO TRY — PART 5

10 Incredible Automation Scripts You Need To Try

Python’s Second Name is Automation

Abhay Parashar
The Pythoneers
Published in
7 min readDec 10, 2022

--

Image Created By Author using Canva.com

This is the part -5 of the series Automation scripts you need to try.

1. Correct Spelling 🎃

We all write tons of words every day, from writing articles, project reports, emails, etc. Most of us use some online spelling correction tool like Grammarly, to improve the standards of our writing. This python automation script can replicate the features of these tools by providing a one-way solution for grammar correction in single or multiple documents.

Libraries:-
Textblob -
a python library that provides a simple API for text processing and performing different natural language processing tasks.

from textblob import TextBlob
content = " ".join([line.strip() for line in open('content.txt')])

def correct_spelling(doc):
new_doc = TextBlob(doc)
result = new_doc.correct()
return result

data = correct_spelling(content)

with open("cleaned_content.txt",'a',newline='\n') as f:
f.write(str(data))

Script Applications:-

  1. Building Automated Grammer Correction Tool.

--

--

The Pythoneers
The Pythoneers

Published in The Pythoneers

Your home for innovative tech stories about Python and its limitless possibilities. Discover, learn, and get inspired.

Abhay Parashar
Abhay Parashar

Written by Abhay Parashar

Guarding Systems by Day 👨‍💻, Crafting Stories by Night ✍🏼, Weaving Code by Starlight 🤖

Responses (3)