Skip to content

X Sentiment Analysis is the process of using Python to understand the emotions or opinions expressed in tweets automatically. By analyzing the text we can classify tweets as positive, negative or neutral.

Notifications You must be signed in to change notification settings

coderhead-cmd/X-Sentiment-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Sentiment Analysis Project

Overview

This project performs Sentiment Analysis to classify text data into positive, negative, or neutral sentiments. It applies Natural Language Processing (NLP) techniques for text cleaning, vectorization, and machine learning model training to understand public opinions or user feedback effectively.


Data Preprocessing

The dataset used contains text data such as reviews or comments.
The preprocessing steps include:

  • Converting all text to lowercase
  • Removing punctuation, numbers, and special characters
  • Tokenization and stopword removal
  • Stemming or Lemmatization for word normalization

Feature Extraction

To convert text into numerical form, TF-IDF Vectorization or CountVectorizer is used.
This helps the machine learning model understand textual patterns and word importance.


Model Training

Several machine learning models can be trained and compared, such as:

  • Logistic Regression
  • Naive Bayes
  • Support Vector Machine (SVM)
  • Random Forest

The best-performing model is selected based on evaluation metrics.


Model Evaluation

Model performance is evaluated using:

  • Accuracy Score
  • Confusion Matrix
  • Precision, Recall, and F1-Score

Libraries Used

  • pandas, numpy — Data manipulation
  • nltk, re — Text cleaning and preprocessing
  • scikit-learn — Machine learning and evaluation
  • matplotlib, seaborn — Visualization

About

X Sentiment Analysis is the process of using Python to understand the emotions or opinions expressed in tweets automatically. By analyzing the text we can classify tweets as positive, negative or neutral.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published