{"id":18792811,"url":"https://github.com/phenomsg/restaurant-review-analysis","last_synced_at":"2026-05-16T01:33:43.999Z","repository":{"id":217651894,"uuid":"744470509","full_name":"PhenomSG/Restaurant-Review-Analysis","owner":"PhenomSG","description":"This project utilizes the power of BERT (Bidirectional Encoder Representations from Transformers) for sentiment analysis","archived":false,"fork":false,"pushed_at":"2025-05-16T08:33:03.000Z","size":58092,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-03T00:44:07.030Z","etag":null,"topics":["bert-model","data-science","huggingface","natural-language-processing","python","transformers"],"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/PhenomSG.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}},"created_at":"2024-01-17T11:15:02.000Z","updated_at":"2025-07-17T22:02:42.000Z","dependencies_parsed_at":"2024-07-14T19:39:53.955Z","dependency_job_id":"9e96108a-059a-4c32-a035-f6c9f278738e","html_url":"https://github.com/PhenomSG/Restaurant-Review-Analysis","commit_stats":null,"previous_names":["sahajg009/sentiment_analysis_using_nlp","sahajg009/restaurant-review-analysis","phenomsg/restaurant-review-analysis"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PhenomSG/Restaurant-Review-Analysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhenomSG%2FRestaurant-Review-Analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhenomSG%2FRestaurant-Review-Analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhenomSG%2FRestaurant-Review-Analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhenomSG%2FRestaurant-Review-Analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PhenomSG","download_url":"https://codeload.github.com/PhenomSG/Restaurant-Review-Analysis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhenomSG%2FRestaurant-Review-Analysis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33087028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:25:35.270Z","status":"ssl_error","status_checked_at":"2026-05-15T20:25:34.732Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["bert-model","data-science","huggingface","natural-language-processing","python","transformers"],"created_at":"2024-11-07T21:21:55.866Z","updated_at":"2026-05-16T01:33:43.984Z","avatar_url":"https://github.com/PhenomSG.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Restaurant Review Analysis System\n### Sample Restaurant Images\n\n![Restaurant Image 1](imgs-website/1.png)\n![Restaurant Image 2](imgs-website/2.png)\n![Restaurant Image 3](imgs-website/3.png)\n![Restaurant Image 4](imgs-website/4.png)\n![Restaurant Image 5](imgs-website/5.png)\n\n## Project Overview\n\nThis project aims to build a comprehensive system for collecting and analyzing restaurant reviews. The system will:\n1. Collect reviews from various platforms.\n2. Analyze the sentiment of the reviews to generate a rating.\n3. Provide explanations for the generated ratings.\n4. Create a word cloud highlighting key themes from the reviews.\n5. Analyze restaurant images to classify them based on suitability for different dining experiences (e.g., family, casual, date) and suggest improvements.\n\n## Features\n\n- **Review Collection**: Gather restaurant reviews from sources like Yelp and Google Reviews.\n- **Sentiment Analysis**: Analyze the sentiment of the reviews to derive a rating.\n- **Rating Explanation**: Provide detailed explanations for the generated ratings.\n- **Word Cloud Generation**: Identify common themes in the reviews to create a word cloud.\n- **Image Analysis**: Classify the restaurant type based on images and suggest improvements.\n\n## Technology Stack\n\n- **Python**: Main programming language.\n- **Gemini Pro API**: Used for NLP and image analysis tasks.\n- **NLP Libraries**: For additional natural language processing.\n- **Image Processing Libraries**: For analyzing restaurant images.\n- **Web Scraping Tools**: To collect reviews from various platforms.\n\n## Installation\n\n### Prerequisites\n\n- Python 3.7 or higher\n- API key for Gemini Pro\n\n### Setup\n\n1. Clone the repository:\n    ```bash\n    git clone https://github.com/PhenomSG/Sentiment_Analysis_Using_NLP.git\n    cd restaurant-review-analysis\n    ```\n\n2. Create and activate a virtual environment:\n    ```bash\n    python -m venv venv\n    source venv/bin/activate  # On Windows use `venv\\Scripts\\activate`\n    ```\n\n3. Install the required packages:\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n4. Set up your Gemini Pro API key:\n    ```bash\n    export GEMINI_API_KEY='your_gemini_api_key'\n    ```\n\n## Usage\n\n### Collecting Reviews\n\nTo collect reviews from a source (e.g., Yelp), use the provided `collect_reviews_from_source` function:\n\n```python\nfrom review_collector import collect_reviews_from_source\n\nreviews = collect_reviews_from_source('yelp', 'restaurant_id')\n```\n\n### Analyzing Reviews\n\nTo analyze sentiment and generate a rating:\n\n```python\nfrom review_analysis import sentiment_analysis, aggregate_ratings, gemini_pro_explain_rating\n\nratings = sentiment_analysis(reviews, model='gemini_pro')\noverall_rating = aggregate_ratings(ratings)\nexplanation = gemini_pro_explain_rating(reviews, overall_rating)\n```\n\n### Generating a Word Cloud\n\nTo generate a word cloud from the reviews:\n\n```python\nfrom word_cloud_generator import extract_keywords, generate_word_cloud\n\nword_cloud_data = extract_keywords(reviews)\ngenerate_word_cloud(word_cloud_data)\n```\n\n### Analyzing Images\n\nTo classify restaurant type and suggest improvements based on images:\n\n```python\nfrom image_analysis import classify_restaurant_type, assess_image_quality\n\nfor image in restaurant_images:\n    category = classify_restaurant_type(image, model='gemini_pro')\n    improvements = assess_image_quality(image, model='gemini_pro')\n    print(f\"Category: {category}, Improvements: {improvements}\")\n```\n\n## Directory Structure\n\n```\nrestaurant-review-analysis/\n│\n├── README.md                # Project overview and instructions\n├── requirements.txt         # List of dependencies\n├── collect_reviews.py       # Functions for collecting reviews\n├── review_analysis.py       # Functions for analyzing reviews\n├── word_cloud_generator.py  # Functions for generating word clouds\n├── image_analysis.py        # Functions for analyzing images\n└── main.py                  # Main script to run the analysis\n```\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphenomsg%2Frestaurant-review-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphenomsg%2Frestaurant-review-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphenomsg%2Frestaurant-review-analysis/lists"}