Welcome to the Twitter Sentiment Analysis repository! This project is dedicated to harnessing the power of natural language processing and machine learning to analyze the sentiment of tweets. By leveraging advanced techniques, we aim to classify tweets as positive, negative, or neutral based on their underlying sentiment.
In a world where social media platforms are teeming with opinions and emotions, understanding the sentiment behind tweets can provide valuable insights. Our Twitter Sentiment Analysis project utilizes cutting-edge techniques to decipher the emotional tone of tweets, helping individuals and businesses gain a deeper understanding of public sentiment.
Our repository is structured to cover every aspect of the Twitter Sentiment Analysis project:
- Dataset: Explore the
dataset
folder to find the tweet data used for training and testing our sentiment analysis model. - Model Development: The
model_train.ipynb
Jupyter Notebook details the steps we took to preprocess data, build the sentiment analysis model, and evaluate its performance. - Web Application: Check out the
app.py
file, which is the core of our Flask web application for deploying the trained model. Users can input tweets and receive sentiment predictions in real-time. - Frontend: The
templates
folder holds the HTML template for the web interface, while thestatic/css
folder contains the styles for the web application. - Documentation: The
README.md
file provides comprehensive information about the project, its usage, installation instructions, and more.
We hope our project sparks your curiosity and helps you delve into the fascinating world of sentiment analysis on Twitter!
In our pursuit of accurate sentiment analysis, we harnessed the capabilities of BERT (Bidirectional Encoder Representations from Transformers), a cutting-edge transformer-based model developed by Google. BERT has revolutionized natural language processing tasks, and we integrated it into our sentiment analysis pipeline to achieve even higher accuracy and contextual understanding.
Our commitment to accuracy led us to integrate BERT (Bidirectional Encoder Representations from Transformers) into our sentiment analysis model. Leveraging the power of BERT's contextual understanding and semantic relationships, we achieved a significant advancement in sentiment prediction accuracy.
BERT-Powered Accuracy: 84.91%
After rigorous training, fine-tuning, and evaluation, our sentiment analysis model powered by BERT demonstrated an impressive accuracy rate of 84.91%. This remarkable performance showcases the impact of leveraging state-of-the-art techniques for sentiment analysis.
Our Twitter Sentiment Analysis project is built upon a robust technology stack that encompasses both the backend and frontend components. This stack ensures efficient development, seamless deployment, and an engaging user experience.
Framework: Flask
Python Version: 3.9.6
Dependencies:
- numpy==1.21.2
- pandas==1.3.3
- scikit-learn==0.24.2
- torch
- transformers
- matplotlib
-
HTML
-
CSS
Interacting with our Twitter Sentiment Analysis project is straightforward. Follow these steps to harness the power of sentiment analysis on Twitter data:
- Clone the repository to your local machine.
- Navigate to the project directory.
- Install the necessary dependencies using the provided
requirements.txt
file. - Run the Flask application using the command:
python app.py
- Access the model's user interface by opening a web browser and navigating to
http://localhost:5000
.
On the user interface, provide input values for the following parameters:
- Enter your tweet
- Click on predict
After submitting the input, the model will perform its predictions and display the sentiment.
Ensure you have the required dependencies installed by running:
pip install -r requirements.txt
Contributions to enhance and extend the capabilities of the Twitter Sentiment Analysis are highly welcome. If you wish to contribute, please adhere to these steps:
- Fork the repository.
- Create a new branch dedicated to your feature or improvement.
- Implement your changes and ensure comprehensive testing.
- Submit a pull request, detailing the modifications and the underlying rationale.
This machine-learning marvel was brought to life by the collaborative efforts of Harshith Puram and Druvika Nuthalapati, fueled by the demand for accurate and data-driven sentiment analysis of social media content.
For inquiries, issues, or suggestions, please feel free to reach out via [email protected] or [email protected].