The Ultimate Italian (Text-Mining) Cooking Book

For his practical assignment of the course Text-Mining from the Department of Data Science and AI at Maastricht University, Francesco Gibellini decided to follow his hearth and text-mine a large data set of Italian recipes. As data source, he used the well-known Italian website: from Giallo Zafferano (https://www.giallozafferano.it/) which contains thousands of Italian recipes from various regions.

Giallo.png

After various forms of pre-processing and normalization, the first experiment was to cluster the text of the recipes using clustering techniques such as k-NN and Non-Negative Matrix Factorization (NMF). Interestingly, the cluster results immediately represented the main structure of the Italian kitchen by grouping the recipes automatically into clearly distinguishing groups of Primi (appetizer), Secondi (main course) and Dolci (dessert), which was quit a promising results.

Clustering 1.png

A more fine grained clustering on ingredients, resulted in even more interesting results, where all recipes using Gnocchi, Risotto and Paste were clearly grouped together as related recipes.

Clustering 2.png

In a final experiment, a closer look was taken at the ingredients of the recipes in order to answer the question: “What goes well with what?, which ingredients pair better than others?”.

For each recipe, the ingredients were identified by using named entity extraction, next different textual occurrences of ingredients were normalized. Normalization was not a trivial tasks, as textual occurrences such as ‘Salmone Scozzese 150g’ (‘Scottish salmon 150g’) had to be normalized to ‘Salmone’.

Once this task was completed, a network representation of around 900 ingredients, for which many had 100+ pairings, could be created. This resulted in some interesting insights as is shown below for the ingredient Gember.

Ingredients 1.png

Where some more detail is provided below.

Ingredients 2.png

This insight shows popular combinations, but additional clustering techniques can also help us to find combinations that may not be that obvious, but which could in fact be very unique new combinations resulting in surprising new tastes! See the one blow for surprising Broccolli combinations:

Ingredients 3.png

Maybe, we can even use this to have a computer program come up with new recipes or to assist chefs around the world to create new creative Italian recipes!

Well done Francesco, great project!

 

Leave a Reply

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

WordPress.com Logo

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

Google photo

You are commenting using your Google 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