This repository contains code and resources for performing opinion mining and sentiment analysis on tweets using Python and Natural Language Processing (NLP) techniques and of course streamlit.
To run the code in this repository, you will need the following:
- Python 3.5 or higher
- Python environment
- Twitter Developer Account to get access to Twitter API credentials
- Tweepy (Python library for accessing the Twitter API)
- TextBlob (Python library for processing textual data)
Clone the repository
git clone https://github.com/Briankim254/Opinion_mining_and_analysis_of_sentiment_twitter_based.git
Install the required libraries
pip install tweepy textblob
-
Create a Twitter developer account and get the API credentials (consumer key, consumer secret, access token, access secret)
-
Open opinion_mining_and_analysis_of_sentiment_twitter_based.ipynb in Jupyter Notebook or any other Python environment.
-
Replace the placeholders
CONSUMER_KEY
,CONSUMER_SECRET
,ACCESS_TOKEN
, andACCESS_SECRET
with your Twitter API credentials. -
Run the Script and enter the keyword or hashtag for the topic you want to analyze.
-
The script will fetch tweets using the Twitter API and perform sentiment analysis using TextBlob. The results will be displayed in the notebook.
Contributions to this repository are welcome. Please open an issue or pull request if you find a bug or want to add a new feature.
This project is licensed under the MIT License - see the LICENSE file for details.