Nowadays, lots of issues from a variety of domains are discussed in Twitter. Some tweets convey a positive meaning whereas others are addressed negatively towards the concerned topic. This project demonstrates a Tweet Classifier which uses Natural Language Processing to classify between tweets and segregate them on the basis of the sentiment they portray.
The tweets are classified into the following two categories:
- positive tweets - Tweets that have a positive tone.
- negative tweets - Tweets that have a negative tone.
This project uses the sentiment140 dataset available here.
The dataset contains 1,600,000 tweets extracted using the twitter api. The tweets have been annotated (0 = negative, 4 = positive) and they can be used to detect sentiment.
-
Imported the required modules.
-
Imported the dataset.
-
Performed exploratory data analysis.
-
Performed data preprocessing.
-
Created the training and the test set.
-
Built the model.
-
Evaluated the model.
-
Performed inference on the test seta