Welcome to my sentiment analysis project! This project analyzes the sentiment of text using machine learning techniques and natural language processing. We'll walk you through the process step by step.
Sentiment analysis is the process of determining the sentiment expressed in a piece of text. In this project, we utilize a variety of tools and techniques to analyze sentiments, from data collection to model evaluation.
We collect text data from a file for analysis.
Text data undergoes pre-processing, including lowercasing, punctuation removal, and labeling with sentiment.
We use TF-IDF vectorization to extract features from the text data.
A Support Vector Machine (SVM) model is selected and trained using the labeled data.
The trained model is evaluated using test data, and predictions are made.
We provide a function to analyze the sentiment of any text input. It utilizes the VADER sentiment analysis tool.
We determine the overall sentiment of the text and display it.
A bar plot is generated to visualize the distribution of emotions in the analyzed text.
sentiment-analysis/
β
βββ emotions.txt
βββ read.txt
βββ sentiment_analysis.ipynb
βββ README.md
-
Clone the repository:
git clone https://github.com/j-a-y-e-s-h/sentiment-analysis.git
-
Install dependencies:
pip install -r requirements.txt
- Run the Python script to perform sentiment analysis.
python sentiment_analysis.py
- Change data.
If you want to change data or analysis in new data. change the data in
read.txt
file
Contributions are welcome! Feel free to fork this repository and submit pull requests.
This project utilizes the NLTK library, scikit-learn, and matplotlib for sentiment analysis and visualization.
Feel free to explore the project and provide feedback! If you find it useful, don't forget to give it a βοΈ!
All rights reserved to Jayesh.
For more information, visit Jayesh's GitHub Profile π.