Trending November 2023 # Twitter Announces ‘Super Follow’ Subscriptions # Suggested December 2023 # Top 12 Popular

You are reading the article Twitter Announces ‘Super Follow’ Subscriptions updated in November 2023 on the website Cancandonuts.com. We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested December 2023 Twitter Announces ‘Super Follow’ Subscriptions

Twitter hasn’t changed all that much in the last few years. For the most part, people use it the same as they always have — a mostly public-facing microblogging’ platform. But the company today exposed highlighted multiple upcoming features that could significantly change the way people interact with one another on the platform, in many ways making it more versatile — and more like some of its competitors.

Twitter announced its first paid product at an investor event today, showing off screenshots of a feature that will allow users to subscribe to their favorite creators in exchange for things like exclusive content, subscriber-only newsletters, and a supporter badge.

The company also announced a feature called Communities, which could compete with Facebook Groups and enable Super Follow networks to interact, plus a Safety Mode for auto-blocking and muting abusive accounts. On top of all that, Twitter said it plans to double revenue by 2023.

A jumble Patreon, along with a bit Twitch, Super Follows enables Twitter users, well, eventually become super followers’ of their preferred online accounts. A number of those exclusive perks Twitter is teasing include exclusive articles and newsletters, discounts, supporter badges, and super-followers-only conversations.

If you can’t change Twitter display name and username then this guide will help you in getting the solution for the same.

Also read: Best 12 Vocabulary Building Apps for Adults 2023?

Revue

Rather than eliminating character limitations, Revue is a means for Twitter users to print newsletters to their audiences — those may be free or be behind a paywall. Ultimately, there will be a place that you adhere to your lengthiest tweetstorms.

Also read: 7 Best Woocommerce Plugins to boost your Store you must know

Spaces

This one is not completely new for men and women that follow societal websites closely, but it is basically Twitter’s variant of Clubhouse. To put it differently, it is a place where you can actually speak to people employing honest-to-goodness audio, though it contains live AI captions for discussions also.

There’s no word on exactly when these features will land, but considering some of them are already being tested publicly, I’d guess sooner rather than later.

You're reading Twitter Announces ‘Super Follow’ Subscriptions

What Is A Follow Train?

A follow train (also known as a follow chain or a follow for follow group) is a group of people who follow each other on a social media platform (e.g Instagram, Twitter, TikTok).

Participating in a follow train is a popular method used by many to grow their social media followers (especially Instagram).

Follow trains help you to grow your social media followers quickly and easily.

The follow train is originated from Instagram back in its early days, and it’s still very popular in the present for one reason—it works.

How does a follow train work?

A follow train works by sharing your social media handle, following others that interest you, and sending them a direct message telling them where you found them from (e.g. Reddit).

Let’s get into each one of the steps in detail.

