Wine tasting notes – you couldn’t make them up… could you?

Wine tasting notes and reviews are usually an exercise in self indulgence, in more ways than one. Most are completely unrelated to how you’ll actually enjoy the wine – they’re more about making the reviewer look good. And that’s important, because if people don’t think the reviewer has some special, rarefied insight into wine, then no one will care what they say, and they’ll stop being sent free wine and being invited to wine tasting events.

Take Nick Stock’s review of Clonakilla’s top notch 2015 Shiraz Viognier:

The aromatic spectrum is vast, from fine musky florals to white pepper and almost every imaginable spice, then an incredibly exuberant explosion of fruit, boysenberry, raspberry, cherries of every shade, and plums from red to blue and purple; it is full of life.

The palate has an incredibly deep draw, total palate saturation of ripe red cherry, raspberry and red plum flavor, chocolate and a dusting of white pepper. The tannins radiate light and energy, bright from start to finish. Perfectly ripe, seamlessly balanced and actually very approachable.

Drink it now, but there’s plenty to come in time; this will be best from 2022.

The wine may or may not actually be full of life, but I certainly know what the review is full of. Every shade of cherry! An impressive palate indeed.

It makes you wonder how reviewers actually come up with their reviews. I suppose more pithy and factual reviews would quickly become self-similar. But perhaps there’s a market for a tool to help reviewers hone their prose.

Modelling reviews with Markov chains

All of this came to my mind after a friend sent me a link to Tony Fischetti’s work in generating wine reviews using Markov chains. Fair warning: that Wikipedia article may be longer than time itself. To save you (and me) the time of having to read it, Markov chains are a way of modelling the state flows of a system or process, where the probability of changing to a new state is based solely on the current state. There’s no memory that influences the next state, so the past state changes that lead to the current state do not influence the next state.

Fischetti modelled wine reviews by using Markov chains to predict the next most likely word given the current word in a sentence, and trained it on 9,000 wine reviews. To make the output sound more life-like, he encoded the current state as the last two words in the review – a word “bi-gram”. The result is more natural sounding text than if it was simply modelling moving from one word to the next. This is a similar technique to how smartphones can suggest the next word in a text before you have typed any letters.

The results are impressive – here are a couple of examples (more in Fischetti’s post):

Quite rich, but stopping short of opulent, this white sports peach and apricot, yet a little in finesse.

Dense and tightly wound, with taut dark berry, black cherry and red licorice. A touch of toast.

It makes me want to create the wine review equivalent of the Turing test – real and generated wine reviews side by side to see if people can tell the difference. It’s like a cross between a Turing test and a less crass Facemash.

Dialling it up to 11

It turns out that someone’s already taken this mechanical Robert Parker concept a step further. Mark Allen Thornton took Fischetti’s idea and expanded on it. Fischetti trained his model using 9,000 reviews from Wine Spectator, but Thornton had a trove of data from, including 63,000 reviews. This allowed him to train Markov chains on different regions, types, prices and qualities of wine.

The end result is a generator that can specifically produce reviews for red vs white whine, or cheap vs expensive, for example. From my experience, though, I couldn’t get it to generate a negative review for a cheap, low quality wine. I guess people don’t like to wax lyrical about an embarrassing purchase.

Regardless, Thornton’s review generator is fun to play with. I feel like some of its quality issues are down to using community reviews – the verbosity and vocabulary of community reviews rarely achieves the quintessential je ne sais quoi of a thoroughly worked professional masterpiece.

Even More Markov

The other thing I picked up from Mark Thornton’s blog post was a link to a truly awesome visual explanation of Markov chains by Victor Powell and Lewis Lehe. Powell and Lehe have explained how Markov chains work and what they mean, through live, configurable animations of examples.

They illustrate the workings of the model via probabilities of transitions from each state to the next. For example, if you were modelling weather with a 50% chance of rain per day, you’d expect to see a more or less alternating sequence of rainy and sunny days. But the reality is that rain yesterday makes rain today more likely (especially in Seattle). This is modelled in a Markov chain through the probability of a state transitioning back to itself – the chance of rain tomorrow is different if it’s sunny today, or already raining.

What I think is really cool is that Lehe and Powell have created working models you can play with to demonstrate all they’re discussing:


In this live model, the probability of each transition from each state can be dynamically altered. The state transitions follow the new probabilities, and the visualization updates to represent the probability balance.

They also have a machine generator to create arbitrary machines:


Wine bottle labels – avoid wines that match with pasta?

One of Mark Allen Thorton’s aims in analyzing the descriptions of wines was to identify if there is a way to predict quality of a wine based on its description. Perhaps low quality wines use certain tricks or comparisons in their descriptions to embellish your perception, or perhaps high quality wines refer to certain flavour descriptors that don’t apply to low quality wines.

He identifies wine flavour descriptors from the wine makers’ notes and finds clusters of descriptors that frequently appear together. Using the professional and customer reviews, he also isolates common words in reviews for high and low quality wine. For example, the negative professional reviews are loaded with words ragging on Sauvignon Blanc.

The best takeaway from all of his analysis is the strong correlation Mark Allen Thornton found between low quality wine and back labels which suggesting pasta as a food pairing. So next time you see a bottle suggesting you can pair it with a fine bolognese or seafood pasta, perhaps you should leave it on the shelf!

A followup post goes into trends in wine descriptors over time. There are some really interesting trends to be seen, especially as relates to oak. There’s a sudden drop off in oak descriptions for red wines, and despite the trend towards more acidity and freshness, I wasn’t quite able to find what’s replacing “oak” on the back of bottles:


White wine, however, is a different story. Here the crusade against oaked Chardonnay, and the move towards fresh, acidic whites is clear:


Later on, he examines trends in wine varieties over time, showing a clear trend away from Cabernet Sauvignon towards Pinot Noir over the last 10 years, and also a sudden rise in alternate red varietals recently as well. He credits this to Burgundy’s victory over Bordeaux, but he may mean more in style than location. I imagine the increasing production and popularity of Pinot from the Yarra Valley, Tasmania, New Zealand and Oregon State have more to do with this than a movement of sentiment from Bordeaux to Burgundy.

The white varietal graph shows Sauvignon Blanc progressively eating Chardonnay’s lunch over the last twenty years, with a sudden spike since 2012. I put this down to movement of tastes from one type of cheap, mass produced, New World white to another.

The last drop

I just finished the end of my glass of Lerida Estate’s 2010 Josephine Pinot Noir, which must be a sign to wrap up this pot. Lerida are a small producer from Lake George, NSW, and part of the Canberra wine district. There’s lots of great wine coming from the Canberra region (including the aforementioned Clonakilla), and nary a pasta pairing recommendation in sight.

It’s been a while, but I think I finally found an appropriate topic to fit this blog’s title: Code and a glass of wine.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s