Hacker News new | past | comments | ask | show | jobs | submit login
Cocktail Similarity (observablehq.com)
217 points by dlg on Feb 24, 2019 | hide | past | favorite | 56 comments



> A Manhattan is a Martini but you replace dry vermouth with bitters, replace gin with sweet vermouth, and add whiskey.

No, it's not.

What's missing is a sense of "role". Spirits should map to spirits, liqueurs to liqueurs etc.

There's usually only a few "slots" with cocktails: one (or sometimes a few) base spirits, something aromatic such as bitters or a vermouth, a sweet thing and/or a citrus.

(I once made a spreadsheet that I dubbed "the period table of cocktails - turns out the gaps usually lead you to an obscure variation you'd never heard of)


It's also missing a sense of quantity. Imagine starting a Manhattan with an ounce of bitters and two ounces of sweet vermouth.

Or the Negroni:

> A Negroni is a Manhattan but you replace bitters with campari and replace whiskey with gin.

So a Negroni should have a couple of dashes of Campari.


> Or the Negroni

Personally I think the classic Negroni is interesting because if you play with the ingredients (and/or ratios) in the right way you get a lot of interesting variations:

  - An Americano is a Negroni without the gin
  - A Boulevardier is a Negroni with the gin swapped for bourbon
  - A Black Negroni is a Negroni with the Campari swapped for an amaro (e.g. Averna)
  - A Negronino is a Negroni with part of the Campari swapped for Amaro Nonino
  - A Quill is a Negroni with the addition of 1/2 oz absinthe
(There's boundless others, these are just some of my favorites.)


I've had relatives drinking negroni for decades, but I had never heard of those variations - thanks for the tip.

As I know them, these are the classic variations of negroni:

- sbagliato: prosecco instead of gin

- Americano: soda instead of gin

- bicicletta: white wine instead of Martini; soda instead of gin

Of course, there's also the spritz - prosecco, Aperol, and soda. The Aperol can be swapped with Campari or amaro to your taste.

One more random tidbit regarding Italian liquors - the traditional after dinner drink in Italy is an amaro. It's both quite strong (~40% alc) and quite sweet - almost syrupy. The name comes from the bitter herbs that give it its flavor/aroma. ("Amaro" literally means "bitter.") Amaro is served in a shot glass, but sipped like a bourbon.

Each village/region makes its own amaro, with its own blend of herbs. For instance, Braulio is a minty amaro that comes from Bormio, a mountain town in the Alps. Over the past few years, it's become much easier to find amari in the US. We even have some varietals that my Italian friends don't know. (In Italy, Nonino is a grapa, not an amaro.)

You have probably heard of amaretto - the almond liqueur. Its name means "little amaro." The most well-known brand is Disaronno. Saronno is a town near the Milan airport. Disaronno is "di Saronno," the amaro from the town of Saronno.


I prefer ditching the Campari entirely and using Aperol.


Gin, Aperol, and Lillet Blanc combined like in a Negroni make a beautiful drink.


That statement seems like complete nonsense to me before you even think about roles - a Martini only has two ingredients - gin and vermouth (and an olive/pickled onion/oyster/mothball/whatever as a garnish). It makes no sense to say "replace all the ingredients, and you get this other thing" - no shit.


Care to share that spreadsheet? :)


I, too, would love to see this table :)


He mentions that at the end of the article:

> It’d be nice for the difference algorithm to know about ingredient types, so that it suggests, say, replacing vermouth with sugar (because they’re both there for making things way too sickly sweet), rather than replacing vermouth with vodka.


Early iterations of the Martini were actually very similar to today's Manhattan. They were equal parts gin/vermouth, with bitters added. The vermouth was gradually cut back, and the bitters removed. Versus a Manhattan which is 2-1 whiskey and sweet vermouth, plus bitters.

But yeah, his reasoning is terrible and really doesn't seem to take into account cocktail components, their role, taste, etc...


There's also no awareness of building technique, so shaken and stirred drinks are collapsed.


Do you still have that spreadsheet? I would love to see it


Death & Co's second book, "Cocktail Codex" [0], has a somewhat similar approach. The thrust of the book is that there are six root cocktails, and everything else is just a variation on them.

