<?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 Amanmyrat Abdullayev on Medium]]></title>
        <description><![CDATA[Stories by Amanmyrat Abdullayev on Medium]]></description>
        <link>https://medium.com/@amanabdulla296?source=rss-adf407841b76------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*vXQbkrSLQ3st-UXyHROMew.png</url>
            <title>Stories by Amanmyrat Abdullayev on Medium</title>
            <link>https://medium.com/@amanabdulla296?source=rss-adf407841b76------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 06:59:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@amanabdulla296/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[Sentiment Analysis with VADER and Twitter-roBERTa]]></title>
            <link>https://medium.com/@amanabdulla296/sentiment-analysis-with-vader-and-twitter-roberta-2ede7fb78909?source=rss-adf407841b76------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ede7fb78909</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[nlp]]></category>
            <dc:creator><![CDATA[Amanmyrat Abdullayev]]></dc:creator>
            <pubDate>Fri, 14 Oct 2022 17:27:45 GMT</pubDate>
            <atom:updated>2022-10-14T17:27:45.157Z</atom:updated>
            <content:encoded><![CDATA[<h4>Natural Language Processing (NLP)</h4><h4>Benchmarking of two different algorithms for short social media text analysis</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t48GGYODxN1on42BRwDCAg.png" /><figcaption>Image by Author</figcaption></figure><h4>A Brief Intro to Sentiment Analysis</h4><p>Sentiment analysis is an approach to identifying the emotional tone behind textual data. This helps organizations or businesses gather insights from unstructured text that comes from online sources such as surveys, social media channels, and comments. Various algorithms (models) are available for sentiment analysis tasks, and each has its pros and cons, such as:</p><ul><li><strong>Rule-based (lexicon-based):</strong> Such kinds of models have their own dictionaries (lexicons) of words or emojis with positive or negative weights. These algorithms count the number of positive and negative words in the given text. If the number of positives is more than the negatives, they return a positive sentiment. If both are equal, they return a neutral sentiment. Rules or dictionaries of words can be customized. And these kinds of algorithms do not require any model training.</li><li><strong>Supervised Machine learning:</strong> These algorithms are fed with many labeled text data until they can learn patterns or the essence of the statement instead of clearly defined rules. However, for this approach labeled data is required, which is usually costly for practical applications!</li><li><strong>Unsupervised Deep Learning:</strong> Such kinds of algorithms are able to learn patterns through multiple layers from unstructured and unlabeled data to perform sentiment analysis using various learning mechanisms, e.g. self-attention.</li></ul><h4>Selected Models and Data</h4><p>One of the well-known rule-based algorithms is <a href="https://www.nltk.org/_modules/nltk/sentiment/vader.html">VADER from the NLTK</a> package. According to developers, it is <em>specifically attuned to sentiments expressed in social media.</em> It is quite easy to implement yet a very powerful model. Another algorithm, I will talk about is a deep learning-based algorithm — <a href="https://huggingface.co/cardiffnlp/twitter-roberta-base-sentiment-latest">Twitter-roBERTa from the TRANSFORMERS package</a>. This model was pretrained with 124 million tweets and finetuned for sentiment analysis. Both of the models do not require any training, which means they can be directly applied to textual data out of the box.</p><blockquote><strong>Why specifically social media posts</strong>: because they are short, do not follow grammar rules, and contain many slang words and emojis, all of these make them more complicated.</blockquote><p>Since the world economy is on the brink of recession and everyone is talking about it nowadays, Twitter is one of the most used social media platforms, using Twitter API we have collected relevant data for our analysis. I have selected tweets using the search term “economy”. We are going to analyze 1000 of these tweets that were posted between 01.10.2022 and 11.10.2022. (readers are referred to elsewhere for data collection details using Twitter API, e.g. <a href="https://towardsdatascience.com/collect-data-from-twitter-a-step-by-step-implementation-using-tweepy-7526fff2cb31">here</a>). Top 5 rows of my dataframe as in the following image (you can find the whole dataset in <a href="https://github.com/amanabdulla296/tutorials/blob/main/01%20VADER%20vs%20Transformers%20for%20sentiment/economy_tweets.json">my GitHub repo</a>) :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1r43x4LNFkiipXjV7nLHqw.png" /><figcaption>Image by Author</figcaption></figure><h4>VADER Implementation</h4><p>For VADER, clean your data as much as possible, i.e. remove mentions (usernames), URLs, hashtag symbols, and so on. As I said, it is quite easy to implement, check out the following code snippet:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/eb480d73e81c9c8f6cb5b72dbbb9690e/href">https://medium.com/media/eb480d73e81c9c8f6cb5b72dbbb9690e/href</a></iframe><p>After applying the above operations to our Twitter dataset, our dataframe become as following with preprocessed content for the VADER model and respective polarity score and sentiment label:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DgQt-W8jbj7gcSrgPurC0Q.png" /><figcaption>Image by Author</figcaption></figure><blockquote>The <strong>polarity </strong>score is from -1 to 1, where -1 means most negative and 1 means most positive. <strong>Sentiment </strong>labels are assigned according to the polarity score: -1 to -0.25 =&gt; negative; -0.25 and 0.25 =&gt; neutral; and 0.25 to 1 positive.</blockquote><h4>roBERTa Implementation</h4><p>Twitter-roBERTa implementation is a bit more complicated than VADER, particularly because it does not provide a compound score we need to calculate ourselves. In the code snippet below, I will show step by step guide on how to create a model, predict sentiment probabilities and calculate scaled (normalized) polarity scores it using the Tanh function:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e7423ac315bb9bec644f5e0d7752fba1/href">https://medium.com/media/e7423ac315bb9bec644f5e0d7752fba1/href</a></iframe><p>As a result, our dataset will take the following form:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1ImC22ox4RSYCHuN_QvE-A.png" /><figcaption>Image by Author</figcaption></figure><h4>Benchmarking</h4><p>As I mentioned before, our comparison would be based on 1000 tweets related to the “economy” and with a minimal amount of preprocessing on the data (as implemented above).</p><ol><li><strong>Distribution of Polarities</strong></li></ol><p>Deep learning is amazing, is not it?! Yeah, we can create very sophisticated rules, but nothing can beat patterns learned from large amounts of data. As presented in the figure below, generally, VADER assigned a polarity score of 0. That means it was not able to find many positive or negative words in tweets. On other hand, roBERTa, which in reality catches the deep meaning of a text rather than individual words, found out that most of the tweets are smelling negative. Particularly in times, when everyone is pessimistic and the situation of the economy is not so promising, we all expect more negative tweets as roBERTa found out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*-ONpPRsFPQoCTWphcnN2cQ.png" /><figcaption>Image by Author</figcaption></figure><p><strong>2. Fraction of Sentiment Labels</strong></p><p>Even though the above distribution of polarities is pretty enough to describe the results, the pie chart below shows the difference more vividly. The chart is showing, out of 1000 tweets, how many of them are got labeled negative, neutral, and positive. According to the rule-based VADER model, positive and neutral tweets are equal amounts, whereas negative tweets are slightly higher. On the other side, according to the deep learning-based Twitter roBERTa model, almost two-thirds of tweets are negative, and very few amounts are positive. The latter predictions sound more realistic nowadays.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*AudPQqpJYHrfDfpJuHU4cw.png" /><figcaption>Image by Author</figcaption></figure><p><strong>3. Time Required for Predictions</strong></p><p>In the above two sections, we saw that accuracy of roBERTa is much higher and reflects more reality. But in the world of data science, accuracy is not alone as a determining factor. Since computational resources are limited, one of the requirements for a model is that it should be computationally light as much as possible, particularly for production.<br>It was already obvious from the implementation code snippets that VADER is much easier to apply compared to roBERTa. Moreover, in the following figure, you can see how much VADER is fast than roBERTa. On my personal laptop, VADER predicted sentiment of 1000 tweets only in 0.31 seconds. Contrary, roBERTa did the same task in 42.6 seconds (~130-fold slower).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*gv9LbWtu1ZN-LztpX9o4zw.png" /><figcaption>Image by Author</figcaption></figure><h4>Conclusion</h4><p>There is no silver bullet, but depending on the task and computational resources available one can select VADER or roBERTa. However, <strong>with a minimalistic amount of data pre-processing and incredible accuracy, Twitter-roBERTa seems more promising, especially if the amount of data is not so big.</strong></p><blockquote>Jupyter notebook is available on <a href="https://github.com/amanabdulla296/tutorials/tree/main/01%20VADER%20vs%20Transformers%20for%20sentiment">my GitHub</a>, including figure creation codes!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ede7fb78909" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Garagum çölüniň çägesi gyzyldan gymmatlymy?]]></title>
            <link>https://medium.com/@amanabdulla296/garagum-%C3%A7%C3%B6l%C3%BCni%C5%88-%C3%A7%C3%A4gesi-gyzyldan-gymmatlymy-ae27595cab04?source=rss-adf407841b76------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae27595cab04</guid>
            <category><![CDATA[turkmenistan]]></category>
            <category><![CDATA[bilim]]></category>
            <category><![CDATA[ylym]]></category>
            <category><![CDATA[tehnologiýa]]></category>
            <dc:creator><![CDATA[Amanmyrat Abdullayev]]></dc:creator>
            <pubDate>Mon, 28 Dec 2020 01:45:09 GMT</pubDate>
            <atom:updated>2022-10-11T18:24:06.763Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*52jvMKCig-z_Hp9yueDu-A.jpeg" /></figure><blockquote>Garagum çölüniň çägesi gyzyldan gymmatlymy?</blockquote><p>Häli şindi eşidýänsiňiz: Garagum çölüniň çägesinde gyzyl barmyşyn ýa-da gyzyla barabar gymmatlylygy barmyşyn.</p><p>Şular ýaly gepleri owadanlaýan şeýle gürrüňler hem bar: Garagumyň çägesinden kremniý (Silicon - Si) alyp boljak we kremniý häzirki wagtda iň gymmat materiallaryň birisi hasaplanylýar (sebäbi ol bütin elektronik enjamlaryň, günden energiýa alýan panelleriň esasy elementidir). Eger-de Garagumdan kremniý almagy başarsak bütindünýä kremniý satyp oturywermeli .</p><p>Ýöne gynamsakda bir hakykat bar, olam kremniý diňe Türkmenistanyň Garagum çölünde däl, eýsem bütin dünýäde ýaýran we iň köp duş gelýän elementdir (kidloroddan soň iň köp ýaýran element).</p><p>Kremniý almak üçin diňe çölüň kwars çägesi hökmän däl, daglaryň daşlary, deňiz asty we kenarýaka çägeleri aslynda kremniý almak üçin has amatly. Dünýäniñ iň köp kremniý öndürýän ýurtlary Hytaý, Russiýa we Norwegiýa. Hany, Russiýa we Norwegiýada çöl bar-da şondan alýalarmy kremniýni?!</p><p>Gepiň tümmek ýeri, kremniý nebit, gaz ýaly diňe käbir ýerlerde duş gelýän zat däl. Ol her ýerde ýaýran. Esasy ullakan mesele, ony öndürmegiň tehnologiýasynda.</p><p>Kremniý öndürmegiň tehnologiýasy gaty gymmada düşýär we örän çylşyrymly hem-de howplydyr.</p><p>Gysgaça aýtsak, ilki bilen arassa kwars çäge (SiO2) eredilýär (1500-2000°C) we kömür bilen täsirleşdirilip kremniý alynýar. Ýöne bu kremniý entäk elektronikalarda ulanylaýjak derejede arassa däl we diňe metallurgiýada ulanylyp bilinäýjek derejede (metallurgical grade Si=MG-Si).</p><p>Elektronikada ulanar ýaly etmek üçin gaty çylşyrymly prosess garaşýar. Ýagny, ýaňky mg-Si, 300°C derejede duz kislotasy bilen täsirleşdirilip, SiHCl3 alynýar. Bu madda 1000°C gyzgynlykda H2, PH3 we AsH3 ýaly gazlar bilen täsirleşdirilip elektronika üçin ýeterlik derejede arassa kremniý öndürilýär.</p><p>Görüşiňiz ýaly, kremniý öndürmek üçin gaty ýokary gyzgynlyk zerur, bul hem gaty gymmada düşýär. Mundan başga-da PH3, AsH3 ýaly gazlar hem gymmat hem-de gaty zäherli (PH3 gazy 2-nji jahan urşunda himiki ýarag hökmünde adamlary zäherlemek üçin ulanyldy). Ýalňyşlyk bilen bu gazlaryň syzmagy, ullakan bir şäheriň ilatynyň gyrylmagy diýmekdir. Galyberse-de, SiHCl3 we H2 gazlary hem partlaýjy gazlar hasaplanylýar, nädogry ýagdaýda ulanylmaklary gaty pajygaly heläkçilige sebäp bolup biler.</p><p>Ine, kremniý öndürmekdäki esasy mesele çägeniň bar ýa-da ýoklugy däl. Bar mesele ony öndürmegiň tehnologiýasynyň we şol tehnologiýany ýalňyşsyz ýerine ýetirip biläýjek kadrlaryň bolmagyndyr.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae27595cab04" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>