Skip to content

Repository files navigation

image

Exploring Emotions in Tweets: A Sentiment Analysis Project

Table of Contents

  1. Introduction
  2. Project Overview
  3. Data Collection
  4. Data Modeling
  5. Data Visualization
  6. Presentation
  7. Libraries Used
  8. Installation Instructions
  9. Conclusions and Future Work
  10. Contact Information

Introduction

Sentiment Analysis leverages data analysis techniques to interpret the emotional tone behind text data. This project delves into sentiment analysis within the context of Twitter, a platform rich in opinion and sentiment, demonstrating its real-world applications and impact.

Project Overview

This end-to-end machine learning project encompasses the full spectrum of Twitter sentiment analysis, from data collection and text cleaning to modeling, visualization, and presentation, providing a comprehensive view of the sentiment analysis process.

Data Collection

Kaggle Dataset

The project uses the Kaggle Sentiment140 Dataset, a rich collection of historical tweets, chosen for its diversity and relevance. Access it here: Kaggle Sentiment140 Dataset.

Scraper API

Real-time tweets were gathered using the Scraper API, enabling access to current Twitter sentiments. This dynamic data source offered a real-time perspective on public opinion.

Data Modeling

Text Preprocessing

Key steps included noise removal, tokenization, stemming, lemmatization, and stopword removal, each crucial for preparing the text for analysis.

Machine Learning Models

The project evaluated Logistic Regression, Naive Bayes, and SVM, chosen for their effectiveness in text classification tasks.

Hyperparameter Tuning

Focused on optimizing the Logistic Regression model, this phase involved adjusting parameters to enhance model accuracy and performance.

Notebook

Explore the modeling process: Jupyter Notebook on Sentiment Analysis - Machine Learning.

Data Visualization

  1. Python Notebook: Insights are visualized here: Data Visualization Notebook.
  2. Streamlit Application: The app showcases results interactively. Check the app.py and helper_functions.py.
  3. Streamlit Screenshot: image image image

Presentation

The project's findings are summarized in this accessible format: Twitter Sentiment Analysis PDF.

Libraries Used

pandas
numpy
matplotlib
wordcloud
PIL
plotly
scikit-learn
nltk
seaborn
requests
streamlit

Installation Instructions

Ensure the installation of required libraries using pip install <library-name>. Specific version requirements, if any, are listed in the project documentation.

Conclusions and Future Work

This project showcases the potential of sentiment analysis in understanding public opinion on social media platforms. Future enhancements could include deeper analysis with more complex models or expanding the scope to other social media platforms.

Contact Information

For further details or feedback, connect with me on LinkedIn or visit my GitHub Profile.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages