Question?
Is it possible to build a model that can predict the color, variety and estimate the quality of a wine just from the words in a review?
Answer
“Of course, one can search for specific word combinations in a review and compare them to a known collection of words (corpus) to make predictions. My method is to match the words in the review with a set of important words (found using a technique called Mutual Information) and then represent each word as a column in a binary matrix. This means each review gets a vector or ‘fingerprint’ of zeros and ones, depending on whether certain words appear in the text. For example, ‘tannins’ might represent a red wine characteristic, while ‘peach’ could indicate a white wine. With enough labeled reviews, this matrix can reveal patterns and similarities between different reviews.”
White, Red & Rose
The color, flavor and quality of a wine is characterized by the use of certain words in a review. By extracting the words that describe a typical Red or White wine it is possible to predict the color. The table below contains typical words used in reviews for white and red wines.
Red Wine Descriptors | White Wine Descriptors |
---|---|
|
|
“An example of a wine review for a red wine.”
Deep, dense and pure from the opening bell, this Toro is a winner. Aromas of dark ripe black fruits are cool and moderately oaked. This feels massive on the palate but sensationally balanced. Flavors of blackberry, coffee, mocha and toasty oak finish spicy, smooth and heady. Drink this exemplary Toro through 2023.
Click the "Predict" button to get the result from my API using the example text above:
Note: My web host doesn’t support Python apps, so it may take a minute for the free Render site to process the text.
API
Matched Words
Prediction