<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Moemen Ahmed on Medium]]></title>
        <description><![CDATA[Stories by Moemen Ahmed on Medium]]></description>
        <link>https://medium.com/@moamen.ahmed.n1?source=rss-4c0d6ce10102------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*6tHwDNv5Aj5qwCf6</url>
            <title>Stories by Moemen Ahmed on Medium</title>
            <link>https://medium.com/@moamen.ahmed.n1?source=rss-4c0d6ce10102------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 17:21:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@moamen.ahmed.n1/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Spelling Correction in python]]></title>
            <link>https://medium.com/@moamen.ahmed.n1/spelling-correction-in-python-c4f43adbd9b?source=rss-4c0d6ce10102------2</link>
            <guid isPermaLink="false">https://medium.com/p/c4f43adbd9b</guid>
            <category><![CDATA[text]]></category>
            <category><![CDATA[spell-correction]]></category>
            <category><![CDATA[spell-checking]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[nlp]]></category>
            <dc:creator><![CDATA[Moemen Ahmed]]></dc:creator>
            <pubDate>Fri, 06 Mar 2020 21:43:34 GMT</pubDate>
            <atom:updated>2020-03-06T21:43:34.990Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*piMZmjgKZsazrUaZ-y559g.jpeg" /></figure><p>Spelling correction is an important task in NLP for data cleaning and preparing for using ML models.</p><p>There are many libraries in python that you can use to make <strong>auto spelling correction </strong>to strings in python, in this article, I’ll show you the most popular libraries and how to use them.</p><p>The libraries are:</p><ol><li>Textblob</li><li>Autocorrect</li><li>Pyspellchecker</li><li>Gingerit</li></ol><h4><strong>1. Textblob</strong></h4><p>TextBlob is a Python (2 and 3) library for processing textual data. It provides a simple API for diving into common natural language processing (NLP) tasks such as part-of-speech tagging, noun phrase extraction, sentiment analysis, classification, translation, and more.</p><p><strong>Installation</strong>:</p><pre>pip install textblob</pre><p><strong>Use:</strong></p><pre>from textblob import TextBlob</pre><pre>text = TextBlob(&quot;I havv goood speling!&quot;)</pre><pre>str(text.correct())</pre><blockquote>‘I have good spelling!’</blockquote><h4><strong>2. AutoCorrect</strong></h4><p><strong>Installation:</strong></p><pre>pip install autocorrect</pre><p><strong>Use:</strong></p><pre>from autocorrect import Speller</pre><pre>spell = Speller(lang=&#39;en&#39;)</pre><pre>spell(&quot;I&#39;m not sleapy and tehre is no place I&#39;m giong to.&quot;)</pre><blockquote>“I’m not sleepy and there is no place I’m going to.”</blockquote><h4>3. <strong>Pyspellchecker</strong></h4><p><strong>Installation:</strong></p><pre>pip install pyspellchecker</pre><p><strong>Use: </strong>pyspellchecker corrects word by word, so you should change the code a bit to handle this, like this:</p><pre>from spellchecker import SpellChecker</pre><pre>text = &quot;I havv goood speling !&quot;</pre><pre>spell = SpellChecker()</pre><pre>&#39; &#39;.join([spell.correction(word) for word in text.split()])</pre><blockquote>‘I have good spelling !’</blockquote><h4>4. Gingerit</h4><p><strong>Installation:</strong></p><pre>pip install gingerit</pre><p><strong>Use: </strong>Note that Gingerit needs an internet connection to work</p><pre>from gingerit.gingerit import GingerIt</pre><pre>text = &quot;I havv goood speling !&quot;</pre><pre>parser = GingerIt()</pre><pre>parser.parse(text)[&#39;result&#39;]</pre><blockquote>‘I have good spelling !’</blockquote><h4>Summary</h4><p>This table summarizes some info about the four mentioned libraries, the effect of the casing means that some libraries’ output differs according to the character case (capital or small).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4f2cd96216fdcea85cd18e27a133e2db/href">https://medium.com/media/4f2cd96216fdcea85cd18e27a133e2db/href</a></iframe><p>The code examples can be tried in this <a href="https://colab.research.google.com/drive/1ZCtvbm8fVg5nG-fsRr921SFGzw9NbTp7">colab</a> notebook.</p><h4>References</h4><ul><li><a href="https://textblob.readthedocs.io/en/dev/">https://textblob.readthedocs.io/en/dev/</a></li><li><a href="https://github.com/fsondej/autocorrect">https://github.com/fsondej/autocorrect</a></li><li><a href="https://pypi.org/project/pyspellchecker/">https://pypi.org/project/pyspellchecker/</a></li><li><a href="https://pypi.org/project/gingerit/">https://pypi.org/project/gingerit/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c4f43adbd9b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>