{"id":25523852,"url":"https://github.com/supriya811106/twitter-sentiment-analysis","last_synced_at":"2026-04-05T23:33:04.291Z","repository":{"id":187060675,"uuid":"676249656","full_name":"supriya811106/Twitter-Sentiment-Analysis","owner":"supriya811106","description":"Analyzing the mood of tweets! We sort tweets on popular topics into positive, negative, or neutral categories to gauge public opinion. See what Twitter really thinks!","archived":false,"fork":false,"pushed_at":"2023-09-25T12:34:51.000Z","size":2232,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-21T17:11:36.037Z","etag":null,"topics":["bernoulli-naive-bayes","jupyter-notebook","matplotlib","nlp-machine-learning","nltk","numpy","pandas","python","scikit-learn","seaborn","sentiment-analysis","text-classification","tfidf-vectorizer","wordcloud"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/supriya811106.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-08T19:14:29.000Z","updated_at":"2025-03-21T17:41:50.000Z","dependencies_parsed_at":"2023-08-08T21:06:11.228Z","dependency_job_id":"7efc4d70-7e60-4da1-a888-71a10037a761","html_url":"https://github.com/supriya811106/Twitter-Sentiment-Analysis","commit_stats":null,"previous_names":["supriya811106/twitter-sentiment-analysis"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/supriya811106/Twitter-Sentiment-Analysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supriya811106%2FTwitter-Sentiment-Analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supriya811106%2FTwitter-Sentiment-Analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supriya811106%2FTwitter-Sentiment-Analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supriya811106%2FTwitter-Sentiment-Analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/supriya811106","download_url":"https://codeload.github.com/supriya811106/Twitter-Sentiment-Analysis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supriya811106%2FTwitter-Sentiment-Analysis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31454197,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"ssl_error","status_checked_at":"2026-04-05T21:22:51.943Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bernoulli-naive-bayes","jupyter-notebook","matplotlib","nlp-machine-learning","nltk","numpy","pandas","python","scikit-learn","seaborn","sentiment-analysis","text-classification","tfidf-vectorizer","wordcloud"],"created_at":"2025-02-19T19:27:38.164Z","updated_at":"2026-04-05T23:33:04.278Z","avatar_url":"https://github.com/supriya811106.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Twitter Sentiment Analysis\n\nThis project performs sentiment analysis on Twitter data using machine learning techniques. It includes data preprocessing, feature extraction, and classification to predict whether a tweet has a positive or negative sentiment.\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Data](#data)\n- [Preprocessing](#preprocessing)\n- [Feature Extraction](#feature-extraction)\n- [Model Training and Evaluation](#model-training-and-evaluation)\n- [Usage](#usage)\n- [Dependencies](#dependencies)\n\n## Introduction\n\nSentiment analysis, also known as opinion mining, is the process of determining the sentiment or emotional tone expressed in a piece of text, such as a tweet. In this project, we analyze tweets from Twitter to classify them as either positive or negative sentiment.\n\n## Data\n\nWe used a Twitter dataset containing 1.6 million tweets with labels indicating their sentiment (0 for negative and 1 for positive). The dataset includes various features, including tweet text, timestamp, and user information.\n\n## Preprocessing\n\n- Removed URLs from tweet text.\n- Removed punctuation marks from tweet text.\n- Removed stopwords (common words like \"the,\" \"and,\" \"is\") from tweet text.\n- Cleaned repeated characters (e.g., \"loooove\" becomes \"love\").\n- Removed numbers from tweet text.\n- Removed rare words that do not contribute significantly to sentiment analysis.\n- Removed special characters and extra white spaces.\n- Tokenized the text and performed stemming and lemmatization.\n\n## Feature Extraction\n\nWe used the TF-IDF (Term Frequency-Inverse Document Frequency) vectorization technique to convert the preprocessed text into numerical features. This technique helps in creating feature vectors for machine learning models.\n\n## Model Training and Evaluation\n\nWe trained a Bernoulli Naive Bayes (BNB) classifier using the TF-IDF vectors as features. The model was evaluated using classification metrics and a ROC curve. The confusion matrix and ROC curve are visualized in the README for performance assessment.\n\n## Usage\n\n1. Clone this repository:\n```bash\ngit clone https://github.com/supriya811106/Twitter-Sentiment-Analysis.git\n```\n\n3. Install the required dependencies (see the Dependencies section).\n\n4. Run the Jupyter Notebook or Python script to preprocess the data, extract features, train the model, and perform sentiment analysis on new tweets.\n\n5. Modify the code as needed for your specific use case.\n\n## Dependencies\n\n- Python 3.x\n- Jupyter Notebook (optional, for running the project interactively)\n- Pandas\n- Numpy\n- Scikit-learn\n- Matplotlib\n- Seaborn\n- NLTK (Natural Language Toolkit)\n- WordCloud\n- RegexpTokenizer\n- TfidfVectorizer\n- BernoulliNB\n\nYou can install these dependencies using pip:\n```bash\npip install pandas numpy scikit-learn matplotlib seaborn nltk wordcloud\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupriya811106%2Ftwitter-sentiment-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupriya811106%2Ftwitter-sentiment-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupriya811106%2Ftwitter-sentiment-analysis/lists"}