Skip to content

Sentiment analysis through twitter by identifying emojis within the texts.

License

Notifications You must be signed in to change notification settings

jparedesDS/NLP-sentiment-analysis-with-emojis

Repository files navigation

Twitter - Sentiment Analysis with Emojis

Project Description

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.

Project Workflow

  1. Importing Libraries and Loading Data:

    • Libraries such as pandas, numpy, and matplotlib are imported.
    • A dataset of tweets, including the tweet text and associated emojis, is loaded.
  2. Data Preprocessing:

    • Cleaning and normalizing the tweet texts.
    • Extracting emojis and analyzing their frequency in the text.
  3. 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.
  4. Sentiment Modeling:

    • Using NLP techniques to classify tweets into different sentiment categories.
    • Applying algorithms to predict sentiment based on the presence of emojis.
  5. 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.

Libraries Used

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.

Key Features

  • 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.

System Requirements

  • Python 3.x
  • Additional dependencies installed via pip.

How to Run

  1. Clone this repository:
    git clone https://github.com/jparedesDS/twitter-sentiment-analysis-emojis.git
  2. Install the required dependencies:
pip install -r requirements.txt
  1. Load your dataset in the required format (CSV with columns for tweet text and emojis).
  2. Run the Jupyter Notebook:
jupyter notebook
  1. Open the Twitter_Sentiment_Analysis_with_Emojis.ipynb file to explore the analysis and visualizations.

Contributions

Contributions are welcome! If you'd like to improve this project, please:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/new-feature).
  3. Make your changes and commit them (git commit -am 'Add new feature').
  4. Push your branch (git push origin feature/new-feature).
  5. Open a Pull Request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Sentiment analysis through twitter by identifying emojis within the texts.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published