{"id":18676573,"url":"https://github.com/anil951/yt-recommendation","last_synced_at":"2025-11-07T06:30:35.192Z","repository":{"id":204908875,"uuid":"712933821","full_name":"Anil951/YT-Recommendation","owner":"Anil951","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-25T18:24:08.000Z","size":6410,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-07T09:40:54.835Z","etag":null,"topics":["googletranslate","lstm","nlp","nltk-python","sentiment-analysis","spacy-nlp","textanalysis","youtube-api","youtube-video-rank","youtube-video-recommend"],"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/Anil951.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-11-01T14:02:03.000Z","updated_at":"2024-11-06T15:23:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"22805a59-d5a9-4a84-9c76-93770db48548","html_url":"https://github.com/Anil951/YT-Recommendation","commit_stats":null,"previous_names":["anil951/youtube-video-recommendation-for-domain-specific-content","anil951/yt-recommendation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anil951%2FYT-Recommendation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anil951%2FYT-Recommendation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anil951%2FYT-Recommendation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anil951%2FYT-Recommendation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Anil951","download_url":"https://codeload.github.com/Anil951/YT-Recommendation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239520734,"owners_count":19652747,"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","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":["googletranslate","lstm","nlp","nltk-python","sentiment-analysis","spacy-nlp","textanalysis","youtube-api","youtube-video-rank","youtube-video-recommend"],"created_at":"2024-11-07T09:29:49.909Z","updated_at":"2025-11-07T06:30:35.163Z","avatar_url":"https://github.com/Anil951.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Sentiment-Based YouTube Video Recommendation\n\nWelcome to the YouTube Video Recommendation System project! This comprehensive system is designed to offer personalized and relevant video recommendations within a specific content domain. It leverages the YouTube API, Data analysis, Natural Language Processing (NLP) and LSTM.\n\n*motive in-short* : Providing domain-specific YouTube video suggestions for first-time viewers, incorporating sentiment analysis by Ensemble Modeling, spam filtering, multilingual and transliterated text support on comments, and video ranking based on normalized scores.\n\n## Project Overview\n\n- **Objective:** To provide accurate and domain-specific video recommendations on YouTube by analysing the video analyics - mainly comments.\n- **Specialization:** Focuses on maintaining content relevance within the same domain.\n- **Key Features:**\n  - Data Analysis and Insights: Utilizes the YouTube API to collect and analyze video data, extracting insights from video titles, tags, and search texts using NLP techniques.\n  - Video Statistics Analysis: Gathers and processes video statistics, including view counts and likes, employing data analysis tools such as Pandas and Numpy.\n  - User Engagement Enhancement: Implements text similarity of video titles, search texts, tags and sentiment analysis on user comments.\n  - Video Ranking: Calculates normalized scores for videos based on collected data and user engagement, ensuring the best video recommendations are presented to first-time viewers within the specific domain.\n \n## Project outline/flow\n\n1. *Data Extraction using YouTube Data API :*\n   Extract data from YouTube videos using the YouTube Data API, including video title, tags, comments, likes, dislikes, and comment count.\n\n2. *Collecting Search Texts :*\n   Gather the search texts or prompts used to find these videos on YouTube.\n\n3. *Domain Verification Using NLP :*\n   Check if all the videos are from the same domain.\n   Perform domain verification processes:\n    - Remove punctuation, duplicates, and stop words.\n    - Convert text to lowercase.\n    - Apply lemmatization, tokenization, and similarity checks.\n    - Utilize NLP techniques to verify domain similarity:\n      - Verify title similarity using NLTK NLP and spaCy.\n      - Verify tag similarity using NLTK NLP and spaCy.\n      - Check if search texts of videos are similar.\n\n4. *NLP Analysis on Comments of All Videos :*\n   Conduct Natural Language Processing (NLP) analysis on video comments.\n   Sub-steps for NLP analysis:\n    - Collecting Video Comments:\n      Gather comments from YouTube videos.\n    - Storing Comments in Pandas DataFrame:\n      Create a Pandas DataFrame to store comments for each video.\n    - Slang Words Extraction:\n      Scrape and store slang words in a dictionary.\n    - Text Preprocessing:\n      For each valid comment in the DataFrame, preprocess the text by:\n      - Converting text to lowercase.\n      - Handling HTML entities.\n      - Removing punctuation, numbers, and emojis.\n      - Dropping rows with missing or NaN values.\n      - Expanding contractions.\n      - Correcting spelling and grammar mistakes.\n      - Removing irrelevant text such as usernames and links.\n      - Handling slang words (scraped in the previous step).\n    - Language Translation and Transileration:\n      Identify and translate non-English words in comments into English and transilerate texts into corresponding languages.\n    - Sentiment Analysis:\n      Utilize pretrained models **(BERT,Vader Lexicon)** and **LSTM Trained Model** to perform sentiment analysis on each comment by *Ensembling Learning*.\n    - Scoring and Normalization:\n      Assign scores to comments and calculate the total normalized score for each video.\n    - **Video Ranking**:\n      Rank videos based on their normalized scores.\n\n***Present the best video recommendations to first-time viewers within the specific domain.***\n\n## Technology Stack\n\n- **YouTube Data API:** Used for video retrieval and data gathering.\n- **Natural Language Processing (NLP):** Applied to analyze video titles, tags, and sentiment analysis on comments.\n- **Data Analysis:** Utilizes Python tools like Pandas and Numpy.\n- **LSTM (Long Short-Term Memory):** Implements models for Sentiment Analysis.\n- **Python Programming:** This code is developed using Python Language.\n\n## How to Use\n\n1. Clone the main ipynb notebook:\n   `yt_rank_main.ipynb`\n2. API Setup:\n   Obtain API keys and credentials from the `YouTube Data API`. Insert your credentials in the project.\n3. To run this project, you'll need to install the following Python libraries and dependencies:\n   `pip install -r requirements.txt`\n4. Download the required resources from `static` folder containing\n   - `lang_code_fullname.json` containing language codes for all 179 known languages.\n   - `slang_words.json` containing slang words more than 2000.\n   - LSTM Model for Sentiment Analysis,\n     - `sentiment_model.h5`\n     - `tokenizer.pkl`\n\n## Contributing\nWe welcome contributions from the community to enhance the system's capabilities and accuracy. Feel free to submit pull requests and report issues on GitHub...\n\n\u003e [!NOTE]\n\u003e The recommendations and insights provided in this project are based on Natural Language Processing (NLP) analysis and may not be infallible.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanil951%2Fyt-recommendation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanil951%2Fyt-recommendation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanil951%2Fyt-recommendation/lists"}