That book, and Death & Co's first book, "Modern Classic Cocktails" [1], are good reads for the person who is a fan of quality cocktails and wants to make something at home that's really good, and frequently better than what you get when you're dining out.

You will likely need to invest in some booze and stuff to be able to fully enjoy them, but just pick a drink a week, buy what you need, and pretty soon you'll have a collection that will allow you to make most of the things in the books.

[0] https://www.amazon.com/Cocktail-Codex-Fundamentals-Formulas-...

[1] https://www.amazon.com/Death-Co-Modern-Classic-Cocktails/dp/...


I love Death & Co's first book. I highly recommend it to anyone who likes having a cocktail after work or making them for parties this book will make you plenty of friends. Or basically anyone who likes digging into everything in a connoisseur/nerdy type of way.

Once you learn the foundational stuff of making cocktails (with a small investment in some gear and plenty on a variety of booze) it's surprisingly easy to make really good drinks. What I found interesting is how you intuitively starting learning some fundamental bases which you learn, where it becomes easy to make up your own drinks when you don't have access to the book's ingredient lists or you're at the liquor store without one in mind.

It's not just an endless list of popular cocktails recipes but structures it around bases which you build on. And it made me a big fan of gin (they almost entirely skip vodka, besides a few recipes, which I found interesting).

Learning how to make cocktails is underrated skillset IMO. At least compared to people knowing scotch or understanding good wines.


The first book is amazing for gin recipes. It also gave me a much greater appreciation for how different types of gin work in different cocktails. Their follow-up book, Cocktail Codex, includes a lot more recipes for drinks with vodka.


David Embury's 'The Fine Art Of Mixing Drinks' manages to derive everything from two roots - sour and aromatic! See chapter 6, 'Roll your own':

https://www.collectif1806.com/collectif-library/Collectif180...

I think it's an oversimplification, but it's still useful advice. FWIW, this is by far the best book on cocktails i have ever read. Although i am going to buy a copy of 'Cocktail Codex', i think.


So I got:

“A Manhattan is a Martini but you replace dry vermouth with bitters, replace gin with sweet vermouth, and add whiskey.”

This is the wrong way to think about it. The rye (aka “whiskey”) in a Manhattan is conceptually and functionally equivalent to the gin in the martini.

The graph doesn’t seem to understand the concept of base liquor, which makes it a really cool exercise, but not functional.

Still, I love the idea.


"A Manhattan is a Screwdriver but you replace orange juice with bitters, replace vodka with sweet vermouth, and add whiskey."

Can't wait to explain this one to my bartender tonight!


Radio Yerevan was asked: "Is it correct that Grigori Grigorievich Grigoriev won a luxury car at the All-Union Championship in Moscow?"

Radio Yerevan answered: "In principle, yes. But first of all it was not Grigori Grigorievich Grigoriev, but Vassili Vassilievich Vassiliev; second, it was not at the All-Union Championship in Moscow, but at a Collective Farm Sports Festival in Smolensk; third, it was not a car, but a bicycle; and fourth he didn't win it, but rather it was stolen from him."


Yeah, I think Manhattan/Martini is a closer comparison than Manhattan/Old Fashioned or Manhattan/Screwdriver...


You're right.

The Manhattan & Martini both derive lineage from the Old Fashioned. The Old Fashioned was so named in the late 19th century as it was trying to recreate the original cocktail, as in "Don't give me one of those drinks with all the stuff in it, give me an old fashioned cocktail".

The Martini derives from the Martinez which is a much sweeter drink. Heavy on sweet vermouth and using a heavier & sweeter style of gin. It should be clear at that point that the Martinez and Manhattan aren't super far apart.


I use Levenshtein matching for a small business. We take in orders, and some of them end up being ordered from a partner that ships them out. They often change the shipping address in small ways, and don't provide a nice api for us to match orders to tracking numbers. Instead, we just get an email from Fedex or UPS.

So, we trawl IMAP to extract the addresses and find close matches for open orders with Levenshtein. Not perfect, especially when one customer places more than one order, but saves us a lot of time.


For addresses, I believe USPS provides a free address standardization API as long as you are using it for shipping purposes.


