Skip to content

Latest commit

ย 

History

History
150 lines (99 loc) ยท 2.9 KB

File metadata and controls

150 lines (99 loc) ยท 2.9 KB

๐Ÿฆ Sentiment Analysis of Tweets

This project performs Sentiment Analysis on Tweets using Machine Learning and Natural Language Processing (NLP) techniques.
It classifies tweets into:

  • โœ… Positive
  • โŒ Negative
  • ๐Ÿ˜ Neutral

The system includes data preprocessing, text cleaning, feature extraction, model training, and performance evaluation.


๐Ÿ“Œ Project Description

Social media platforms like Twitter generate large volumes of opinion-based textual data.
This project aims to automatically determine the sentiment expressed in tweets by analyzing their textual content.

Sentiment analysis is useful for:

  • Customer feedback analysis
  • Product review monitoring
  • Brand reputation management
  • Public opinion mining
  • Social media analytics

๐Ÿ› ๏ธ Technologies Used

  • Python
  • Pandas
  • NumPy
  • Scikit-learn
  • Matplotlib
  • Seaborn
  • re (Regular Expressions)
  • tqdm
  • pysentimiento
  • Natural Language Processing (NLP)

๐Ÿ“‚ Project Structure

Sentiment_Analysis_of_Tweet/
โ”‚
โ”œโ”€โ”€ Sentiment_Analysis_of_Tweet.ipynb   # Main implementation file
โ”œโ”€โ”€ Tweets.csv                          # Dataset used
โ””โ”€โ”€ README.md                           # Project documentation

๐Ÿงน Data Preprocessing Steps

The following preprocessing techniques are applied to clean tweet text:

  • Convert text to lowercase
  • Remove URLs
  • Remove mentions (@username)
  • Remove hashtags
  • Remove punctuation
  • Remove stopwords
  • Tokenization
  • Lemmatization
  • Remove special characters using Regular Expressions

๐Ÿง  Model Training

The cleaned data is transformed into numerical features using:

  • TF-IDF Vectorization

Machine Learning algorithms are then applied for sentiment classification.


๐Ÿ“Š Performance Evaluation

Model performance is evaluated using:

  • Accuracy Score
  • Confusion Matrix
  • Classification Report

Visualization is done using Matplotlib and Seaborn.


โ–ถ๏ธ How to Run the Project

Step 1: Clone the Repository

git clone https://github.com/your-username/Sentiment_Analysis_of_Tweet.git
cd Sentiment_Analysis_of_Tweet

Step 2: Install Required Libraries

pip install pandas numpy scikit-learn matplotlib seaborn tqdm pysentimiento nltk

Step 3: Open Jupyter Notebook

jupyter notebook

Open:

Sentiment_Analysis_of_Tweet.ipynb

Run all cells to preprocess data, train the model, and evaluate performance.


๐Ÿ“ˆ Output

The trained model predicts whether a tweet expresses:

  • Positive Sentiment
  • Negative Sentiment
  • Neutral Sentiment

๐Ÿ”ฎ Future Enhancements

  • Deep Learning Models (LSTM, BERT)
  • Real-time Twitter API integration
  • Web-based GUI using Streamlit
  • Deployment on cloud platforms

๐Ÿ“„ License

This project is developed for educational purposes.


Developed by:L Jitendra Kumar