<?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 Akash Senta on Medium]]></title>
        <description><![CDATA[Stories by Akash Senta on Medium]]></description>
        <link>https://medium.com/@Akashsenta?source=rss-91bfcef34be1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*q2_blGKIukvTWx2XVBRLsw.png</url>
            <title>Stories by Akash Senta on Medium</title>
            <link>https://medium.com/@Akashsenta?source=rss-91bfcef34be1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 01:23:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Akashsenta/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[Create Words Dictionary using Python]]></title>
            <link>https://medium.com/@Akashsenta/create-words-dictionary-using-python-5c762c8c7cd8?source=rss-91bfcef34be1------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c762c8c7cd8</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Akash Senta]]></dc:creator>
            <pubDate>Mon, 30 Sep 2019 05:37:54 GMT</pubDate>
            <atom:updated>2019-09-30T05:37:54.778Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*9YrRu8gxoU_fU_UDojflRA.jpeg" /></figure><p>Hello Friends, Today we are going to build a simple words dictionary using python and a JSON file which contains words. Dictionary can help you to get meanings and details about some words and also it can provide you suggestions if similar words search.</p><p>First of all, we need to import as below</p><pre>import json<br>from difflib import get_close_matches   # this is to get closer match from list</pre><p>Reference: <a href="https://docs.python.org/3/library/difflib.html">https://docs.python.org/3/library/difflib.html</a></p><p>Once our import is done you will require a JSON file which contains all words. you can download it from <a href="http://akashsenta.com/files/data.json">here</a></p><pre># load data from json file<br>data = json.load(open(&#39;data.json&#39;))</pre><p>We can use a JSON library provided by python to load a JSON file as above mentioned code. it will create data object which has all JSON file data loaded and parsed. now let’s work on the actual dictionary part.</p><pre># function which will provide information<br>def translate(w):<br>    if w in data:<br>        return data[w]<br>    elif len(get_close_matches(w, data.keys())) &gt; 0:<br>        print(&quot;Did you mean %s instead? &quot; %<br>              get_close_matches(w, data.keys())[0])<br>        ans = input(&#39;Enter y or n:&#39;)<br>        if ans.lower() == &#39;y&#39;:<br>            return data[get_close_matches(w, data.keys())[0]]<br>        else:<br>            return &quot;did not find that word&quot;<br>    else:<br>        return &quot;The word doesn&#39;t exist. please double check it.&quot;</pre><p>We have created a function with name <strong><em>translate</em></strong><em> </em>which takes w (word) as input and check if our word is present in our data object (as a key) if that’s true it will return details from the dictionary.</p><p>or it will use <strong><em>get_close_matches </em></strong>function to fetch similar words from the dictionary and ask user input if we mean any of those words if we press <strong>yes</strong> it will provide the best match and return it as output else it will show that no word found. Now lets’ take input from the user.</p><pre># input from user<br>word = input(&#39;Enter Word you want to search : &#39;)</pre><p>So we are almost done with our logic, input and output part. now let’s run code using the below function.</p><pre># call function<br>output = translate(word.lower())<br>if type(output) == list:   # we are checking if it returns list or word<br>    for item in output:<br>        print(&quot;-&gt; &quot; + item)<br>else:<br>    print(output)</pre><p>Finally, the whole code will look like this as shown below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*ELu238NN--eyO6Rz8FXacQ.png" /><figcaption>Python code</figcaption></figure><p>Great, Now let’s check the output of the above code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*F7P8UrwIigfkVEO6Ekf2GQ.png" /><figcaption>Output</figcaption></figure><p>Originally published on <a href="http://akashsenta.com/blog/create-words-dictionary-using-python/">http://akashsenta.com/blog/create-words-dictionary-using-python/</a></p><p>Please like, clap and share if you find this code useful.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c762c8c7cd8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Book - A tool to validate your thoughts]]></title>
            <link>https://medium.com/@Akashsenta/hello-friends-i-wanted-to-share-few-thoughts-with-you-about-my-book-reading-experience-7821b1d5ffa7?source=rss-91bfcef34be1------2</link>
            <guid isPermaLink="false">https://medium.com/p/7821b1d5ffa7</guid>
            <category><![CDATA[reading]]></category>
            <category><![CDATA[thoughts]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[books]]></category>
            <category><![CDATA[entrepreneurship]]></category>
            <dc:creator><![CDATA[Akash Senta]]></dc:creator>
            <pubDate>Sun, 12 Mar 2017 04:42:54 GMT</pubDate>
            <atom:updated>2017-03-12T05:43:50.433Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello friends,<br>I wanted to share few thoughts with you about my book reading experience.</p><p>Currently as I am at a intial stage to start a habit to read more books. I found that every book you read will help you to validate your thoughts and ideas. It tweaks your point of views about how that particular things should happen by examples from people who had same experience as you have in their past.</p><p>I highly recommend to read more books while you are looking forward to start something or thinking about to start your dream journey, as I think as a person with innovative mind, you are always looking for right person who can listen your idea and validate it, give more inputs and improvements which will finally leads to your perfect product or service or success. Believe me a book can be effective same as your best friend or mentor.</p><p>A perfect book in perfect situation is like hammering a beautifully designed gold ring to particular points or hit a nicely carved diamond while they are heading towards to their perfect shape.</p><p>I hope it will inspire you to read more books that will help you to maintain your perfect path to your dreams.</p><p>Read more...listen more..Apply wisely..<br>Thank you.</p><p>— Akash Senta</p><p>Founder/CEO, Spring infosoft</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7821b1d5ffa7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>