<?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 Jay Shankarpure on Medium]]></title>
        <description><![CDATA[Stories by Jay Shankarpure on Medium]]></description>
        <link>https://medium.com/@jayshankarpure?source=rss-230feb7b5d61------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*7kH-MqRqbo0XBGLO4ErJcw.jpeg</url>
            <title>Stories by Jay Shankarpure on Medium</title>
            <link>https://medium.com/@jayshankarpure?source=rss-230feb7b5d61------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 20:08:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jayshankarpure/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[Inner Workings of Sentiment Analysis]]></title>
            <link>https://medium.com/@jayshankarpure/inner-workings-of-sentiment-analysis-7b88ccc6baf3?source=rss-230feb7b5d61------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b88ccc6baf3</guid>
            <category><![CDATA[sentiment-analysis]]></category>
            <category><![CDATA[artificalintelligence]]></category>
            <dc:creator><![CDATA[Jay Shankarpure]]></dc:creator>
            <pubDate>Tue, 03 Oct 2023 15:45:22 GMT</pubDate>
            <atom:updated>2023-10-03T15:45:22.822Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-f9TU9IQ5vf7yc3IAk2OIA.png" /></figure><p>You being a curious person, go on ChatGPT and ask it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FSftK8C2x9-UeM9z" /></figure><p>Now, you may wonder, how does ChatGPT an AI model predict the sentiment of a sentence created out of Natural language so accurately?</p><h3>Overview</h3><p>Sentiment analysis is being used widely in many fields, from predicting the movement of a stock based on the sentiment of articles, tweets, news, and financial reports on it to political parties tracking to check the effectiveness of their campaigns. From helping businesses gauge customer satisfaction based on reviews &amp; feedback to social media marketing managers, sentiment analysis is everywhere.<br>Looking at a field with thousands of applications, it becomes vital for us to understand EXACTLY how it works. What’s Sentiment? What’s Sentiment Analysis? How does an AI model in sentiment analysis work? Let’s break it all down in this article.</p><h3>Sentiment</h3><p>For starters what does Sentiment even mean?<br>Sentiment basically means the emotional tone or attitude expressed in a given statement, It reflects the overall feeling of a statement. Sentiment can be positive, negative, or neutral, and it can also vary in intensity.<br>For example -</p><ol><li>“I love spending time with my family.” — positive sentiment</li><li>“The sky is blue.” — neutral sentiment</li><li>“I failed the exam, and I’m devastated.” — negative sentiment.</li></ol><p>Getting the hang of it? Let’s proceed now on how an AI decipher’s sentiment of a given statement.</p><h3>Sentiment Analysis</h3><p><strong>Dataset</strong><br>To make an AI that outputs the sentiment of a given input we use Machine Learning to create a model that’s trained on thousands and thousands of rows of data which has a raw text column along with a sentiment column (positive/negative/neutral). Eg-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sbd0SG9B2TYz-tB8" /></figure><p>But we’ll need a LOT of data to make an effective model, for eg. <a href="http://jmcauley.ucsd.edu/data/amazon/">Amazon Product Review Data Set</a> -a popular sentiment analysis dataset- has 142 Million product reviews!!!<br>Proceeding forward we do a a bunch of processes on the “Raw Statement” column in order to make it suitable to feed into our neutral network such as — Tokenization, Stemming, Lemmatization, Removing Stop Words, Vectorization, etc. Don’t get overwhelmed with these seemingly complex terminologies, they are far easier to understand than their pronunciation.</p><p><strong>Tokenization</strong><br>Break down of large corpus of text into individual parts-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*j3NDkHoBxAnHfAT-" /></figure><p><strong>Stemming &amp; Lemmatization</strong><br>Reducing words to root forms -</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wFWEE11vJcqFdTpv" /></figure><p><strong>Removal of Stop Words</strong><br>Common words that occur frequently in the language but often don’t contribute much to the meaning of a sentence (e.g., “the,” “and,” “is”) -</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zISWPD1v02NqzqXW" /></figure><p>We also perform other processes like lowercasing, removing punctuation, handling numerical values, spell checks and correction, handling special characters, etc. We do so because the above processes on our “Raw Statement” column help to remove redundant characters that don’t contribute to the actual sentiment of the statement so that we are left with the only important relevant words.</p><p><strong>Vectorization</strong><br>And for the last step of processing, we’ll convert the given dataset into vectorized format. Machine learning models, including those used for sentiment analysis, operate on numerical data. Text data, on the other hand, is inherently non-numeric. Therefore, to use text data as input for a machine-learning model, we need to convert it into a numerical form. For this, we can use various methods like — TFIDF, Word Embeddings, Bag of Words algorithm, etc.<br>After this process, our training dataset is all set to be fed into the web of neural networks!</p><p><strong>Training &amp; Evaluation</strong><br>Some common models to train our ML include Naive Bayes, Support Vector Machines (SVM), recurrent neural networks (RNNs), and transformer-based models like BERT.<br>We, after training our model, like any AI model pipeline, evaluate our sentiment analysis model on a completely new dataset of statements and calculate its accuracy. And that’s how my friends, an AI to predict the sentiment of a randomly given input is Born!</p><p><strong>Ending Notes</strong></p><ol><li>I tried to condense complex terminologies surrounding Sentiment analysis and simplify it so that even non-technical folks could understand. Drop in your feedback in the replies below or ask any questions you have! Happy to answer them.</li><li>For the technical folks out there, I’ll drop in the link for various open-sourced Sentiment analysis models on hugging-face that you can tinker around with and embed in your scripts — <a href="https://huggingface.co/models?pipeline_tag=text-classification&amp;sort=downloads&amp;search=sentiment">https://huggingface.co/models?pipeline_tag=text-classification&amp;sort=downloads&amp;search=sentiment</a></li></ol><p>Fun Fact — ChatGPT-3 was trained on 45 TB (45 terabytes) of textual data, that’s one of the reasons for its high accuracy in predicting sentiment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b88ccc6baf3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>