Firstly, you’ll have to share your social media handle ‘link here’ in a follow train (e.g. chúng tôi in order for people to find and follow you.

In addition to sharing your social media handle, certain groups require you to write up a short description of yourself or the content that you post.

This is to allow people to know your niche, so they’ll only follow you if they are interested in your content.

Secondly, you can follow others that interest you.

A common fault in follow trains is that people don’t like to follow first. This can be due to ego, distrust, laziness, etc.

So if you do happen to follow others first, you can grow your followers at a faster rate then if you were to just share your social media handle.

Follow trains work because people follow each other, so someone needs to follow first in order for it to work.

The last step (and the most important one) is to direct message the person telling them where you found them from (e.g. Reddit).

This step is crucial because if you don’t send them a direct message, they won’t know that you’re doing follow for follow.

If you follow these three steps, you’re guaranteed to receive a follow back almost all of the time.

Types of follow trains

There are various types of follow trains (not only Instagram).

Here is a compiled list of follow trains you can check out to grow your followers.

All of them are completely free to join and are great places where you can connect with people in your niche.

Instagram follow train

Follow trains are widely used by Instagram users who want to quickly grow their followers.

One of the most popular follow trains for Instagram is the r/Instagram community on Reddit.

The community has a “Follow Friday” thread where you can share your Instagram handle with others every Friday.

The goal of the thread is to find new people to follow on Instagram and expand your follower-base in the process.

There are lots of people in varying niches on the “Follow Friday” thread—from photography to personal accounts so you’ll definitely find someone in your niche.

Hundreds of Redditors use the thread on a weekly basis to grow their Instagram followers. You’ll be surprised by the number of followers you’ll get when you first start using it.

I’ve personally used the “Follow Friday” thread for about 2 years now, met a lot of interesting people, and had meaningful conversations.

You can potentially gain hundreds of followers from the thread if you use it consistently.

A cool tip about the thread is that it resets every Friday at around 9 am EST.

So, it’s best to share your Instagram handle at that time for maximum visibility.

Twitter follow train

A popular user who hosts Follow trains on a consistent basis is @toolzbabe on Twitter.

LinkedIn Follow Train

(Insert indiehackers linkedin screenshot here)

LinkedIn is another platform where follow trains can be used to expand your network.

However, LinkedIn follow trains are not common as there aren’t as many LinkedIn users as compared to other social media platforms like Instagram or Twitter.

That being said, the most popular follow train for LinkedIn is started by a post on Indiehackers.

Indiehackers has various follow for follow posts like, “Hacking Twitter”, “Hacking Instagram”, and so on.

These posts are basically follow trains for various social media platforms.

In order to expand your connections on LinkedIn, you can use the “Hacking LinkedIn” post on Indiehackers.

Simply request to connect with the users that shared their LinkedIn handle and tell them that you’re from Indiehackers.

These “Hacking x” posts are only created once in a while, so you’ll have to be sure to look out for them.

They are incredibly useful if you want to expand your network quickly.

Follow train rules

• You should always follow others back from a follow train especially if the person that followed you sent you a direct message.

• Try to write-up a short description about yourself or the content that you post so that people can easily identify your niche.

Advantages of a follow train

Follow trains have existed since the early days of social media (particularly Instagram) and people are still using them to grow their accounts to this day.

Are you wondering why they’re still such a popular growth strategy?

Quick way to grow your followers

Firstly, a follow train is a quick way you can grow your social media followers.

If you were to join a follow for follow group on Instagram now, all you need to do is to share your Instagram handle and people will start following you.

In addition, you can follow others that shared their handle. They’ll follow you back if you send them a direct message telling them where you came from (e.g. Reddit).

Follow trains are specifically catered for people who want to grow their followers by following others. This is also known as follow for follow.

As follow trains are made up of people looking to expand their follower-base through the means of following each other, everyone is like-minded.

Thus, the majority of people will follow you back and not unfollow.

You can find new people to follow

Follow trains enable you to find new and interesting people/content to follow.

As people usually share a short description of themselves or the content that they post, you can easily identify people in your niche to follow.

Consequently, your engagement rate will increase as both parties are in the same niche, and enjoy each other’s content.

The thing about Instagram’s search is that you need to know the username of a person before you can find and follow them.

If you were to search for a keyword on Instagram, the top search results will be dominated with accounts with a large number of followers.

Follow trains give you the ability to find new people and content which cannot be achieved from an Instagram search.

After all, Instagram’s search is incredibly restrictive, so you can utilize a follow train to broaden it.

Attract the right audience

It’s important to attract the right audience on Instagram as you don’t want people that are uninterested in your content to follow you.

If they do, it’ll negatively affect your engagement rate.

Naturally, you’ll be more inclined to like someone’s posts that are in the same niche as you.

This is because you have the same interests as them. Follow trains give you the ability to attract the right audience if you specify your niche.

If you’re a business, this is especially important. Attracting the right people can lead to more conversions and sales.

Instead of blindly following people from a list, you should focus on attracting the right audience, and a follow Train will enable you to do that.

It’s time-consuming

If you’re utilizing a follow train, you need to be very consistent with it if you want to grow your social media followers quickly.

Joining a follow train is about sharing your social media handle with others. But that’s not enough if you’re looking to gain hundreds of followers.

In order to grow your followers by hundreds, you’ll have to constantly follow and direct message others first instead of waiting for them to do so.

This is incredibly time-consuming as you’ll have to dedicate at least an hour a day to follow and message various people.

In addition, social media apps like Instagram will impose an action block on your account if you follow or direct message others too quickly.

This will hinder your growth efforts.

In order to prevent to action block, you’ll have to be sure to follow and direct message in intervals of 5 to 10 minutes.

In addition to sharing your social media handle, following, and direct messaging others, you’ll have to watch out for the action block as well—which makes it time-consuming.

If you’re not consistent with it, you’re not going to get a lot of followers.

Your feed may be overcrowded

Secondly, by utilizing a follow train, your feed may be overcrowded with posts.

This is because the more people you follow, the more posts you’ll have on your feed.

This makes it harder for you to like every post on your feed and you might miss the posts from people you care about.

Thus, it’s important that you mute people who post too much.

Overposters are one of the worst types of people on Instagram as they clutter your feed unnecessarily.

To identify overposters, simply visit someone’s profile and check the time frame between each post.

If the time frame between their posts is short (a few hours), then they might be an overposter.

If that’s the case, you have to make sure to mute the person’s posts right after following them.

You can do so by refreshing your Instagram feed right after following them.

Once you do so, their posts will most likely appear at the top of your feed where you can tap on the “triple dots” icon to mute them.

Unorganized feed

If you’re not meticulous about who you follow, your feed might be filled with posts in varying niches.

This means that your feed will be very unorganized—from photography posts to memes to fitness.

To prevent an unorganized/messy feed, be sure to include a short description of yourself or the content that you post so that people can identify your niche and follow you only if they like your content.

In addition, you can explicitly mention that you’re only following back people in your niche.

This will make sure that your feed stays consistent (with posts within a niche).

Conclusion

Growing your social media can be challenging, but it’s not rocket science.

There are many ways to grow your social media followers, and follow trains are one of them.

The best part about follow trains is that you can stop using them once you’re satisfied with the number of your followers.

The only restriction to watch out for is the rate in which you’re following or direct messaging others.

Further Reading

“Ohsnap Grip” Is A Super

It seems like each year, smartphones are getting bigger and bigger. To achieve the highest screen-to-body ratio, smartphone manufacturers are pushing their limits to create huge displays without bezels. However, if you do not have a big hand with long fingers, then chances are you love phone grips and you think you owe one to them for your huge phone’s safety. But at the same time, if you hate that bulge it creates in your pocket, or get pissed when you can’t slide your device into your pocket with ease, that’s where the “Ohsnap Grip” comes in.

The “Ohsnap Grip” is an extremely powerful grip, a magnet, and a stand. That’s not all though. It also supports wireless charging, which is compatible with “snapcharge” i.e., a wireless charger made by Rale Backus, the same US company that developed the “Ohsnap Grips”.

Now, the best part, the whole thing is wrapped inside a super-thin frame. When you don’t want to use it, free your finger from the loop, and its almost as if it wasn’t even there in the first place. The grip is 61mm in diameter and just 3 mm thick, which is crazy!

One finger use also makes the process quicker. All you need to do is slide your finger in. The grip transforms into a stand, which is multi-angled. So, whether you want to use your phone vertically or horizontally this one has got your smartphone’s back, literally!

The Grip is also super durable as it is designed to survive millions of cycles all because of the tear-resistant silicone. However, if the grip gets damaged the company pledges to replace it for free within a year excluding shipping.

The Grips come in two base colors — Black and white, and eight trim colors that include black, white, gray, red, blue, purple, orange, and cyan.

The grip is also magnetic, which is amazeballs when you want to multitask. Be it in the gym, kitchen, or your car, the grip sticks to any metal surface it can find. Moreover, the company has also created a mounting stand specifically for this grip called the “snapstand”.

This grip is compatible with the first-ever magnetic wireless charger, called the “snapcharge”, of which I talked about earlier. This uses the Qi wireless charging standard which works with all wireless charging enabled devices, AirPods, and more. So now, you can actually pick up the phone to use it without interrupting wireless charging!

Now, does the grip work with other wireless chargers? Well, according to the company the grip worked fine with other wireless chargers, but they cannot vouch for it. So, it’s safer to get the “snapcharge” cause these two are literally made for each other.

So, if you’re interested in getting the “Ohsnap Grips”, you can check them out on Indiegogo . A single “Ohsnap Grip” costs $19 (~Rs 1,450). However, if you want to get it with the “snapcharge” wireless charger, the cost would rise to $55 (~Rs 4,197).

Microsoft Introduces Microsoft 365 To Replace Office 365 Subscriptions

Microsoft has announced the new “Microsoft 365 Family” and “Microsoft 365 Personal” subscriptions during an online-only press event. The new plans are aimed to replace and improve the existing Office 365 plans, including the Office 365 Home and Personal.

The new Microsoft 365 plans are available starting April 21, 2023, and pricing will remain the same at $9.99 per month for the Family plan, which allows you to use the apps and services with up to six people, and $6.99 per month for the Personal plan that is available for one person.

Microsoft Family Safety

Microsoft Family Safety brings the family features available on a Microsoft account to an app allowing members to share their location and manage screen time for apps, games, and devices, including Windows 10, Xbox, and Android, for young members.

The app also includes a feature to receive a notification when a user leaves the home, work, or school. In addition, the app offers driving reports, which is a feature that has been designed to let parents track young-adult drivers.

Microsoft Family Safety will be initially available as a limited preview in the coming months.

Microsoft Teams

Microsoft Teams is a real-time collaboration and messaging platform designed for businesses, but now the software giant is making available a home version of the platform. The new variant has been designed to allow family members and friends connect in group chats, voice, and video calls. In addition, users will be able to share photos, to-do lists, and many other type of contents.

Although Teams for consumers sounds similar to Skype, the communication app will continue to be available, but the company seems to be shifting focus to the new premium platform.

Microsoft Teams is expected to start rolling out as preview during the summer.

Microsoft Editor

In addition to these main new features, the company is also planning to rollout a number of new additions for Office. For instance, there’s a new Microsoft Editor for Word that is a more capable proofing feature than the built-in spell checker and grammar, and it’s been designed to improve your writing skills by suggesting ways to enhance your writing style and surfacing words that you repeat too many times.

PowerPoint Presenter Coach

As part of the PowerPoint improvements, Microsoft 365 customers will get an updated version of the “Presenter Coach” with speech and monotone pitch improvements.

If you’re not familiar with the “Presenter Coach,” this is a feature that uses AI to help you rehearsal for a presentation by detecting if you’re speaking too fast, say “umm” to many times, or you’re just reading text from your slides.

Money in Excel

In Excel, Microsoft is now bringing new features to help users take control of their finances. When using Microsoft 365, Excel will be able to connect to your bank account to import transactions, balances, and create alerts for fees and spending.

The app will now be able to handle more data types, including places, movies, food, and Pokémon. “Save time by converting plain text and numbers into a data type and Excel will surface both rich visual and interactive data cards and images that provide a better representation of your data.” — Microsoft explains.

For example, you could enter a fruit like “banana” and by converting it to a “Food” data type, Excel will help you access its nutritional information

In total there are there over 100 new data types, and they’re powered by Wolfram Alpha.

The company isn’t sharing exactly when this feature will be available, but it’s expected to arrive in the coming months.

Outlook calendar link

If you use Outlook, you’ll soon be able to link your work and personal calendars on the web making it possible to view your real availability in your work account, while maintaining privacy around the details of personal appointments and work meetings.

Furthermore, Office for Microsoft 365 members will include additional 200 new document templates, 300 new font families, 2800 new icons, and images and videos from Getty.

Microsoft Edge Password Monitor

In addition, the company is also revealing a new Password Monitor feature for Microsoft Edge. The feature is identical to the Chrome password leak detection, and it’ll let you know if any of your passwords have been compromised in database breaches, that way, you can change them to something more secure.

Perhaps one of the most interesting features coming to the Chromium version of Edge is the new vertical tabs feature, which allows you to stack tabs at the side of the browser, instead of at the top.

Finally, Microsoft is partnering with other software companies, such as Adobe, Bark, Creative Live, Blinklist, Experian, TeamSnap, and among others to offer trial access to subscribers.

If you’re planning to get an Office 365 subscription, you don’t have to wait, you can subscribe now, and in the coming weeks, you’ll be transferred automatically to Microsoft 365 with all the new available new benefits for the same price.

How To See Follow Requests On Tiktok

If you switched to a private account on TikTok, people will have to send you a follow request to follow you.

For them to see your videos, you need to accept their follow requests.

Otherwise, they won’t be able to see your feed.

If your account is set to public, you don’t have to worry about accepting follow requests.

This is because anyone will be able to follow you on TikTok.

On the other hand, if you have a private account and you’re not sure whether your follow requests are, this guide is for you.

In this guide, you’ll learn how to see follow requests on TikTok.

You’ll also learn how to send follow requests on TikTok if you want to follow a private account.

How to see follow requests on TikTok

To see follow requests on TikTok, you first need to switch to a private account.

After you’ve switched to a private account, navigate to your inbox and tap on “Follow requests”.

Switching to a private account means that people will have to send you a follow request before they can follow you on TikTok.

These follow requests will be sent to your inbox.

If you don’t want random people to see your TikTok videos, switching to a private account is a good idea.

Otherwise, anyone will be able to see your TikTok videos on your profile.

However, do keep in mind that your videos will not be shown on anyone’s “For You” page if your account is set to private.

In addition, hashtags will not work as your videos will not be shown on the hashtag search results.

So, before switching to a private account, do note that your views and engagement will drop severely.

Below is a 3-step guide on how you can see your follow requests on TikTok (with screenshots).

1. Switch to a private account

Skip this step if you’ve already set your TikTok account to private.

The first step to seeing follow requests on TikTok is to switch to a private account.

If you have a public account, you won’t be able to see follow requests.

This is because anyone who follows you will automatically be your follower.

In other words, people do not need your approval to follow you.

To switch to a private account on TikTok, tap on the “Me” icon on the bottom navigation bar.

After you’ve tapped on the “Me” icon, you’ll land on your TikTok profile.

On the right corner of your TikTok profile, you’ll see three dots.

Tap on the three dots to open a menu.

On the menu, tap on “Privacy” under the “Account” header.

Under the “Discoverability” header, you’ll see a “Private account” option.

Turn the “Private account” option on to switch to a private account on TikTok.

If you currently have a business account, TikTok will warn you that you will lose access to business features like analytics.

If they do, tap on “Switch to Personal Account” to confirm the switch.

Proceed to the next step to learn how to find your follow requests.

2. Go to your inbox and tap on “Follow requests”

If you’ve set your TikTok account to private, people that follow you will be marked as follow requests.

For people to follow you, you need to accept their follow requests.

To see your follow requests, tap on the “Inbox” icon on the bottom navigation bar.

Once you’ve tapped on your inbox, you’ll land on the activity page.

You’ll also be able to see your follow requests.

Your follow requests can be seen at the top of the activity page.

For example, if you have 10 follow requests, you’ll see the number “10” next to a red dot.

Tap on “Follow requests” to see your follow requests.

3. Accept or delete your follow requests

Accept or delete follow requests.

Once you’ve tapped on “Follow requests”, you’ll see a list of people who’ve sent you a follow request on TikTok.

You can either accept or delete a follow request.

Accepting a follow request will make the person follow you.

On the other hand, deleting a follow request will prevent them from following you.

You’ve successfully learned how to see your follow requests on TikTok!

How to send follow requests on TikTok

To send follow requests on TikTok, navigate to a private TikTok account.

Then, tap on the “Follow” button to send them a follow request.

After you’ve tapped the “Follow” button, your follow request will be sent to the person’s inbox.

The “Follow” button will then change to a “Requested” button.

If you tap on the “Requested” button, you can cancel your request.

But if you didn’t cancel it, the person can choose to accept or delete your follow request.

If they’ve accepted your follow request, you will be able to see their videos.

On the other hand, if the person deleted your follow request, the “Requested” button will change to a “Follow” button.

When that happens, you can tap on the “Follow” button to send a follow request to them again.

Conclusion

Follow requests on TikTok can be only seen if you’ve set your TikTok account to private.

If your account is set to public, anyone will be able to follow you on TikTok without your approval.

Hence, you won’t be able to see follow requests in your inbox.

But if you don’t want random people viewing your TikTok videos, then switching is a good idea as it allows you to control who can follow you on TikTok.

Further Reading

101 TikTok Fairy Comments to Copy and Paste

How to Turn On or Off “Save Video” on TikTok

How to Save a TikTok Draft Video in Gallery

Lim How Wei is the founder of Followchain. Feel free to follow him on Instagram.

Twitter Sentiment Analysis Using Python

A Twitter sentiment analysis determines negative, positive, or neutral emotions within the text of a tweet using NLP and ML models. Sentiment analysis or opinion mining refers to identifying as well as classifying the sentiments that are expressed in the text source. Tweets are often useful in generating a vast amount of sentiment data upon analysis. These data are useful in understanding the opinion of people on social media for a variety of topics.

This article was published as a part of the Data Science Blogathon.

What is Twitter Sentiment Analysis?

Twitter sentiment analysis analyzes the sentiment or emotion of tweets. It uses natural language processing and machine learning algorithms to classify tweets automatically as positive, negative, or neutral based on their content. It can be done for individual tweets or a larger dataset related to a particular topic or event.

Why is Twitter Sentiment Analysis Important?

Understanding Customer Feedback: By analyzing the sentiment of customer feedback, companies can identify areas where they need to improve their products or services.

Political Analysis: Sentiment analysis can help political campaigns understand public opinion and tailor their messaging accordingly.

Crisis Management: In the event of a crisis, sentiment analysis can help organizations monitor social media and news outlets for negative sentiment and respond appropriately.

How to Do Twitter Sentiment Analysis?

In this article, we aim to analyze Twitter sentiment analysis using machine learning algorithms, the sentiment of tweets provided from the Sentiment140 dataset by developing a machine learning pipeline involving the use of three classifiers (Logistic Regression, Bernoulli Naive Bayes, and SVM)along with using Term Frequency- Inverse Document Frequency (TF-IDF). The performance of these classifiers is then evaluated using accuracy and F1 Scores.

For data preprocessing, we will be using Natural Language Processing’s (NLP) NLTK library.

Twitter Sentiment Analysis: Problem Statement

In this project, we try to implement an NLP Twitter sentiment analysis model that helps to overcome the challenges of sentiment classification of tweets. We will be classifying the tweets into positive or negative sentiments. The necessary details regarding the dataset involving the Twitter sentiment analysis project are:

The dataset provided is the Sentiment140 Dataset which consists of 1,600,000 tweets that have been extracted using the Twitter API. The various columns present in this Twitter data are:

target: the polarity of the tweet (positive or negative)

ids: Unique id of the tweet

date: the date of the tweet

flag: It refers to the query. If no such query exists, then it is NO QUERY.

user: It refers to the name of the user that tweeted

text: It refers to the text of the tweet

Twitter Sentiment Analysis: Project Pipeline

The various steps involved in the Machine Learning Pipeline are:

Import Necessary Dependencies

Read and Load the Dataset

Exploratory Data Analysis

Data Visualization of Target Variables

Data Preprocessing

Splitting our data into Train and Test sets.

Transforming Dataset using TF-IDF Vectorizer

Function for Model Evaluation

Model Building

Model Evaluation

Let’s get started,

Step-1: Import the Necessary Dependencies # utilities import re import numpy as np import pandas as pd # plotting import seaborn as sns from wordcloud import WordCloud import matplotlib.pyplot as plt # nltk from chúng tôi import WordNetLemmatizer # sklearn from chúng tôi import LinearSVC from sklearn.naive_bayes import BernoulliNB from sklearn.linear_model import LogisticRegression from sklearn.model_selection import train_test_split from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics import confusion_matrix, classification_report Step-2: Read and Load the Dataset # Importing the dataset DATASET_COLUMNS=['target','ids','date','flag','user','text'] DATASET_ENCODING = "ISO-8859-1" df = pd.read_csv('Project_Data.csv', encoding=DATASET_ENCODING, names=DATASET_COLUMNS) df.sample(5)

Output:

Step-3: Exploratory Data Analysis

3.1: Five top records of data

df.head()

Output:

3.2: Columns/features in data

df.columns

Output:

Index(['target', 'ids', 'date', 'flag', 'user', 'text'], dtype='object')

3.3: Length of the dataset

print('length of data is', len(df))

Output:

length of data is 1048576

3.4: Shape of data

df. shape

Output:

(1048576, 6)

3.5: Data information

df.info()

Output:

3.6: Datatypes of all columns

df.dtypes

Output:

target int64 ids int64 date object flag object user object text object dtype: object

3.7: Checking for null values

np.sum(df.isnull().any(axis=1))

Output:

0

3.8: Rows and columns in the dataset

print('Count of columns in the data is: ', len(df.columns)) print('Count of rows in the data is: ', len(df))

Output:

Count of columns in the data is: 6 Count of rows in the data is: 1048576

3.9: Check unique target values

df['target'].unique()

Output:

array([0, 4], dtype=int64)

3.10: Check the number of target values

df['target'].nunique()

Output:

2 Step-4: Data Visualization of Target Variables # Plotting the distribution for dataset. ax = df.groupby('target').count().plot(kind='bar', title='Distribution of data',legend=False) ax.set_xticklabels(['Negative','Positive'], rotation=0) # Storing data in lists. text, sentiment = list(df['text']), list(df['target'])

Output:

import seaborn as sns sns.countplot(x='target', data=df)

Output:

Step-5: Data Preprocessing

In the above-given problem statement, before training the model, we performed various pre-processing steps on the dataset that mainly dealt with removing stopwords, removing special characters like emojis, hashtags, etc. The text document is then converted into lowercase for better generalization.

Subsequently, the punctuations were cleaned and removed, thereby reducing the unnecessary noise from the dataset. After that, we also removed the repeating characters from the words along with removing the URLs as they do not have any significant importance.

At last, we then performed Stemming(reducing the words to their derived stems) and Lemmatization(reducing the derived words to their root form, known as lemma) for better results.

5.1: Selecting the text and Target column for our further analysis

data=df[['text','target']]

5.2: Replacing the values to ease understanding. (Assigning 1 to Positive sentiment 4)

data['target'] = data['target'].replace(4,1)

5.3: Printing unique values of target variables

data['target'].unique()

Output:

array([0, 1], dtype=int64)

5.4: Separating positive and negative tweets

data_pos = data[data['target'] == 1] data_neg = data[data['target'] == 0]

5.5: Taking one-fourth of the data so we can run it on our machine easily

data_pos = data_pos.iloc[:int(20000)] data_neg = data_neg.iloc[:int(20000)]

5.6: Combining positive and negative tweets

dataset = pd.concat([data_pos, data_neg])

5.7: Making statement text in lowercase

dataset['text']=dataset['text'].str.lower() dataset['text'].tail()

Output:

5.8: Defining set containing all stopwords in English.

stopwordlist = ['a', 'about', 'above', 'after', 'again', 'ain', 'all', 'am', 'an', 'and','any','are', 'as', 'at', 'be', 'because', 'been', 'before', 'being', 'below', 'between','both', 'by', 'can', 'd', 'did', 'do', 'does', 'doing', 'down', 'during', 'each','few', 'for', 'from', 'further', 'had', 'has', 'have', 'having', 'he', 'her', 'here', 'hers', 'herself', 'him', 'himself', 'his', 'how', 'i', 'if', 'in', 'into','is', 'it', 'its', 'itself', 'just', 'll', 'm', 'ma', 'me', 'more', 'most','my', 'myself', 'now', 'o', 'of', 'on', 'once', 'only', 'or', 'other', 'our', 'ours','ourselves', 'out', 'own', 're','s', 'same', 'she', "shes", 'should', "shouldve",'so', 'some', 'such', 't', 'than', 'that', "thatll", 'the', 'their', 'theirs', 'them', 'themselves', 'then', 'there', 'these', 'they', 'this', 'those', 'through', 'to', 'too','under', 'until', 'up', 've', 'very', 'was', 'we', 'were', 'what', 'when', 'where','which','while', 'who', 'whom', 'why', 'will', 'with', 'won', 'y', 'you', "youd","youll", "youre", "youve", 'your', 'yours', 'yourself', 'yourselves']

5.9: Cleaning and removing the above stop words list from the tweet text

STOPWORDS = set(stopwordlist) def cleaning_stopwords(text): return " ".join([word for word in str(text).split() if word not in STOPWORDS]) dataset['text'] = dataset['text'].apply(lambda text: cleaning_stopwords(text)) dataset['text'].head()

Output:

5.10: Cleaning and removing punctuations

import string english_punctuations = string.punctuation punctuations_list = english_punctuations def cleaning_punctuations(text): translator = str.maketrans('', '', punctuations_list) return text.translate(translator) dataset['text']= dataset['text'].apply(lambda x: cleaning_punctuations(x)) dataset['text'].tail()

Output:

5.11: Cleaning and removing repeating characters

def cleaning_repeating_char(text): return re.sub(r'(.)1+', r'1', text) dataset['text'] = dataset['text'].apply(lambda x: cleaning_repeating_char(x)) dataset['text'].tail()

Output:

5.12: Cleaning and removing URLs

def cleaning_URLs(data): dataset['text'] = dataset['text'].apply(lambda x: cleaning_URLs(x)) dataset['text'].tail()

Output:

5.13: Cleaning and removing numeric numbers

def cleaning_numbers(data): return re.sub('[0-9]+', '', data) dataset['text'] = dataset['text'].apply(lambda x: cleaning_numbers(x)) dataset['text'].tail()

Output:

5.14: Getting tokenization of tweet text

from nltk.tokenize import RegexpTokenizer tokenizer = RegexpTokenizer(r'w+') dataset['text'] = dataset['text'].apply(tokenizer.tokenize) dataset['text'].head()

Output:

5.15: Applying stemming

import nltk st = nltk.PorterStemmer() def stemming_on_text(data): text = [st.stem(word) for word in data] return data dataset['text']= dataset['text'].apply(lambda x: stemming_on_text(x)) dataset['text'].head()

Output:

5.16: Applying lemmatizer

lm = nltk.WordNetLemmatizer() def lemmatizer_on_text(data): text = [lm.lemmatize(word) for word in data] return data dataset['text'] = dataset['text'].apply(lambda x: lemmatizer_on_text(x)) dataset['text'].head()

Output:

5.17: Separating input feature and label

X=data.text y=data.target

5.18: Plot a cloud of words for negative tweets

data_neg = data['text'][:800000] plt.figure(figsize = (20,20)) wc = WordCloud(max_words = 1000 , width = 1600 , height = 800, collocations=False).generate(" ".join(data_neg)) plt.imshow(wc)

Output:

5.19: Plot a cloud of words for positive tweets

data_pos = data['text'][800000:] wc = WordCloud(max_words = 1000 , width = 1600 , height = 800, collocations=False).generate(" ".join(data_pos)) plt.figure(figsize = (20,20)) plt.imshow(wc)

Output:

Step-6: Splitting Our Data Into Train and Test Subsets # Separating the 95% data for training data and 5% for testing data X_train, X_test, y_train, y_test = train_test_split(X,y,test_size = 0.05, random_state =26105111) Step-7: Transforming the Dataset Using TF-IDF Vectorizer

7.1: Fit the TF-IDF Vectorizer

vectoriser = TfidfVectorizer(ngram_range=(1,2), max_features=500000) vectoriser.fit(X_train) print('No. of feature_words: ', len(vectoriser.get_feature_names()))

Output:

No. of feature_words: 500000

7.2: Transform the data using TF-IDF Vectorizer

X_train = vectoriser.transform(X_train) X_test = vectoriser.transform(X_test) Step-8: Function for Model Evaluation

After training the model, we then apply the evaluation measures to check how the model is performing. Accordingly, we use the following evaluation parameters to check the performance of the models respectively:

Accuracy Score

Confusion Matrix with Plot

ROC-AUC Curve

def model_Evaluate(model): # Predict values for Test dataset y_pred = model.predict(X_test) # Print the evaluation metrics for the dataset. print(classification_report(y_test, y_pred)) # Compute and plot the Confusion matrix cf_matrix = confusion_matrix(y_test, y_pred) categories = ['Negative','Positive'] group_names = ['True Neg','False Pos', 'False Neg','True Pos'] group_percentages = ['{0:.2%}'.format(value) for value in cf_matrix.flatten() / np.sum(cf_matrix)] labels = [f'{v1}n{v2}' for v1, v2 in zip(group_names,group_percentages)] labels = np.asarray(labels).reshape(2,2) sns.heatmap(cf_matrix, annot = labels, cmap = 'Blues',fmt = '', xticklabels = categories, yticklabels = categories) plt.xlabel("Predicted values", fontdict = {'size':14}, labelpad = 10) plt.ylabel("Actual values" , fontdict = {'size':14}, labelpad = 10) plt.title ("Confusion Matrix", fontdict = {'size':18}, pad = 20) Step-9: Model Building

In the problem statement, we have used three different models respectively :

Bernoulli Naive Bayes Classifier

SVM (Support Vector Machine)

Logistic Regression

The idea behind choosing these models is that we want to try all the classifiers on the dataset ranging from simple ones to complex models, and then try to find out the one which gives the best performance among them.

8.1: Model-1

BNBmodel = BernoulliNB() BNBmodel.fit(X_train, y_train) model_Evaluate(BNBmodel) y_pred1 = BNBmodel.predict(X_test)

Output:

8.2: Plot the ROC-AUC Curve for model-1

from sklearn.metrics import roc_curve, auc fpr, tpr, thresholds = roc_curve(y_test, y_pred1) roc_auc = auc(fpr, tpr) plt.figure() plt.plot(fpr, tpr, color='darkorange', lw=1, label='ROC curve (area = %0.2f)' % roc_auc) plt.xlim([0.0, 1.0]) plt.ylim([0.0, 1.05]) plt.xlabel('False Positive Rate') plt.ylabel('True Positive Rate') plt.title('ROC CURVE') plt.legend(loc="lower right") plt.show()

Output:

8.3: Model-2:

SVCmodel = LinearSVC() SVCmodel.fit(X_train, y_train) model_Evaluate(SVCmodel) y_pred2 = SVCmodel.predict(X_test)

Output:

8.4: Plot the ROC-AUC Curve for model-2

from sklearn.metrics import roc_curve, auc fpr, tpr, thresholds = roc_curve(y_test, y_pred2) roc_auc = auc(fpr, tpr) plt.figure() plt.plot(fpr, tpr, color='darkorange', lw=1, label='ROC curve (area = %0.2f)' % roc_auc) plt.xlim([0.0, 1.0]) plt.ylim([0.0, 1.05]) plt.xlabel('False Positive Rate') plt.ylabel('True Positive Rate') plt.title('ROC CURVE') plt.legend(loc="lower right") plt.show()

Output:

8.5: Model-3

LRmodel = LogisticRegression(C = 2, max_iter = 1000, n_jobs=-1) LRmodel.fit(X_train, y_train) model_Evaluate(LRmodel) y_pred3 = LRmodel.predict(X_test)

Output:

8.6: Plot the ROC-AUC Curve for model-3

from sklearn.metrics import roc_curve, auc fpr, tpr, thresholds = roc_curve(y_test, y_pred3) roc_auc = auc(fpr, tpr) plt.figure() plt.plot(fpr, tpr, color='darkorange', lw=1, label='ROC curve (area = %0.2f)' % roc_auc) plt.xlim([0.0, 1.0]) plt.ylim([0.0, 1.05]) plt.xlabel('False Positive Rate') plt.ylabel('True Positive Rate') plt.title('ROC CURVE') plt.legend(loc="lower right") plt.show()

Output:

Step-10: Model Evaluation

Upon evaluating all the models, we can conclude the following details i.e.

Accuracy: As far as the accuracy of the model is concerned, Logistic Regression performs better than SVM, which in turn performs better than Bernoulli Naive Bayes.

AUC Score: All three models have the same ROC-AUC score.

We, therefore, conclude that the Logistic Regression is the best model for the above-given dataset.

In our problem statement, Logistic Regression follows the principle of Occam’s Razor, which defines that for a particular problem statement, if the data has no assumption, then the simplest model works the best. Since our dataset does not have any assumptions and Logistic Regression is a simple model. Therefore, the concept holds true for the above-mentioned dataset.

Conclusion

We hope through this article, you got a basic of how Sentimental Analysis is used to understand public emotions behind people’s tweets. As you’ve read in this article, Twitter Sentimental Analysis helps us preprocess the data (tweets) using different methods and feed it into ML models to give the best accuracy.

Key Takeaways

Twitter Sentimental Analysis is used to identify as well as classify the sentiments that are expressed in the text source.

Logistic Regression, SVM, and Naive Bayes are some of the ML algorithms that can be used for Twitter Sentimental Analysis.

Frequently Asked Questions

Related

Update the detailed information about Twitter Announces ‘Super Follow’ Subscriptions on the Cancandonuts.com website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!