<?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 Pravendra Singh on Medium]]></title>
        <description><![CDATA[Stories by Pravendra Singh on Medium]]></description>
        <link>https://medium.com/@hackpravj?source=rss-cdd8ac8bf422------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*b1c2DB_3BY3wX14t.jpeg</url>
            <title>Stories by Pravendra Singh on Medium</title>
            <link>https://medium.com/@hackpravj?source=rss-cdd8ac8bf422------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 04:27:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hackpravj/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[Effective onboarding: Another lens to look at the first 90 days]]></title>
            <link>https://medium.com/vernacular-ai/effective-onboarding-another-lens-to-look-at-the-first-90-days-86402731e195?source=rss-cdd8ac8bf422------2</link>
            <guid isPermaLink="false">https://medium.com/p/86402731e195</guid>
            <category><![CDATA[vernacular-ai-product]]></category>
            <category><![CDATA[onboarding]]></category>
            <category><![CDATA[culture]]></category>
            <category><![CDATA[hiring]]></category>
            <category><![CDATA[startup]]></category>
            <dc:creator><![CDATA[Pravendra Singh]]></dc:creator>
            <pubDate>Fri, 02 Oct 2020 15:55:07 GMT</pubDate>
            <atom:updated>2020-10-02T15:55:07.120Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s agree on some numbers before we talk about anything else.</p><ol><li>A new employee that isn’t onboarded properly, costs the company at least 3X the salary.</li><li>Around 20% of employee turnover happens within the first 1.5 months.</li></ol><blockquote>You never get a second chance to make the first impression.</blockquote><p>To put it simply, if your hiring process ends at the candidate accepting the offer, there is an elephant in the room. Don’t feed it anymore.</p><p>This write-up will talk about a framework for effective onboarding from a team’s perspective, built on top of the lessons learned as the team tackled the exact same problem.</p><p>On top of that, add the context that the team was playing a central role, wearing at least 4 hats (read “roles”), which is typical for a startup environment.</p><p>It was challenging to the point where the team started to have problems performing their “core” role, in order to keep everything else working.</p><p>Quickly getting the new members up and running felt like the next logical step.</p><h4>Understanding the problem</h4><p>It’s important to understand the problem-space addressed here before moving forward. This article covers setting an environment where the employee can start making an impact as early as possible.</p><p>What’s not covered:</p><ul><li>General company orientation</li><li>Remote onboarding problems during COVID-19.</li></ul><p>If you’ve read the book “The First 90 Days,” it talks about the concept of “The break-even point.”</p><p>This is the point in time after your transition to the new role, where you’ve generated as much value for the organization as you’ve consumed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o2KSFLjdfGYcgufzSMrahQ.jpeg" /></figure><p>As an employee moving to a new role, your goal is to get to the break-even point as quickly as possible.</p><p>But the real experience is quite different from what was portrayed in the book. As a new employee, you don’t have to wait for all the relevant value to be consumed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-RdBQDK3861-WqWHQ5D8FA.jpeg" /></figure><p>In reality, the exchange of value is a rather ongoing process. A new employee shouldn’t be stopped from generating value until the consumption is done.</p><p>Now that you’re on the same page (and on the exact same line), we will talk about how to achieve the continuous value exchange.</p><h4>Facilitating the continuous value exchange</h4><p>Based on the above-mentioned structure, setting up an environment of a continuous value exchange depends on two factors.</p><ol><li>Removing friction during the value-consumption</li><li>Accelerating the value-generation (perceived and real)</li></ol><p>If your organization is able to cover two factors, it will end up creating an environment for the new employee to thrive.</p><h4>Removing friction during the value-consumption</h4><p>Transitions are periods of acute vulnerability where a new candidate lacks established working relationships and a detailed understanding of the role.</p><p><strong>Socialization</strong></p><p>As per Google’s <a href="https://rework.withgoogle.com/blog/five-keys-to-a-successful-google-team/">Project Oxygen research</a>, it’s important to count on each other to be able to do high-quality work as a team.</p><blockquote>Along with vertical relationships, it’s equally important for a new candidate to establish horizontal relationships to build a supportive alliance.</blockquote><p>In order to help establish these required relationships, we setup informal catch-up sessions between the existing and the new candidates during the first week.</p><p>These sessions covered interactions with the members from:</p><ol><li>Consumer team (a team that uses work done by the candidate’s team)</li><li>Provider team (a team that provides work/support to the candidate’s team)</li></ol><p>We had an existing agenda for the different types of sessions, which was flexible enough to ensure the discussions aren’t being modeled strictly but gave enough direction to the new candidates.</p><p><strong>Personalization</strong></p><p>Even though every candidate comes through the same interview process, everyone has their own way of working, learning, and making an impact. Given this information, a universal-cure for all the problems won’t work out in this case.</p><p>If you&#39;re using a single method to onboard every other candidate, you should look closely at the feedback provided by the employees. It will be clear that a single way to deliver content and teach doesn’t work for everyone.</p><p>This requires you to personalize your onboarding sessions for each individual (and role).</p><p>Here are some of the initiatives we have taken to personalize the onboarding experience.</p><ol><li>Curated content/material to read that’s specific to the individual’s context (a section of the organization’s wiki)</li><li>Course design to onboard team members new to their specific function, with personalized assignments based on their context</li></ol><h4>Accelerating the value-generation</h4><p>The previous section talked about removing friction during the value-consumption period for a new candidate. At the same time, it’s important to provide relevant value-generation opportunities to the new member.</p><p><strong>Small wins</strong></p><p>Securing small wins early in the transition journey helps the new members build their credibility and give them a sense of momentum to continue working in the right direction.</p><blockquote>Frame a situation as an opportunity rather than a problem</blockquote><p>In the early days, the new member might not have the complete picture to take the relevant actions in any given situation.</p><p>This requires additional efforts to ensure you’re framing it as an opportunity and giving enough supporting material, instead of painting the situation as a problem.</p><blockquote>In one instance, the team backed a new member in our CUX team to structure and present a potential solution to the customer team, just on her second day.</blockquote><blockquote>Eventually, it resulted in a huge compliment from their CTO, and this small-win was enough to provide a boost to her onboarding.</blockquote><p><strong>Be vulnerable</strong></p><p>We can all agree that trust is the key element to transform a group of people into a team. Without trust, we just coordinate with each other at best, there is no true collaboration.</p><p>According to Patrick Lencioni, the <strong>absence of trust</strong> is the first dysfunction of a team. It’s the fear of being vulnerable with each other that prevents team members from building trust with each other.</p><blockquote>In order to be a functional team, we try to be vulnerable with each other wherever necessary.</blockquote><p>We talk about negative things or unsolved areas during the onboarding period itself.</p><p>This acts as a catalyst, and the new members go all-in to solve the problems for the team.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*qcordAG-fS0_FKcZrLPMhw.png" /><figcaption>We follow the same principle during hiring as well</figcaption></figure><h4>Summary</h4><p>To summarize it all, the new members joining your team will do their best to start making an impact, but it’s the team’s job also.</p><blockquote>An effective onboarding happens when the <em>perceived</em> context-switch is minimal.</blockquote><p>Here are some practices we have employed to create a resonating environment faster for new members of our team.</p><ul><li>Help the new team members socialize with the relevant team members</li><li>Personalize the onboarding or learning period for the members</li><li>Help the new members secure small wins early on</li><li>Build trust and get involvement by being vulnerable where it’s right</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86402731e195" width="1" height="1" alt=""><hr><p><a href="https://medium.com/vernacular-ai/effective-onboarding-another-lens-to-look-at-the-first-90-days-86402731e195">Effective onboarding: Another lens to look at the first 90 days</a> was originally published in <a href="https://medium.com/vernacular-ai">Skit</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Voice AI/Automation Must Be Adopted by BFSI Call Centers]]></title>
            <link>https://medium.com/vernacular-ai/why-voice-ai-automation-must-be-adopted-by-bfsi-call-centers-a94b0907ed0a?source=rss-cdd8ac8bf422------2</link>
            <guid isPermaLink="false">https://medium.com/p/a94b0907ed0a</guid>
            <category><![CDATA[voice-assistant]]></category>
            <category><![CDATA[business]]></category>
            <category><![CDATA[banking]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Pravendra Singh]]></dc:creator>
            <pubDate>Mon, 23 Dec 2019 11:09:52 GMT</pubDate>
            <atom:updated>2019-12-23T11:10:36.263Z</atom:updated>
            <content:encoded><![CDATA[<p>Voice AI/Automation has a strong foothold in today’s market. Interacting with voice platforms such as <a href="https://assistant.google.co.in/intl/en_in/platforms/phones/?gclid=EAIaIQobChMIjYvr_di-5gIVS4WPCh24DwaTEAAYASAAEgJXcPD_BwE">Google Assistant</a>, <a href="https://www.apple.com/in/siri/">Siri</a>, and <a href="https://www.amazon.in/amazon-echo/b?ie=UTF8&amp;node=14156834031">Alexa</a>, have made our lives easier. This technology has enabled us to accomplish routine tasks much faster than ever before. That’s why these platforms have been highly successful from a customer and a business perspective.</p><p>Customers expect instant gratification and personalization from every business, irrespective of the industry they function in. Businesses have to be customer-driven and not sales-driven, to fuel innovation and growth. That said, most businesses skip this approach at some point along the customer journey.</p><p>A good example of this is the service sector of the BFSI industry. We have all dreaded the idea of contacting a BFSI service team to resolve an issue. That dread stems from bad automation/experience.</p><p>Let us view two common aggravations customers face when they engage with call centers:</p><p>a. <strong>Long Hold Times:</strong> customers always want a quick resolution to their problems, this requires the undivided attention of the call center agent. when a call agent puts the customer on hold, it annoys the customer and kills the most precious commodity to them — time.</p><p>b. <strong>Inadequate Information:</strong> call center agents need to have all the answers to a customer’s issue, when they don’t possess the knowledge required to resolve the query it frustrates the end customer leading to a bad experience.</p><p>Customers hate engaging with outdated systems, they get frustrated by the experience and tend to detract.</p><p>This cycle of bad automation leading to bad experience has continued for far too long and even exists today. The resulting impact has proven to be detrimental to growth.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/30/0*uq8TjzPgtTQ0I8f_" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lsTDmsfQSjrjrnOO.jpeg" /></figure><p><strong>Why Have BFSI Call Centers Failed?</strong></p><p>The answer to this question is partly technical and partly operational.</p><p><strong>Slow Adopters:</strong></p><p>The delay in the adoption of <a href="https://www.forbes.com/sites/forbestechcouncil/2019/07/11/how-far-can-voice-automation-take-you/#751a6b1a3a70">new technology</a> has always impacted service sectors across industries, but this is more evident with contact centers. The technology they currently use is the best-automated system of the latter years, and as time progresses their system remains the same while the world has progressed further into convenience.</p><p>This delay in adoption troubles both businesses and customers. To gain a better <a href="https://www.callcentrehelper.com/the-top-ten-call-centre-problems-12637.htm">insight</a>, let’s look at this experience as an average customer:</p><p>When we contact support at any BFSI entity, we are ideally engaging with automated systems. The first one is a number-based dial system, that informs you about the available options. This system usually takes the customer through three or four steps before they get to the option that solves their query. sometimes the option provided may not even be the expected solution.</p><p>The second system is chatbots, wherein you engage directly with an automated system in a chat format. The issue with this system is the lack of personalization. Most chatbots are configured to resolve customer issues based on a generic approach. It presumes that the problem faced is the same for all, disregarding the point of context. When individuals are dealing with financial issues, this system can be frustrating.</p><p>This form of technological lapse results in low CSAT scores and dipping customer loyalty.</p><p><strong>Routine Nature of Work:</strong></p><p>Call centers are usually plagued with operational issues that reflect negatively while engaging with a customer. One such issue is as follows:</p><p>80% of call center queries are on 20% of topics covered (FAQ’s), this entails that the call centers frontline deals with repetition, causing decreased morale amongst employees. This decrease eventually leads to a high attrition rate (30% to 45% amongst mid to large call centers), which damages the entity.</p><p>Every call center invests a minimum of $5000 in hiring and training a single employee. If that employee leaves the company, the return on investment is lost.</p><p>The same investment can be utilized to implement advanced voice AI/automation technologies, which deal with repetition. Eventually side-lining the entire attrition process.</p><p><strong>What Can BFSI Service Centers Do to Course-Correct?</strong></p><p>The most obvious thing to do right now is to invest more in future technologies such as voice AI/automation. Most businesses with high customer satisfaction (During support engagement) have implemented this technology, to ensure high productivity internally and to have the first-mover advantage.</p><p><strong>Voice AI/Automation:</strong></p><p>Voice AI/Automation helps reduce human effort and error, thereby improving the efficiency of call centers. The technology is developed utilizing artificial intelligence (<a href="https://searchenterpriseai.techtarget.com/definition/AI-Artificial-Intelligence">AI</a>), machine learning (<a href="https://www.geeksforgeeks.org/ml-machine-learning/">ML</a>) and natural language processing (<a href="https://towardsdatascience.com/your-guide-to-natural-language-processing-nlp-48ea2511f6e1">NLP</a>), This ensures that the technology is ubiquitous and seamless.</p><p>In simpler terms, this allows individuals to interact with machines to accomplish their tasks, may it be to play music, to book a reservation or to resolve an issue.</p><p>The benefits of this technology are speed, personalization, convenience, and accuracy.</p><p><strong>Let’s Look at Three Ways This Technology Can Benefit BFSI Call Centers:</strong></p><p><strong>Reduction in Cost: </strong>The biggest advantage of utilizing this technology in support format is the reduction of cost. Most call centers currently possess large sets of human resource, they are bifurcated into teams and are expected to handle various issues. The voice AI/automated technology will help in addressing 80% of repetitive inquiries, allowing call centers to host small compact teams. This allows them to focus their efforts on resolving the 20% of customer issues that are complicated or urgent and at the same time free up training costs for other business needs.</p><p><strong>Higher Employee Retention: </strong>Since only small teams are required in a voice automated call center, they can get to be more productive by addressing real issues, thereby lowering attrition rates. Whereas In a traditional call center, a staff member would leave after<a href="https://www.avoxi.com/blog/call-center-attrition-turnover-rates/"> 1.5 years of service</a>. This is mainly due to low morale and repetitive work as mentioned earlier.</p><p><strong>First Call Resolution: </strong>When individuals contact call centers, they expect a good experience but instead are received by an outdated system that takes time to resolve their issue, this usually pushes the customer to hang up and become a detractor. With voice AI/automation platforms, they can ensure a quick response and resolution, thereby reducing the number of hang-ups. Eventually boosting CSAT scores.</p><p>These benefits play a huge role in boosting customer experience and loyalty. Loyalty plays a huge role in bringing in new prospects into the marketing cycle. One such platform that can provide these benefits to BFSI call centers is <a href="https://vernacular.ai/">Vernacular.ai’s</a> multilingual voice AI platform — VIVA.</p><p><a href="https://vernacular.ai/call-centre-automation.html">VIVA</a> is a unique service that helps accelerate your engagement strategy and utilizes cutting edge speech recognition and NLU technology. It allows your call center to provide the best engagement possible. It is an intelligent, multilingual platform that can help automate up to 80% of call center operations. With 100,000+ hours of training data, VIVA can help businesses boost customer stickiness and loyalty through a deep understanding of the customer’s context and intent.</p><p>Systems like this one can help boost customer loyalty, experience, and allow businesses to define measured engagement.</p><p><a href="http://bit.ly/BFSI-VoiceAuto">Get in touch</a> with us to know more about how Voice AI/automation can support your business.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a94b0907ed0a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/vernacular-ai/why-voice-ai-automation-must-be-adopted-by-bfsi-call-centers-a94b0907ed0a">Why Voice AI/Automation Must Be Adopted by BFSI Call Centers</a> was originally published in <a href="https://medium.com/vernacular-ai">Skit</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to solve Google’s Semantris game using OpenCV and Word2Vec]]></title>
            <link>https://medium.com/free-code-camp/solving-googles-semantris-using-opencv-and-word2vec-7ea5eb36d0c7?source=rss-cdd8ac8bf422------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ea5eb36d0c7</guid>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Pravendra Singh]]></dc:creator>
            <pubDate>Mon, 24 Dec 2018 22:30:58 GMT</pubDate>
            <atom:updated>2019-01-18T16:48:43.796Z</atom:updated>
            <content:encoded><![CDATA[<h4>Writing a program to play Google Semantris</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FYMv5pI8NInQAp1jQK6EIg.jpeg" /></figure><blockquote>Automation is good, so long as you know exactly where to put the machine. — Eliyahu Goldratt</blockquote><blockquote><a href="https://research.google.com/semantris/">Semantris</a> is a set of word association games by Google that use semantic search to predict a relevant word in the game based on the player’s input.</blockquote><p>There are 2 modes available in the game.</p><p><strong>ARCADE</strong></p><p>Arcade mode requires the player to come up with associated words for certain words. You are supposed to think and enter as fast as you can before an increasing list of words fills your screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*ASVWg8hkhtBHdtdpJMiqLQ.gif" /><figcaption>Semantris ARCADE mode</figcaption></figure><p><strong>BLOCKS</strong></p><p>Blocks is a turn-based game mode. You can take your time to come up with different types of clues and see which ones the game understands best.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*-CEfzr_8hsgBC3dGNBSFhQ.gif" /><figcaption>Semantris BLOCKS mode</figcaption></figure><p>After playing for a while, I realized both the game modes are using <a href="http://www.peachpit.com/articles/article.aspx?p=98123&amp;seqNum=2">pattern recognition as the main game-play mechanism</a>. That’s when I started wondering if it could be automated.</p><h3>Turns out, it can be</h3><p>Semantris-Solver uses the following procedure to play the game:</p><ul><li><strong>Capture the current game state using computer vision techniques</strong></li><li><strong>Identify the word to enter for higher-reward/longer-gameplay</strong></li><li><strong>Find the associated word using word-embeddings</strong></li></ul><p>In the following sections, we are going to dive into the working of Semantris-Solver for both the game modes.</p><h3>ARCADE</h3><p>A human player will use the following moves to play the arcade mode:</p><ul><li>Find one or more highlighted words in the game</li><li>Get these words in the highlighted area by entering the associated word for them</li><li>Keep doing this before you run out of space on your screen for new words</li></ul><blockquote><em>Also, there are three types of theme colors in arcade mode.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FYMv5pI8NInQAp1jQK6EIg.jpeg" /><figcaption>Semantris ARCADE theme colors</figcaption></figure><p>You will realize that the theme color isn’t playing any role here — the game playing mechanism will remain the same if we change the theme color. What changes is the definition of the highlighted word.</p><blockquote><em>A word is </em><strong><em>highlighted</em></strong><em> if it has a pointer shape left of it, (‎▶ </em><strong><em>Ship</em></strong><em>) in this case.</em></blockquote><h4>Color space conversion</h4><p>ARCADE mode of Semantris-Solver starts with capturing a screenshot of the laptop screen and converting it into a gray-scale image, agnostic of the actual color.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a149f9038b0053ff8fcae88db15c46f3/href">https://medium.com/media/a149f9038b0053ff8fcae88db15c46f3/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*gP7jPgkVTBZz21TG5yu-7w.png" /><figcaption><em>Semantris ARCADE mode (gray-scale)</em></figcaption></figure><h4>Template matching</h4><p>Our next step will be to find the highlighted word in the captured image. OpenCV provides a method called <a href="https://docs.opencv.org/3.3.0/d4/dc6/tutorial_py_template_matching.html">Template Matching</a> for searching and finding the location of a template image in a larger image.</p><p>We will use a cropped version of the pointer shape (▶) as a template image, to find its location in the captured screen.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1bed612577a67b98b2af8bb2747bffbc/href">https://medium.com/media/1bed612577a67b98b2af8bb2747bffbc/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/1*zEAmRMZ4gbh392Yq_rlZpQ.png" /><figcaption><em>Semantris ARCADE highlighted word selection</em></figcaption></figure><h4>Optical character recognition (OCR)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*DzR7dHo936cLxjeCdPNqRw.png" /><figcaption>Highlighted word image</figcaption></figure><p>Based on the pointer’s location, a section is cropped right next to it, with the highlighted word.</p><p>The cropped image is converted into text using <a href="https://github.com/tesseract-ocr/tesseract">Tesseract OCR</a>; in this case, it will give us <strong>Ship</strong>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8dccdfefe2c3fc23d1106398775b5216/href">https://medium.com/media/8dccdfefe2c3fc23d1106398775b5216/href</a></iframe><blockquote>In case of more than one highlighted words, they are entered one after another to keep the game moving.</blockquote><h4>Associated word selection (Using Word Embeddings)</h4><p><a href="https://github.com/mmihaltz/word2vec-GoogleNews-vectors">Word2Vec pre-trained on Google News corpus</a> is used as a word embedding model to find the <a href="https://radimrehurek.com/gensim/models/word2vec.html#gensim.models.word2vec.Word2Vec.most_similar">most similar</a> words (associated) for a given word.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f8841480f3568efa289a9d61751a1f08/href">https://medium.com/media/f8841480f3568efa289a9d61751a1f08/href</a></iframe><p>In this case, it will return “<strong>vessel”</strong> to enter as an associated word for “<strong>ship”</strong> (<em>after removing morphologically similar words</em>).</p><blockquote><em>The program will enter this associated word and capture the updated game screen to continue.</em></blockquote><h3>BLOCKS</h3><p>In this mode, there are word-blocks with four possible colors for a given theme. The word-blocks might or might not contain a word in them.</p><p>Entering the associated word for a word-block will remove the same colored blocks connected to it, like the good old <strong>Tetris</strong>.</p><p>A human player will use the following moves to play the arcade mode:</p><ul><li>Enter the associated word for a word-block, connected with most same colored word-blocks (if possible)</li><li>Keep doing this before you run out of space on your screen for new words</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/1*3zS9PmEJFX47g2q4hfdDhg.png" /><figcaption>Semantris BLOCKS mode captured screen</figcaption></figure><p>You will realize that the color of a word-block is playing a significant role this time. You will have to enter the associated word for a word-block connected with more same colored blocks to score higher points.</p><blockquote><em>On top of this, there are three types of theme colors in blocks mode.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jHXOeWmDiepucJyO9eP-OQ.jpeg" /><figcaption>Semantris BLOCKS theme colors</figcaption></figure><h4>Color palette generation</h4><p>This time we can’t convert the captured image into its gray-scale version. We need to know the color attributes to be able to distinguish between different word-blocks.</p><p>Running <strong>K-mean clustering</strong> on the pixels of the captured screen will give us all the prominent colors in the image after excluding background colors such as white (text-color), black (background-color), and gray (text-input).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c8f372d47f2523753a1414e2c06eb03/href">https://medium.com/media/3c8f372d47f2523753a1414e2c06eb03/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/372/1*I4GFZLlX2n1wLWM0UJgw4Q.png" /><figcaption><em>Semantris BLOCKS theme color palette</em></figcaption></figure><h4>Contour detection</h4><p>Now that we have all the four colors in the current theme, we need to know which word-block to choose to get maximum points.</p><p>In other words, if we calculate the area of every connected-word-block-group (<em>word-blocks of the same color connected to each other</em>) and select the one with the maximum area, we will get the desired connected-word-block-group.</p><blockquote><a href="https://docs.opencv.org/3.4/d4/d73/tutorial_py_contours_begin.html"><em>Contour</em></a><em> is a curve joining all the continuous points along a boundary, having same color or intensity.</em></blockquote><p>A word-block group can be considered a contour of that color; if it’s connected to more blocks with the same color, the contour’s area will be the sum of the connected word-blocks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/1*POkYHfLEMRfRwMVKV0KnVQ.png" /><figcaption>Semantris BLOCKS mode with maximum area contour highlighted</figcaption></figure><p>Contours are calculated (using OpenCV’s <a href="https://docs.opencv.org/3.3.1/d3/dc0/group__imgproc__shape.html#ga17ed9f5d79ae97bd4c7cf18403e1689a">findCountours</a> function) for all the word-block colors separately and the one with the maximum area is selected.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/089b36d9c2a9d4c60179659b967507b6/href">https://medium.com/media/089b36d9c2a9d4c60179659b967507b6/href</a></iframe><p>We can select the maximum area contour by doing a bitwise-and operation between the captured screen and the contour mask.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*S5XyET4u8aBTd64IU5m-aw.png" /><figcaption>Maximum area contour</figcaption></figure><h4>Word detection (Using Tesseract and Word2Vec)</h4><p>The contour image is converted into text using <a href="https://github.com/tesseract-ocr/tesseract">Tesseract OCR</a>; in this case, it will give us <strong>Garden</strong>.</p><p>Similar to the arcade mode, we will use Word2Vec to find the most similar word to it, which will be <strong>Flower beds</strong> this time.</p><h3>Improvements</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*tIgIoMSbvcmKj2yTXDuk1g.png" /><figcaption>Contour with failing OCR</figcaption></figure><p>In certain scenarios, the current OCR process doesn’t recognize the word properly.</p><p>For example, it would return “<strong>Eloctrlclty”</strong> for this contour instead of “<strong>Electricity”</strong>.</p><p>Given that it’s an invalid word suggestion, the Word2Vec model will not return any similar word for it. In that case, the suggested word itself is entered as an associated word, just to keep the game moving.</p><blockquote>A spelling correction model can help here, correcting <strong>Eloctrlclty</strong> to <strong>Electricity.</strong></blockquote><blockquote><em>I have created an </em><a href="https://github.com/pravj/semantris-solver/issues/7"><em>issue</em></a><em> on the GitHub repository for the same, feel free to contribute if you like. 😄</em></blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FE8QSteLOuns%3Fstart%3D251%26feature%3Doembed%26start%3D251&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DE8QSteLOuns&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FE8QSteLOuns%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/baa03f943dc67a3f82573a7c3b254a45/href">https://medium.com/media/baa03f943dc67a3f82573a7c3b254a45/href</a></iframe><h3>Source code</h3><h4><a href="https://github.com/pravj/semantris-solver">Semantris-Solver</a> (GitHub)</h4><p>It’s implemented as a CLI tool that allows you to switch between the game modes. You can check the <strong>IPython notebooks</strong> implementing both the modes.</p><ul><li><a href="https://github.com/pravj/semantris-solver/blob/master/notebooks/Semantris%20Arcade%20Mode.ipynb">ARCADE mode</a></li><li><a href="https://github.com/pravj/semantris-solver/blob/master/notebooks/Semantris%20Block%20Mode.ipynb">BLOCKS mode</a></li></ul><h4>Dependencies</h4><p>It wasn’t possible to build Semantris-Solver without the following software tools.</p><ul><li>OpenCV</li><li>Word2Vec (gensim)</li><li>pyautogui (taking the screenshot and entering associated words)</li><li>Tesseract (OCR)</li></ul><p>Hope you liked my weekend hack story. Feel free to provide your feedback.</p><p>Follow me on Twitter <a href="https://medium.com/u/cdd8ac8bf422">Pravendra Singh</a> or check my personal website <a href="https://hackpravj.com/">hackpravj.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ea5eb36d0c7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/free-code-camp/solving-googles-semantris-using-opencv-and-word2vec-7ea5eb36d0c7">How to solve Google’s Semantris game using OpenCV and Word2Vec</a> was originally published in <a href="https://medium.com/free-code-camp">We’ve moved to freeCodeCamp.org/news</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Holy Aesthete : painting a virtual wall]]></title>
            <link>https://medium.com/@hackpravj/holy-aesthete-painting-a-virtual-wall-82b0c88fb751?source=rss-cdd8ac8bf422------2</link>
            <guid isPermaLink="false">https://medium.com/p/82b0c88fb751</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[golang]]></category>
            <category><![CDATA[art]]></category>
            <dc:creator><![CDATA[Pravendra Singh]]></dc:creator>
            <pubDate>Fri, 06 Mar 2015 20:15:10 GMT</pubDate>
            <atom:updated>2015-03-06T20:18:41.935Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/0*STnWjzFq_iYDB8ky.jpg" /></figure><blockquote>Today in India, it’s the day of <a href="http://en.wikipedia.org/wiki/Holi"><em>Holi</em></a>, the festival of colors.</blockquote><p>Yesterday, it was the end of our midterm exams. \o/.</p><p>During the last minutes, I decided to stop writing after matching an answer with the person sitting next to me. I was all set to run outside the hall and smell the <em>woot! no more exams left</em> scent in the air.</p><p>I have one strange habit of drawing random things in my notebook, ranging from literally anything to <em>K-nearest</em> girls. All the drawings are terrible though.</p><p>So I started utilizing rest of the time by drawing in the backside of exam paper. After a little journey to some wonderland, I had this weird sounding thought in my mind, <em>to write something that simulates a painted wall.</em></p><p>Then the exam ended, we left the hall, enjoyed the <em>Holi</em> all day with batchmates.</p><p>That <em>weird thought</em> was still there in my mind, deep somewhere. I decided to give it a shout next morning. And you never need a <em>halcion</em> after ~40 hours of <em>not sleeping</em> and doing <em>not so successful</em> attempt of <em>cram</em>.</p><p>Today, I started justifying that thought, picked up <em>golang</em> for it and created a directory, <em>~/go/src/github/pravj/wall</em></p><blockquote>Wait! let’s talk over. Have you ever painted a wall before?</blockquote><p>Well! I have. If not, you must have seen people doing it. <em>What happens when you start with the brush?</em> Something like this picture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/0*9_M7PVtAphzJO3wg.jpg" /></figure><p>Here in the picture, the part painted by each color doesn&#39;t have a specific shape.</p><p>So, in my attempt, I assumed that there exists a central rectangular shape in color block generated by each brush swipe. And the final block also contains some <em>noise</em> around that rectangle, resulting in the final irregular shape.</p><p>I started with those rectangles, equally spaced with each other. The space was for the noise interference I was planning. Result was this, fix colored image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/0*3_Xgrpz8JPDnUaMQ.jpg" /></figure><p>Then I added the noise on each rectangle. For this, instead of fix sized rectangle. I added some random lengthy stripes around the block, colored same as the block. The result was this image, fixed color again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/0*mIZmXpK3dqy8QD8X.jpg" /></figure><p>After applying random colors to each block, it generates image similar to the one given below. The ideal thing to do would be, coloring each block in a way that it’s different from its surrounding block color. Something like the classical <a href="http://en.wikipedia.org/wiki/Four_color_theorem">Four Color Theorem</a>, variant of the <a href="http://en.wikipedia.org/wiki/Constraint_satisfaction_problem">Constraint satisfaction problem</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/0*fpbilhdRxN4Q6PlP.jpg" /></figure><p>But in this case, the probability of the ideal case violation is <em>lilliputian</em>.</p><p>Precisely, for a <a href="http://en.wikipedia.org/wiki/Cross">slanted saltire(cross)</a> shape divided in five squares, the probability of central square having same color as any surrounding square will be around 2 in 10 million.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*__acD3Icge3feHtE.png" /></figure><p>So let’s ignore it like a pigeon closing its eyes in front of a venerer cat.</p><p>Now I was concerned about the equally spaced color blocks. Things were still not in the way I wanted them to be. It looked like there is a pattern inside. As systems having more entropy are more stable and <em>beautiful</em>. I decided to put color blocks at random places in the image, result was this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/0*S-Orcu_-vX7dcd3J.jpg" /></figure><p>After this all, the central rectangle that I have assumed for the structure, was clearly visible in the block. To conceal that, I formatted the block such that the <em>noise</em> along the block-width depends on the index of the row in block matrix. Now, it was better than the last one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/0*edXGsmaZhGCFl4Ag.jpg" /></figure><p>This is what I have thought about. A wall painted by some children in their tiffin time.</p><p>This may sound like a dumb thing to work on, it’s actually. It’s just a combination of some <em>for</em> and <em>if-else</em> loops.</p><p>But this is more than just dumb, now I feel relieved as I made it real what I have thought about, something like Aaron has said.</p><blockquote>Behind the scene</blockquote><ul><li>While doing this, I painted one of my room wall, <em>hypothetically</em>.</li><li>You must have got the idea behind this post’s heading. <em>The Holi Fever</em>.</li><li>Today, my room’s light is not working and I wrote this in the screen light.</li></ul><blockquote>Source Code : <a href="https://github.com/pravj/virtual-wall">virtual-wall</a></blockquote><p><em>Originally published at </em><a href="http://pravj.github.io/blog/painting-a-virtual-wall/"><em>pravj.github.io</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82b0c88fb751" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>