This is a bit different. It's matching what you have versus what a 3rd party has. You have no control over the third party.

We do use SmartyStreets to normalize the address before submitting, but the 3rd party uses something else. Also, address correction is a weird space. UPS, for example, delivers to many places that the USPS does not. Rural communities are especially tricky. UPS, Fedex, and USPS disagree on things like "Rural Route 24" vs "State Route 24" versus "Arizona Route 24".


Fun fact: my address gets corrected to one on the other side of town with a South suffix added. The Post Office, UPS and FedEx all have manual procedures in place to handle this case. No-one has yet to fix their software more than to flag a manual review at the local office


Have you thought about requesting to change the number of your house to one that doesn't exist on the other side of town? That is usually much easier and cheaper than changing the street name.


Why can't you normalize the third-party address and then normalize yours?

That should give you the necessary match.


Because humans make typos that address correction can't always deal with. Address correction is a very inexact space. It even does the wrong thing fairly often, like dropping an apartment or suite that's needed, because it thinks it isn't needed.

Also, address correction doesn't know anything about people's names, business names, etc. Sometimes you need those to disambiguate.


This all sounds like it would make an interesting blogpost/article if you're into writing one.


You're probably right. It's pretty surprising how many people don't know their own address. And I don't mean typos. Completely wrong zip codes, missing suite numbers in a huge strip mall, wrong city, no business name when that matters, etc.

The best change I made was having them first enter zip code, then pick city/state from a list that goes with that zip code. Both Google and the USPS have apis for that mapping.

Also, fun fact: UPS charges me $15 if they have to make an address correction at delivery time. So, for example, if a customer fails to put a Suite number in, and the UPS software doesn't tell me it's missing, UPS charges me $15. I've complained that I shouldn't have to pay when their software fails. They don't care. Argh!


Agreed with the other guy, this would be a good blog post similar to that "falsehoods programmers don't know about phone numbers" [1] post that came up recently - but more of a general interest sort of life-experience building the system.

[1] https://news.ycombinator.com/item?id=11321236


No way to tack a reference number in there somehow? Like, in the “name” field if nowhere else?


I could do that, but avoided it because it would have to be at least 6 characters for various reasons. And, as you mention, in the address itself somewhere.

What I have works well enough. It shows the matches in a UI, so a human has final say.

The UI looks like this: https://imgur.com/a/C0GziSe (redacted to hide store/customer info). So it's easy to eyeball the match and make sure it's okay. One button to assign the tracking number. The "match %" field is derived from the Levenshtein distance.


Since order and ingredient category does matter for some cocktails, you could really geek out on this a lot farther, and take it way off the deep end... categorize by liquor base, by mixers, by sweet or savory flavorings, by solidity, by acidity, by temperature, by water/ice content, by garnishes, etc., etc., and then use edit distance on trees rather that on sets.


"Since order and ingredient category does matter for some cocktails..."

I'm skeptical that ingredient order makes any difference in a cocktail (unless you're doing things like setting them on fire, etc.) ... could you provide an example ?


Setting drinks on fire is a decent example that is alone enough to justify what I said. Some people care whether you pour over ice or put ice in the drink. Whether they can tell the difference is anyone’s guess. “Lace” is cocktail terminology for the last ingredient. Muddling is another example; you don’t muddle after you mix. Sugary syrups and other infusions definitely change a drink’s character depending on mixing order, many drinks call for being less mixed so you get a different taste at the beginning vs the finish at the end.

You can also think about recipes and cocktail names; order does matter to the corpus of recipes and lore and creative naming of drinks as much as it may (or may not) matter to taste. I didn’t invent cocktail history, so it’s not exactly my place to defend this, but I believe it’s fair to say that there are lots of recipes that call for ingredients in a specific order, in addition to all the examples where order is clearly needed/used.


One of my favorite drinks is the "Champagne Julep". You muddle mint and superfine sugar, add crushed ice, add cognac and yellow chartreuse, top with: seasonal fruits, a sprinkle of superfine sugar, and a float of Rhum Agricole. Since you don't mix the drink before serving, the woody/grassy flavors of the rhum mixed with the sweet fruits hit your tongue first.


