This project was made for PioneerHacks IV in 24 hours and won Most Innovative
The Yelp Guru website helps users find the best dishes at their favorite restaurants listed on Yelp. By inputting a Yelp restaurant link, our website analyzes all the reviews using advanced Natural Language Processing (NLP) techniques to determine the top dishes in terms of user rating, popularity, and health. Our website eliminates the need for users to spend time sifting through countless reviews to find the best dishes, making it easier for them to make informed decisions about what to order. Additionally, our health score shows users the health score and calories of each dish, promoting a balanced diet and overall healthier lifestyle.
YelpGuru-demo.mp4
This website is designed to help users find the best dishes at their favorite restaurants listed on Yelp. By simply inputting a Yelp restaurant link, our website will scrape all the reviews and analyze them using advanced NLP techniques. Specifically, we use named entity recognition (NER) to identify all food entities mentioned in the reviews. We then process this data on our end to ensure that only actual menu items are considered, eliminating ingredients like soup, broth, or spices that are often mentioned in reviews.
Once we have a list of actual menu items, we analyze each food's sentiment using aspect-based sentiment analysis (ABSA). This approach enables us to determine how much the reviewer enjoyed each dish and attribute a score to it accordingly. Based on this analysis, we add or subtract points to our scoring algorithm for each dish, which helps us determine the top 3 dishes in terms of user rating.
In addition to user ratings, our website also analyzes food popularity among Yelp users. We use a similar process as above, but instead of sentiment analysis, we focus on the frequency of each food item mentioned in reviews. By doing so, we can determine the top 3 dishes in terms of popularity among users.
We also understand the importance of healthy eating, and we've incorporated a health score for each dish using data from a national government database. This allows users to view the health scores for the top 3 dishes determined by our website, making it easier for them to choose the healthiest options available at their favorite restaurants and maintain a balanced diet.
To run this project on your own you must do the following steps
1. Navigate to a command line and clone the repository
git clone https://github.com/butter-my-toast/yelp-guru/
2. Start the server and take note of the IP
cd yelp-guru
python main.py
The output should be something similar to the following code segment:
* Serving Flask app 'main' (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on all addresses.
WARNING: This is a development server. Do not use it in a production deployment.
* Running on http://10.1.126.35:43/ (Press CTRL+C to quit)
3. Then open a new terminal and navigate back into the yelp-guru directory and modify the HomePage.jsx file located at "pioneerHacksFrontEnd/pioneerHacksFrontEnd/src/components/Homepage/Homepage.jsx". Find the fetch function on line 29 and replace the URL with your server ip given in the previous command. Then navigate to the pioneerHacksFrontEnd/pionerHacksFrontEnd folder and run the following command:
npm install
npm run dev
And with that, it should all be up and running!
Front-end: React.js
React is used for the entire webview of the project
Back-end: Flask
Flask is used to connect our data processing to the front-end
Inference API: Hugging Face
Hugging Face's Inference API was used to quickly access the NLP models without any cost
Named-entity recognition: InstaFoodRoBERTa-NER
Dizex's fine-tuned BERT model was used to recognize the food entities in our Yelp reviews
Aspect-based sentiment analysis: deberta-v3-large-absa-v1.1
Yangheng's ABSA model was used to determine the sentiment of a specific food in a review
Food database: FoodData Central
The U.S. Department of Agriculture's food database was used to find the calories of foods and determine the health scores for them
Alexander S. Du / @Mantlemoose
Alex Y. Du / @alexyd88
Eashan Chatterjee / @EashanC23
Nicholas Kann / @nick-kann