Advertisement

Python Project With Source Code - Spelling Checker

Python Project With Source Code - Spelling Checker


Spelling Checker

Here, you can input any word and check if it is having a correct spelling or

not.

Prerequisites

First thing which you need to install is textblob library

<!--Install library-->

>pip install textblob

<!--For jupyter nb-->

You need to run this command in your terminal or your ide terminal.

<!--for jp nb-->

If you are using Jupyter Notebook you need to use the below command

<!--for jp nb-->

>import sys

<!--command-->

>!{sys.executable} -m pip install textblob

How to run the script

You can first install the textblob library and then you can run the

python script.

Source Code:

from textblob import TextBlob # importing textblob library

t = 1

while t:

a = input("Enter the word to be checked:- ") # incorrect spelling

print("original text: "+str(a)) #printing original text

b = TextBlob(a) #correcting the text

# prints the corrected spelling

print("corrected text: "+str(b.correct()))

t = int(input("Try Again? 1 : 0 "))

Post a Comment

0 Comments