Python Spell Checker with Full Source Code For Beginners

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

Prerequisites:

  • The first thing which you need to install is textblob library
pip install textblob
  • You need to run this command in your terminal or your ide terminal.
  • If you are using Jupyter Notebook you need to use the below command
import sys !{sys.executable} -m pip install textblob
Code language: JavaScript (javascript)

Run the Script:

  • You can first install the textblob library and then you can run the python script.

Source Code:

spell_checker.py

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 "))
Code language: PHP (php)

Leave a Comment