{"id":184941,"date":"2023-02-15T13:30:00","date_gmt":"2023-02-15T18:30:00","guid":{"rendered":"https:\/\/ibkrcampus.com\/?p=184941"},"modified":"2023-02-15T16:21:33","modified_gmt":"2023-02-15T21:21:33","slug":"3-packages-to-build-a-spell-checker-in-python","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/3-packages-to-build-a-spell-checker-in-python\/","title":{"rendered":"3 Packages to Build a Spell Checker in Python"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This post is going to talk about three different packages for coding a spell checker in Python \u2013&nbsp;<strong>pyspellchecker<\/strong>,&nbsp;<strong>TextBlob<\/strong>, and&nbsp;<strong>autocorrect<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-pyspellchecker\"><strong>pyspellchecker<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The&nbsp;<strong>pyspellchecker<\/strong>&nbsp;package allows you to perform spelling corrections, as well as see candidate spellings for a misspelled word. To install the package, you can use pip:<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">pip install pyspellchecker<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Once installed, the&nbsp;<strong>pyspellchecker<\/strong>&nbsp;is really straightforward to use. Note that even though we use \u201cpyspellchecker\u201d when installing via pip, we just type \u201cspellchecker\u201d in the package import statement. The first piece is to create a SpellChecker object, which we\u2019ll just call \u201cspell\u201d.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">from spellchecker import SpellChecker\n \nspell = SpellChecker()<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now, we\u2019re ready to test this out with a few misspellings. We\u2019ll use a few words from&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Commonly_misspelled_English_words\">this list of commonly misspelled words<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To attempt a correction, you can use the&nbsp;<em>correction<\/em>&nbsp;method:<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">spell.correction(\"adress\") # address<\/pre>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">spell.correction(\"becuase\") # because<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>pyspellchecker<\/strong>&nbsp;also has a method to split the words in a sentence.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">spell.split_words(\"this sentnce has misspelled werds\")\n \n#['this', 'sentnce', 'has', 'misspelled', 'werds']<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Once we have a list of the words in the sentence, we can just loop over each word (via a&nbsp;<a href=\"https:\/\/theautomatic.net\/tutorial-on-python-list-comprehensions\/\">list comprehension<\/a>) using our SpellChecker object.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">words = spell.split_words(\"this sentnce has misspelled werds\")\n \n[spell.correction(word) for word in words]\n \n#['this', 'sentence', 'has', 'misspelled', 'words']<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you just want to flag what words in a sentence are misspelled you can use the&nbsp;<em>unknown<\/em>&nbsp;method. This method will return a&nbsp;<a href=\"https:\/\/theautomatic.net\/2019\/05\/29\/all-about-python-sets\/\">Python set<\/a>&nbsp;of the potentially misspelled words.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">spell.unknown([\"dilema\", \"column\", \"aquire\"])\n \n#{'aquire', 'dilema'}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We can also see the candidate spellings for a misspelled word.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>TextBlob<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The powerful&nbsp;<strong>TextBlob<\/strong>&nbsp;can also do spelling corrections. To install&nbsp;<strong>TextBlob<\/strong>&nbsp;we can use pip (note all lowercase):<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">pip install textblob<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To use&nbsp;<strong>TextBlob\u2019s<\/strong>&nbsp;spellchecking functionality, we just need to import the&nbsp;<em>Word<\/em>&nbsp;class. Then we can input a word and check its spelling using the&nbsp;<em>spellcheck<\/em>&nbsp;method, like below.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">from textblob import Word\n \nword = Word('percieve')\n \nword.spellcheck()\n \n# [('perceive', 1.0)]<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">As can be seen above,&nbsp;<strong>TextBlob<\/strong>&nbsp;returns two pieces \u2013 a recommended correction for this word, and a confidence score associated with the correction. In this case, we just get one word back with a confidence of 1.0, or 100%.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s try another word that returns multiple possibilities. If we input the string \u201cpersonell\u201d, we get a list of possible corrections with confidence scores because this string is fairly similar in spelling to a few different words.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">word = Word('personell')\nword.spellcheck()\n \n#[('personal', 0.65),\n#('personally', 0.2642857142857143),\n# ('peroneal', 0.06428571428571428),\n# ('personnel', 0.014285714285714285),\n# ('personen', 0.007142857142857143)]<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">According to its&nbsp;<a href=\"https:\/\/textblob.readthedocs.io\/en\/dev\/quickstart.html#spelling-correction\">documentation<\/a>,&nbsp;<strong>TextBlob\u2019s<\/strong>&nbsp;spelling correction feature is about 70% accurate.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>autocorrect<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The last package we\u2019ll examine is called&nbsp;<strong>autocorrect<\/strong>. Again, we can install this package with pip:<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">pip install autocorrect<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Once installed, we\u2019ll import the&nbsp;<em>Speller<\/em>&nbsp;class from&nbsp;<strong>autocorrect<\/strong>. Then we\u2019ll create an object that uses the English language (lang = \u2018en\u2019). We\u2019ll use this object to do spelling corrections.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">from autocorrect import Speller\n \ncheck = Speller(lang='en')<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Next, we can input a sentence to our object, and it will attempt to correct any misspellings.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">check(\"does this sentece have misspelled wordz?\")\n \n# 'does this sentence have misspelled words?'<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>A few caveats<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">It\u2019s important to keep in mind that no programmatic spell checker is perfect. However, Python does have several pre-made options available, as described above, but you could also potentially build your own as well using&nbsp;<a href=\"https:\/\/theautomatic.net\/2019\/11\/13\/guide-to-fuzzy-matching-with-python\/\">fuzzy matching<\/a>. Also, words outside of context make it more difficult to determine the correct spelling if the misspelled string is similar to multiple words. For example, take the string \u201cliberry\u201d. This is a known misspelling for&nbsp;<em>library<\/em>. However, it is also just one letter off from&nbsp;<em>liberty<\/em>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If we use one of the packages above, we get the word \u201cliberty\u201d returned, which is not illogical, as the string is very close in spelling, but context could help reveal which word makes the most sense. For building a contextual spell checker in Python, you might want to check out recurrent neural networks or Markov models.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">spell.correction(\"liberry\") # liberty\n \nword = Word(\"liberry\")\nword.spellcheck() # liberty\n \ncheck(\"liberry\") # liberty<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Originally posted on <a href=\"https:\/\/theautomatic.net\/2019\/12\/10\/3-packages-to-build-a-spell-checker-in-python\/\">TheAutomatic.net<\/a> Blog. <\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post is going to talk about three different packages for coding a spell checker in Python \u2013 pyspellchecker, TextBlob, and autocorrect.<\/p>\n","protected":false},"author":388,"featured_media":28581,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[339,343,338],"tags":[14709,14707,595,14708],"contributors-categories":[13695],"class_list":["post-184941","post","type-post","status-publish","format-standard","has-post-thumbnail","category-data-science","category-programing-languages","category-ibkr-quant-news","tag-autocorrect-python-package","tag-pyspellchecker","tag-python","tag-textblob","contributors-categories-theautomatic-net"],"pp_statuses_selecting_workflow":false,"pp_workflow_action":"current","pp_status_selection":"publish","acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v28.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>3 Packages to Build a Spell Checker in Python | IBKR Quant<\/title>\n<meta name=\"description\" content=\"This post is going to talk about three different packages for coding a spell checker in Python \u2013 pyspellchecker, TextBlob, and autocorrect.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/184941\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"3 Packages to Build a Spell Checker in Python | IBKR Quant Blog\" \/>\n<meta property=\"og:description\" content=\"This post is going to talk about three different packages for coding a spell checker in Python \u2013 pyspellchecker, TextBlob, and autocorrect.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/3-packages-to-build-a-spell-checker-in-python\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2023-02-15T18:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-15T21:21:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/12\/python-gears.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"900\" \/>\n\t<meta property=\"og:image:height\" content=\"540\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Andrew Treadway\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andrew Treadway\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t    \"@context\": \"https:\\\/\\\/schema.org\",\n\t    \"@graph\": [\n\t        {\n\t            \"@type\": \"NewsArticle\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/3-packages-to-build-a-spell-checker-in-python\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/3-packages-to-build-a-spell-checker-in-python\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Andrew Treadway\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/d4018570a16fb867f1c08412fc9c64bc\"\n\t            },\n\t            \"headline\": \"3 Packages to Build a Spell Checker in Python\",\n\t            \"datePublished\": \"2023-02-15T18:30:00+00:00\",\n\t            \"dateModified\": \"2023-02-15T21:21:33+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/3-packages-to-build-a-spell-checker-in-python\\\/\"\n\t            },\n\t            \"wordCount\": 607,\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/3-packages-to-build-a-spell-checker-in-python\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2019\\\/12\\\/python-gears.jpg\",\n\t            \"keywords\": [\n\t                \"autocorrect Python package\",\n\t                \"pyspellchecker\",\n\t                \"Python\",\n\t                \"TextBlob\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Data Science\",\n\t                \"Programming Languages\",\n\t                \"Quant\"\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/3-packages-to-build-a-spell-checker-in-python\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/3-packages-to-build-a-spell-checker-in-python\\\/\",\n\t            \"name\": \"3 Packages to Build a Spell Checker in Python | IBKR Quant Blog\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\"\n\t            },\n\t            \"primaryImageOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/3-packages-to-build-a-spell-checker-in-python\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/3-packages-to-build-a-spell-checker-in-python\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2019\\\/12\\\/python-gears.jpg\",\n\t            \"datePublished\": \"2023-02-15T18:30:00+00:00\",\n\t            \"dateModified\": \"2023-02-15T21:21:33+00:00\",\n\t            \"description\": \"This post is going to talk about three different packages for coding a spell checker in Python \u2013 pyspellchecker, TextBlob, and autocorrect.\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/3-packages-to-build-a-spell-checker-in-python\\\/\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"ImageObject\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/3-packages-to-build-a-spell-checker-in-python\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2019\\\/12\\\/python-gears.jpg\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2019\\\/12\\\/python-gears.jpg\",\n\t            \"width\": 900,\n\t            \"height\": 540,\n\t            \"caption\": \"Python\"\n\t        },\n\t        {\n\t            \"@type\": \"WebSite\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"name\": \"IBKR Campus US\",\n\t            \"description\": \"Financial Education from Interactive Brokers\",\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"SearchAction\",\n\t                    \"target\": {\n\t                        \"@type\": \"EntryPoint\",\n\t                        \"urlTemplate\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/?s={search_term_string}\"\n\t                    },\n\t                    \"query-input\": {\n\t                        \"@type\": \"PropertyValueSpecification\",\n\t                        \"valueRequired\": true,\n\t                        \"valueName\": \"search_term_string\"\n\t                    }\n\t                }\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"Organization\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\",\n\t            \"name\": \"Interactive Brokers\",\n\t            \"alternateName\": \"IBKR\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"logo\": {\n\t                \"@type\": \"ImageObject\",\n\t                \"inLanguage\": \"en-US\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\",\n\t                \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"width\": 669,\n\t                \"height\": 669,\n\t                \"caption\": \"Interactive Brokers\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\"\n\t            },\n\t            \"publishingPrinciples\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/about-ibkr-campus\\\/\",\n\t            \"ethicsPolicy\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/cyber-security-notice\\\/\"\n\t        },\n\t        {\n\t            \"@type\": \"Person\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/d4018570a16fb867f1c08412fc9c64bc\",\n\t            \"name\": \"Andrew Treadway\",\n\t            \"description\": \"Andrew Treadway currently works as a Senior Data Scientist, and has experience doing analytics, software automation, and ETL. He completed a master\u2019s degree in computer science \\\/ machine learning, and an undergraduate degree in pure mathematics. Connect with him on LinkedIn: https:\\\/\\\/www.linkedin.com\\\/in\\\/andrew-treadway-a3b19b103\\\/In addition to TheAutomatic.net blog, he also teaches in-person courses on Python and R through my NYC meetup: more details.\",\n\t            \"sameAs\": [\n\t                \"https:\\\/\\\/theautomatic.net\\\/about-me\\\/\"\n\t            ],\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/andrewtreadway\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"3 Packages to Build a Spell Checker in Python | IBKR Quant","description":"This post is going to talk about three different packages for coding a spell checker in Python \u2013 pyspellchecker, TextBlob, and autocorrect.","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:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/184941\/","og_locale":"en_US","og_type":"article","og_title":"3 Packages to Build a Spell Checker in Python | IBKR Quant Blog","og_description":"This post is going to talk about three different packages for coding a spell checker in Python \u2013 pyspellchecker, TextBlob, and autocorrect.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/3-packages-to-build-a-spell-checker-in-python\/","og_site_name":"IBKR Campus US","article_published_time":"2023-02-15T18:30:00+00:00","article_modified_time":"2023-02-15T21:21:33+00:00","og_image":[{"width":900,"height":540,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/12\/python-gears.jpg","type":"image\/jpeg"}],"author":"Andrew Treadway","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Andrew Treadway","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/3-packages-to-build-a-spell-checker-in-python\/#article","isPartOf":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/3-packages-to-build-a-spell-checker-in-python\/"},"author":{"name":"Andrew Treadway","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/d4018570a16fb867f1c08412fc9c64bc"},"headline":"3 Packages to Build a Spell Checker in Python","datePublished":"2023-02-15T18:30:00+00:00","dateModified":"2023-02-15T21:21:33+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/3-packages-to-build-a-spell-checker-in-python\/"},"wordCount":607,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/3-packages-to-build-a-spell-checker-in-python\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/12\/python-gears.jpg","keywords":["autocorrect Python package","pyspellchecker","Python","TextBlob"],"articleSection":["Data Science","Programming Languages","Quant"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/3-packages-to-build-a-spell-checker-in-python\/","url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/3-packages-to-build-a-spell-checker-in-python\/","name":"3 Packages to Build a Spell Checker in Python | IBKR Quant Blog","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/3-packages-to-build-a-spell-checker-in-python\/#primaryimage"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/3-packages-to-build-a-spell-checker-in-python\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/12\/python-gears.jpg","datePublished":"2023-02-15T18:30:00+00:00","dateModified":"2023-02-15T21:21:33+00:00","description":"This post is going to talk about three different packages for coding a spell checker in Python \u2013 pyspellchecker, TextBlob, and autocorrect.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/3-packages-to-build-a-spell-checker-in-python\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/3-packages-to-build-a-spell-checker-in-python\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/12\/python-gears.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/12\/python-gears.jpg","width":900,"height":540,"caption":"Python"},{"@type":"WebSite","@id":"https:\/\/ibkrcampus.com\/campus\/#website","url":"https:\/\/ibkrcampus.com\/campus\/","name":"IBKR Campus US","description":"Financial Education from Interactive Brokers","publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ibkrcampus.com\/campus\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ibkrcampus.com\/campus\/#organization","name":"Interactive Brokers","alternateName":"IBKR","url":"https:\/\/ibkrcampus.com\/campus\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","width":669,"height":669,"caption":"Interactive Brokers"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/"},"publishingPrinciples":"https:\/\/www.interactivebrokers.com\/campus\/about-ibkr-campus\/","ethicsPolicy":"https:\/\/www.interactivebrokers.com\/campus\/cyber-security-notice\/"},{"@type":"Person","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/d4018570a16fb867f1c08412fc9c64bc","name":"Andrew Treadway","description":"Andrew Treadway currently works as a Senior Data Scientist, and has experience doing analytics, software automation, and ETL. He completed a master\u2019s degree in computer science \/ machine learning, and an undergraduate degree in pure mathematics. Connect with him on LinkedIn: https:\/\/www.linkedin.com\/in\/andrew-treadway-a3b19b103\/In addition to TheAutomatic.net blog, he also teaches in-person courses on Python and R through my NYC meetup: more details.","sameAs":["https:\/\/theautomatic.net\/about-me\/"],"url":"https:\/\/www.interactivebrokers.com\/campus\/author\/andrewtreadway\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/12\/python-gears.jpg","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/184941","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/users\/388"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=184941"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/184941\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/28581"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=184941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=184941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=184941"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=184941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}