Site icon TechVidvan

Python Spelling Checker & Corrector Project with Source Code

python project spelling checker corrector

Spell Corrector, also known as Spell Checker is a python application that checks whether a word has the correct spelling or not. In this python project, we are going to create spell checker & corrector which will take in a word and output a list of similar words to it.

About Spell Corrector

The objective of Spell Corrector is to take in a word and find out what words are closer to it. A spelling corrector displays a list of words that have the closest resemblance to the entered word. If the entered word is correct then the same word is displayed. A click of a button will find us some words similar to the entered words.

Python Spell Corrector Project Details

The objective of the project is to create a Spell Corrector Application. The application will have a GUI. In the GUI, we will have an entry field to enter the word. We will have a button that when clicked will display the list of words closest to the entered word.

Project Prerequisites

To build the Spell Corrector Project, we are going to use the Tkinter Module and Spell Checker Module:

Download the Python Spelling Checker Code

Before proceeding ahead please download python spelling checker source code from the following link: Python Spell Checker & Corrector Project

Steps to Build the Python Spell Corrector Project

Follow the below steps to build the project:

  1. Importing the Required Modules
  2. Creating the GUI Window
  3. Spell Check Function

Let’s look at each step in detail.

1. Importing the Required Modules:

from spellchecker import SpellChecker
from tkinter import *
import tkinter as tk

2. Creating the GUI Window:

window=Tk()
window.geometry("400x400")
window.title("TechVidvan - Python Spell Checker")
Label(window,text="SPELL CORRECTOR",font="Arial 18",bg='orange').pack()
Label(window,text="Enter A Word",font="Arial 13").pack()
Entry(window, textvariable=text).pack()
Button(window,text="Correct",bg='yellow',command=check,font='Arial 15').pack()

3. Spell Check Function:

spell = SpellChecker()
def check():
    t=text.get()
    correct=spell.candidates(t)
    Label(window,text="Here is a list of words:",font="Arial 12").pack()
    Label(window,text=correct,font="Arial 12").pack()

Python Spell Checker Output

Summary

In the Spell Corrector Project, we have used Tkinter Module to build an easy GUI using Python and SpellChecker Module to check the word. We have created a GUI with a button, labels and an entry field. In this way, we have successfully completed this project.

Exit mobile version