https://github.com/abhipatel35/twitter-analysis
Python script conducts sentiment analysis on Twitter data via GetOldTweets3, omitting NLTK. It preprocesses, analyzes sentiments, and visualizes results with a bar graph.
https://github.com/abhipatel35/twitter-analysis
emotion-recognition natural-language-processing nlp sentiment-analysis twitter twitter-analysis
Last synced: 6 days ago
JSON representation
Python script conducts sentiment analysis on Twitter data via GetOldTweets3, omitting NLTK. It preprocesses, analyzes sentiments, and visualizes results with a bar graph.
- Host: GitHub
- URL: https://github.com/abhipatel35/twitter-analysis
- Owner: abhipatel35
- Created: 2023-12-25T23:28:44.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-25T23:32:41.000Z (over 2 years ago)
- Last Synced: 2025-05-21T16:12:38.296Z (about 1 year ago)
- Topics: emotion-recognition, natural-language-processing, nlp, sentiment-analysis, twitter, twitter-analysis
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Twitter-Analysis
This Python script retrieves tweets using the [GetOldTweets3](https://github.com/Mottl/GetOldTweets3) library and performs sentiment analysis on the gathered data.
## Overview
The script collects tweets posted between January 1, 2020, and April 1, 2020, using the specified search query. It then preprocesses the text data, cleans it by removing punctuations and stop words, and conducts sentiment analysis using a predefined sentiment lexicon.
## Technologies Used
- Python
- GetOldTweets3 Library
- Matplotlib Library
## Getting Started
To use this script:
1. Install the required libraries. You can install them via `pip`:
```bash
pip install GetOldTweets3 matplotlib
```
2. Clone the repository:
```bash
git clone https://github.com/abhipatel35/Twitter-Analysis.git
```
3. Run the script by executing:
```bash
python main.py
```
## Acknowledgments
The script utilizes the [GetOldTweets3](https://github.com/Mottl/GetOldTweets3) library by Mottl to access historical tweets based on specified search criteria.
## Results
The script generates a bar graph illustrating the sentiment distribution among the collected tweets. Additionally, the sentiment analysis results are printed to the console.
## File Structure
- `main.py`: Python script containing the code for data collection and sentiment analysis.
- `sentiments.txt`: File containing sentiment lexicon or word sentiment associations.
- `graph.png`: Generated bar graph showing the sentiment distribution among the tweets.
---
Feel free to adjust and expand upon this content to better suit your project's specifics and provide more detailed instructions or explanations if needed.