

{"id":107961,"date":"2022-03-03T09:00:17","date_gmt":"2022-03-03T03:30:17","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=107961"},"modified":"2026-06-01T14:05:05","modified_gmt":"2026-06-01T08:35:05","slug":"python-spell-checker-correction-project","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/python-spell-checker-correction-project\/","title":{"rendered":"Python Spelling Checker &amp; Corrector with Source Code"},"content":{"rendered":"<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:2585,&quot;href&quot;:&quot;https:\\\/\\\/drive.google.com\\\/file\\\/d\\\/1iedh6t6Zv5lzK5gF_i993zEHdWeleBDV\\\/view?usp=drive_link&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20260601083509\\\/https:\\\/\\\/drive.google.com\\\/file\\\/d\\\/1iedh6t6Zv5lzK5gF_i993zEHdWeleBDV\\\/view?usp=drive_link&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-06-02 07:16:36&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-07 00:21:21&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-06-07 00:21:21&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;}]'><\/div>\n<p>We all make spelling mistakes, what we call typos while writing messages, emails, etc. Writing this article, I even made multiple typos! And we take the help of assistants on our devices to help us out in these moments. Do you know you can build such a system to correct your spelling following some simple steps using Python? We will do the same in this Python Spell Correction Project. Let&#8217;s start!!!<\/p>\n<h3>What is a Spell Corrector?<\/h3>\n<p>Writing should always have no spelling errors to let the reader get the correct understanding. But being humans, it is common for all of us to make some errors. And that\u2019s the reason the spell correctors are developed. These check the spelling of words and suggest the correct word if wrong. We will be building a prototype of a spelling corrector using Python.<\/p>\n<h3>Spell Checker using Python<\/h3>\n<p>To build this project, we will be using the Tkinter module and TextBlob modules from Python. We use the Tkinter module to build the GUI for taking input from the user and showing the output based on the spelling typed. And to do this check we will be using the TextBlob module.<\/p>\n<h3>Download Python Spell Checker &amp; Corrector Project<\/h3>\n<p>Please download the source code for the python spell checker &amp; corrector project from the following link: <a href=\"https:\/\/drive.google.com\/file\/d\/1iedh6t6Zv5lzK5gF_i993zEHdWeleBDV\/view?usp=drive_link\"><strong>Python Spelling Checker &amp; Corrector Project<\/strong><\/a><\/p>\n<h3>Project Prerequisites<\/h3>\n<p>The prior knowledge of Python and the Tkinter module would be helpful while building this module. And to install the two modules we just talked about, the following commands would be of use.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">pip install tkinter\r\npip install textblob\r\n\r\n<\/pre>\n<h3>Steps to build the Spell Checker &amp; Corrector Project in Python<\/h3>\n<p>Every project requires the developer to have a step-by-step flow to make the task simpler. And now we will be discussing the flow of this python project.<\/p>\n<ol>\n<li>First we import the Tkinter and the TextBlob modules<\/li>\n<li>Then we create the GUI and add the required widgets<\/li>\n<li>Finally, we write the function to check the spelling and give the corresponding output.<\/li>\n<\/ol>\n<h4>1. Importing the module<\/h4>\n<p>The first step is to import the modules tkinter and the TextBlob class from the textblob module.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#Importing modules\r\nfrom textblob import TextBlob\r\nfrom tkinter import *<\/pre>\n<h4>2. Creating the GUI<\/h4>\n<p>Then we create an empty GUI for adding the widgets.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#Creating the window\r\nwn = Tk()\r\nwn.title(\"DataFlair Spell Checker\")\r\nwn.geometry('500x250')\r\nwn.config(bg='SlateGray1')<\/pre>\n<h4>3. Adding the required widgets<\/h4>\n<p>Now it&#8217;s time to add the widgets. We need<\/p>\n<p>1. An Entry() to get the input of word from the user of which the spell check is to be done<br \/>\n2. A button to run the function that does the spell check<br \/>\n3. A Label() to show the corrected word<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#Creating the variables to get the word and set the correct word\r\ntext=StringVar(wn)\r\ncorrectedText =StringVar(wn)\r\n\r\n#The main label\r\nLabel(wn, text='DataFlair Spell Checker',bg='SlateGray1',\r\nfg='gray30', font=('Times', 20,'bold')).place(x=100, y=10)\r\n\r\n#Getting the input of word from the user\r\nLabel(wn, text='Please enter the word',bg='SlateGray1',font=('calibre',13,'normal'), anchor=\"e\", justify=LEFT).place(x=20, y=70)\r\n\r\nEntry(wn,textvariable=text, width=35,font=('calibre',13,'normal')).place(x=20,y=110)\r\n\r\n#Label to show the correct word\r\nopLabel = Label(wn, textvariable=correctedText, bg='SlateGray1',anchor=\"e\",font=('calibre',13,'normal'), justify=LEFT).place(x=20, y=130)\r\n\r\n#Button to do the spell check\r\nButton(wn, text=\"Click Me\", bg='SlateGray4',font=('calibre', 13),\r\ncommand=checkSpelling).place(x=230, y=190)\r\n\r\n#Runs the window till it is closed by the user\r\nwn.mainloop()<\/pre>\n<h4>4. Writing the function to check the spelling show output<\/h4>\n<p>This function runs when the user clicks the button.<\/p>\n<p>1. We first take the input word<br \/>\n2. Then we create an object for this word<br \/>\n3. Then we show the correct word in the label<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#Function to check the spelling and show the corrected spelling\r\ndef checkSpelling():\r\n a = text.get() #Getting the word user entered\r\n b = TextBlob(a) #Getting the object for the word\r\n correctedText.set(\"The corrected word is: \"+str(b.correct())) #Showing the corrected word<\/pre>\n<h3>Python Spell Checker &amp; Corrector Output<\/h3>\n<p>Image of the Spell Checker GUI<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/03\/python-spell-checker-corrector-output.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-108094\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/03\/python-spell-checker-corrector-output.webp\" alt=\"python spell checker corrector output\" width=\"622\" height=\"347\" \/><\/a><\/p>\n<h3>Summary<\/h3>\n<p>Hurray! You have successfully built the Spell Checker and correction project using the Tkinter and TextBlob Python modules. We learned to create GUI, add widgets and check spellings. Hope you enjoyed building with us!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We all make spelling mistakes, what we call typos while writing messages, emails, etc. Writing this article, I even made multiple typos! And we take the help of assistants on our devices to help&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":108095,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[21063,21082,26653,26654,26630,26631,26632,26633],"class_list":["post-107961","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-beginner-python-project","tag-python-project","tag-python-spell-checker","tag-python-spell-checker-project","tag-python-spell-correction","tag-python-spell-correction-project","tag-python-spell-correction-project-with-source-code","tag-python-spell-corrector-project"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Python Spelling Checker &amp; Corrector with Source Code - DataFlair<\/title>\n<meta name=\"description\" content=\"Develop the Spell Checker and correction project using the Tkinter and TextBlob Python modules. Source Code is provided for your help.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/python-spell-checker-correction-project\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Spelling Checker &amp; Corrector with Source Code - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Develop the Spell Checker and correction project using the Tkinter and TextBlob Python modules. Source Code is provided for your help.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/python-spell-checker-correction-project\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-03-03T03:30:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-01T08:35:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/03\/python-spelling-checker-corrector-project.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python Spelling Checker &amp; Corrector with Source Code - DataFlair","description":"Develop the Spell Checker and correction project using the Tkinter and TextBlob Python modules. Source Code is provided for your help.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/python-spell-checker-correction-project\/","og_locale":"en_US","og_type":"article","og_title":"Python Spelling Checker &amp; Corrector with Source Code - DataFlair","og_description":"Develop the Spell Checker and correction project using the Tkinter and TextBlob Python modules. Source Code is provided for your help.","og_url":"https:\/\/data-flair.training\/blogs\/python-spell-checker-correction-project\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2022-03-03T03:30:17+00:00","article_modified_time":"2026-06-01T08:35:05+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/03\/python-spelling-checker-corrector-project.webp","type":"image\/webp"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/python-spell-checker-correction-project\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/python-spell-checker-correction-project\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/b49855299264df5e27e3ec6c2cd9fde9"},"headline":"Python Spelling Checker &amp; Corrector with Source Code","datePublished":"2022-03-03T03:30:17+00:00","dateModified":"2026-06-01T08:35:05+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/python-spell-checker-correction-project\/"},"wordCount":514,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/python-spell-checker-correction-project\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/03\/python-spelling-checker-corrector-project.webp","keywords":["Beginner Python Project","Python project","python spell checker","python spell checker project","Python Spell Correction","Python Spell Correction Project","Python Spell Correction project with source code","Python spell corrector project"],"articleSection":["Python Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/python-spell-checker-correction-project\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/python-spell-checker-correction-project\/","url":"https:\/\/data-flair.training\/blogs\/python-spell-checker-correction-project\/","name":"Python Spelling Checker &amp; Corrector with Source Code - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/python-spell-checker-correction-project\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/python-spell-checker-correction-project\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/03\/python-spelling-checker-corrector-project.webp","datePublished":"2022-03-03T03:30:17+00:00","dateModified":"2026-06-01T08:35:05+00:00","description":"Develop the Spell Checker and correction project using the Tkinter and TextBlob Python modules. Source Code is provided for your help.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/python-spell-checker-correction-project\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/python-spell-checker-correction-project\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/python-spell-checker-correction-project\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/03\/python-spelling-checker-corrector-project.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/03\/python-spelling-checker-corrector-project.webp","width":1200,"height":628},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/python-spell-checker-correction-project\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Python Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/python\/"},{"@type":"ListItem","position":3,"name":"Python Spelling Checker &amp; Corrector with Source Code"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/b49855299264df5e27e3ec6c2cd9fde9","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team is a group of passionate educators and industry experts dedicated to providing high-quality online learning resources on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. With years of experience in the field, the team aims to simplify complex topics and help learners advance their careers. At DataFlair, we believe in empowering students and professionals with the knowledge and skills needed to thrive in today\u2019s fast-paced tech industry. Follow us for Free courses, expert insights, tutorials, and practical tips to boost your learning journey.","url":"https:\/\/data-flair.training\/blogs\/author\/datafbdad\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/107961","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=107961"}],"version-history":[{"count":6,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/107961\/revisions"}],"predecessor-version":[{"id":148669,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/107961\/revisions\/148669"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/108095"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=107961"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=107961"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=107961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}