{"id":31649271,"url":"https://github.com/18mahi/tweet-sentiment-analysis","last_synced_at":"2026-04-30T08:33:37.611Z","repository":{"id":318029464,"uuid":"1069760465","full_name":"18mahi/tweet-sentiment-analysis","owner":"18mahi","description":"Classify tweets into happy, sad, angry, excited, and neutral with this interactive Python model. Combining TF-IDF text features with engineered numeric features like emoji sentiment, polarity, subjectivity, and punctuation counts, it demonstrates intermediate-level NLP, feature engineering, and visualization skills.","archived":false,"fork":false,"pushed_at":"2025-10-04T16:15:37.000Z","size":327,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-04T17:26:56.567Z","etag":null,"topics":["data-science","data-visualization","jupyter-notebook","machine-learning","matplotlib","nlp","numpy","pandas","sklearn","string","textblob"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/18mahi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-04T15:13:39.000Z","updated_at":"2025-10-04T16:20:35.000Z","dependencies_parsed_at":"2025-10-04T17:27:28.587Z","dependency_job_id":"b65763e0-293a-475d-a7bb-db0b8915abe9","html_url":"https://github.com/18mahi/tweet-sentiment-analysis","commit_stats":null,"previous_names":["18mahi/tweet-sentiment-analysis"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/18mahi/tweet-sentiment-analysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/18mahi%2Ftweet-sentiment-analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/18mahi%2Ftweet-sentiment-analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/18mahi%2Ftweet-sentiment-analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/18mahi%2Ftweet-sentiment-analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/18mahi","download_url":"https://codeload.github.com/18mahi/tweet-sentiment-analysis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/18mahi%2Ftweet-sentiment-analysis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278740831,"owners_count":26037480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["data-science","data-visualization","jupyter-notebook","machine-learning","matplotlib","nlp","numpy","pandas","sklearn","string","textblob"],"created_at":"2025-10-07T07:41:52.340Z","updated_at":"2025-10-07T07:41:56.112Z","avatar_url":"https://github.com/18mahi.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tweet-sentiment-analysis\nThis repository contains an intermediate-level tweet sentiment analysis model built using Python, Scikit-learn, TextBlob, and Plotly. The project demonstrates feature engineering, machine learning, and interactive visualization in a complete workflow, making it ideal for portfolios and learning purposes.\n\n# Project Overview\nThe model classifies tweets into five sentiment categories: happy, angry, sad, excited, and neutral. It combines TF-IDF text features with intermediate-level engineered features, including:\nEmoji sentiment scoring\nPolarity \u0026 subjectivity (TextBlob)\nExclamation and question counts\nWord count and average word length\nHashtags, mentions, and capital letter ratio\nThe project leverages a RandomForest classifier trained on a synthetic dataset, showcasing feature importance, prediction probabilities, and interactive visualizations for both evaluation and user inputs.\n\n\u003cimg width=\"617\" height=\"71\" alt=\"image\" src=\"https://github.com/user-attachments/assets/96b95606-2cbb-41c8-9940-44fe9a5c4d51\" /\u003e\n\n# Key Features\nText Preprocessing: Cleans tweets by removing URLs, mentions, hashtags, and punctuation.\nFeature Engineering: Combines text-based TF-IDF vectors with numeric sentiment and structural features.\nModel Evaluation: Includes accuracy metrics, classification report, and confusion matrix.\n\n# Visualization:\nProbability bar charts for individual predictions using Plotly.\nTop feature importance visualized with Matplotlib.\nDynamic User Input: Users can type custom tweets and receive predicted sentiment and probability distribution interactively.\n\n# Technologies \u0026 Libraries\n-Python 3.x\n-Pandas \u0026 Numpy\n-Scikit-learn\n-TextBlob\n-Matplotlib \u0026 Seaborn\n-Plotly\n\n# How to Use\nRun the notebook in Jupyter.\nExplore the pre-generated test predictions and visualizations.\nUse the dynamic input section to classify any custom tweet.\nObserve probability bars and feature contributions for interpretability.\n\n# Learning Outcomes\nThis project demonstrates practical NLP techniques, intermediate-level feature engineering, model evaluation, and interactive visualization, making it an excellent addition to a data science portfolio. It also provides a foundation to explore more advanced topics like bigram/trigram TF-IDF, deep learning, or sentiment analysis on larger datasets.\n\n\u003cimg width=\"814\" height=\"292\" alt=\"image\" src=\"https://github.com/user-attachments/assets/91ce01c0-e9dc-4bf0-8e0e-0aada90acb06\" /\u003e\n\n\u003cimg width=\"798\" height=\"286\" alt=\"image\" src=\"https://github.com/user-attachments/assets/53f65548-5e8c-4b88-809f-13123ebaa7a4\" /\u003e\n\n\u003cimg width=\"804\" height=\"289\" alt=\"image\" src=\"https://github.com/user-attachments/assets/bfb3ae38-17fc-47e7-a132-cd043513cf0e\" /\u003e\n\n\u003cimg width=\"809\" height=\"285\" alt=\"image\" src=\"https://github.com/user-attachments/assets/ac55d7a2-08e8-434f-9486-c410de99bc88\" /\u003e\n\n\u003cimg width=\"814\" height=\"295\" alt=\"image\" src=\"https://github.com/user-attachments/assets/a23385cf-cb9b-4d0b-857a-210fa7f0decb\" /\u003e\n\n\u003cimg width=\"812\" height=\"283\" alt=\"image\" src=\"https://github.com/user-attachments/assets/bee285e2-387e-4662-acfa-994f8120cee8\" /\u003e\n\n\u003cimg width=\"771\" height=\"268\" alt=\"image\" src=\"https://github.com/user-attachments/assets/02c6bc3b-cc80-4384-b284-b5618594b58b\" /\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F18mahi%2Ftweet-sentiment-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F18mahi%2Ftweet-sentiment-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F18mahi%2Ftweet-sentiment-analysis/lists"}