The Ultimate Cookbook

  Bella Sorkin

Advisor:  Susan Davidson



My goal was to build a system that makes cooking easier for cooks of all different experience levels. This system would include features like a recipe database that you can search by keywords, ingredients you have, preparation time, and recipe rating. You could further sort results by title, rating, preparation time, and rating/number of times rated. Recipes would let you easily change the number of servings you want to make.  They would also display nutrition information for the dish and would have tips on how to  slightly modify the recipe to make it healthier, using substitutions like apple sauce for oil in desserts. Also, based on the ingredients in the dish you select, it can advise another dish that will go well with it. For instance, if you are looking at a recipe for basil chicken, it might suggest a side of garlic potatoes or pesto pasta. Finally, to remove some of the ambiguity of cooking, recipe keywords like ingredients or actions would be linked to a Wikipedia article explaining what they are. 
  Summary of Implementation


A recipe database would be useless if it contained no recipes.  Therefore, my first step was to build a WebCrawler in python which visited thousands of non-copyrighted recipe pages, parsed them, found their titles, ratings, ingredients, etc and stored the results in a database. 

Once my database was built, I created my actual website.  Most of its pages execute a mySQL query based on user input and display the results.  This includes searching for recipes, browsing, sorting recipe results, adding new recipes, and rating recipes.

I then started developing my recommendation system.   The system makes decisions on what recipes compliment each other base solely on their ingredients and course.  To determine compatibility of ingredients, I went through all the recipes in my database and counted the number of times each ingredient pair occurred in a recipe.  Then, for each ingredient, I scored how well it paired with other ingredients. The top 10 received the highest scores. The next 10 received slightly lower scores. The rest received scores of 0. This allowed me to go through each recipe and determine which ingredients best complimented each recipe, and therefore which recipes best compliment which other recipes.  Since recommendations are determined at run time based off above data, newly added recipes are also used in the recommendation system. Keeping a table that stores which ingredients go with which recipe drastically lowers the number of calculations preformed by server.




  • Python

  • PHP 5

  • Apache 2.2

  • HTML

  • mySQL
    Project Website