The restaurant industry is a high grossing industry with people in Ireland spending over €8.5 billion on restaurant dining in 2019. Globally the industry has an estimated worth of $1.2 trillion.

During the COVID-19 pandemic, restaurants were relying more on online reviews to continue operating and attract people to visit their restaurant, with 94% of customers claiming they would avoid a business that have bad reviews.  With all this in mind, both customers and restaurant owners would benefit from the main goal of this project – the ability to assign the rating to a review, on a scale from 1 to 5, based solely on the textual review written by the customer.

For customers, it means avoiding having to select the rating after they have written the review, streamlining the process.  The restaurant owners can use the model on their website and avoids customers writing a really nice review, but incorrectly selecting a 1 or 2-star rating.  Finally, the foodie portals can use the model to streamline the reviewing experience and differentiate between great and not so great restaurants more easily.

The project was completed by analysing older, already rated, restaurant reviews in order to isolate individual words and expressions that contribute the most to a particular rating. The data was acquired through downloads of publicly available datasets and by scraping online reviews using Selenium.  Afterwards, the data was transformed using Python, Pandas, NLTK and Numpy.  Finally, using the Scikit-Learn library's machine learning techniques – from Logistic Regression to Support Vector Machine - the model was trained, verified and tested to ensure that it can correctly classify textual reviews and label them with the right numerical rating on the scale from 1 to 5.