They matter for any sort of layered cocktails https://mixthatdrink.com/how-to-pour-a-layered-cocktail/


This makes more sense. "Replace bitters with vodka" and "replace sweet vermouth with dry vermouth" have the same edit distance currently.


> Cocktail edit distance is a bit different - primarily because order doesn’t matter. It’s just set difference, or set distance.

Well, no, quantity matters for cocktails, which puts it in the opposite direction of set distance from a comparison where only order matters in terms of complexity.


I think the author was approaching it from a sense of “what do I need to make a certain drink” rather than “how do these drinks actually differ?” The “edit” in this case is going out and buying a bottle of something. In that sense, it makes sense to say that if you want a whiskey on the rocks, and you have the ingredients for a vodka martini, the “edit distance” represents “you don’t need that vodka and vermouth- you do need to go buy whiskey”.

Which seems obvious, but the idea is to apply it to less-obvious drinks: if I have a fairly well-stocked bar, should I buy Angostura bitters or créme de violette to maximize the range of things I can make?

(I’ll admit, the author kinda buried the lede, but I think that was their idea.)


This is true, but the fuzzyness of cocktail ratios makes ingredient quantity _very_ hard to use for something like this. What is the ratio of gin to vermouth in a martini? Depends on who is making it.


You picked one of the fuzziest examples. Lots of cocktail ratios are much more rigid than martinis.

Construction methods also matter.


The problem with this analysis is lack of depth. Changing any step of the recipe (the ingredients, measurements, temperatures, cooking vessels, order of operations, even presentation) can result in vastly different products.

Firstly, you need similar measurements. Second, replacing one ingredient for another affects the chemical composition that directly influences the perceived flavor (sweet, bitter, sour, salt, fat). Third, the physical acts of stirring vs shaking affect texture, temperature, and dilution all at once.

All this would need to be added to the model to begin to approximate actually similar cocktails, and not just a comparison like "Hey, you can take the sugar and eggs out of cake and make bread!"

(The fact that the author conflates sweet and dry vermouth is also not great; that's like confusing a Riesling with Extra Brut Champagne)


I spotted an interesting data standardization anomaly:

"A The Last Word is a Gin Gimlet but you replace simple syrup with green chartreuse, replace lime juice with maraschino, and add lime."

It appears that "lime juice" and "lime" exist as separate ingredients in the ingredient lists, even though they're exactly the same thing. It looks like this is causing a false separation of the Last Word cluster (drinks containing "lime") from the Gimlet cluster (drinks containing "lime juice") in the 2D plots.


Gimlets are more often made with lime cordial, marketed as Rose’s lime juice. This is different from fresh lime juice in that it has sugar and other stuff added.

https://www.jeffreymorgenthaler.com/lime-cordial/


Interesting. I have two concerns with your "lime means Rose's lime juice" hypothesis.

(1) When I google "gin gimlet recipe", all search results I looked at (the top 4) call for "fresh lime juice" as the ingredient, leading me to believe that fresh lime juice is more common as a gimlet ingredient. The article you linked even states that fresh lime is more common: "A lot of bartenders out there adopt the fresh-lime-juice-and-sugar method of making lime cordial."

(2) Why would a recipe use the word "lime" to refer to Rose's lime juice? It seems like no one would ever be able to make the cocktail correctly if they had to infer that "lime" refers to Rose's lime juice rather than fresh lime juice.


Perhaps lime juice is juice and lime is a slice of lime?


It’s not, in this case.

Last word: 3/4oz ea of gin, maraschino, green chartreuse, lime juice. Shake over ice. Delicious in served in a coupe glass garnished w a maraschino cherry.


It was explained to me that cocktails are a combination of flavors. That is, for example, sweet + dry + sour + ... you get the point. Making a good cocktail is about balancing those various attributes, based on the characteristics of the base ingredients.


> cocktails are a combination of flavors

Isn't this all recipes?


I think this project would've benefitted from consulting a good bartender -- or at least a barfly - to identify the key dimensions and the scaling vectors.

As other commenters pointed out, there's a whole science behind how the ingredients associate.


What cosmology of mixology doesn't have a G&T?


That's a mixed drink, not a cocktail!


Should've called it Cocktail Hamming Distance




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: