This project focuses on sentiment analysis using emojis to classify the emotional tone of tweets. By leveraging Natural Language Processing (NLP) techniques, the project analyzes how emojis are used in tweets and their relationship with sentiment.
-
Importing Libraries and Loading Data:
- Libraries such as
pandas
,numpy
, andmatplotlib
are imported. - A dataset of tweets, including the tweet text and associated emojis, is loaded.
- Libraries such as
-
Data Preprocessing:
- Cleaning and normalizing the tweet texts.
- Extracting emojis and analyzing their frequency in the text.
-
Exploratory Data Analysis (EDA):
- Visualizing the distribution of emojis in tweets.
- Grouping tweets by accounts to show the number of tweets per account.
- Analyzing correlations between popular accounts and their emoji usage.
-
Sentiment Modeling:
- Using NLP techniques to classify tweets into different sentiment categories.
- Applying algorithms to predict sentiment based on the presence of emojis.
-
Results Visualization:
- Generating graphs and tables that illustrate:
- The relationship between emojis used and the sentiment detected.
- Emoji usage frequency by the most popular accounts.
- Generating graphs and tables that illustrate:
The project utilizes the following Python libraries:
- pandas: For data manipulation and analysis.
- numpy: For numerical computations.
- matplotlib: For data visualization.
- seaborn: For enhanced visualizations.
- re (Regex): For text cleaning and emoji extraction.
- nltk: For natural language processing.
- Emoji Sentiment Analysis: Leveraging emojis as indicators of sentiment in tweets.
- Data-Driven Insights: Visualizing trends in emoji usage and their sentiment implications.
- NLP Integration: Combining traditional NLP techniques with emoji-specific sentiment modeling.
- Python 3.x
- Additional dependencies installed via
pip
.
- Clone this repository:
git clone https://github.com/jparedesDS/twitter-sentiment-analysis-emojis.git
- Install the required dependencies:
pip install -r requirements.txt
- Load your dataset in the required format (CSV with columns for tweet text and emojis).
- Run the Jupyter Notebook:
jupyter notebook
- Open the Twitter_Sentiment_Analysis_with_Emojis.ipynb file to explore the analysis and visualizations.
Contributions are welcome! If you'd like to improve this project, please:
- Fork the repository.
- Create a new branch (git checkout -b feature/new-feature).
- Make your changes and commit them (git commit -am 'Add new feature').
- Push your branch (git push origin feature/new-feature).
- Open a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.