WhatToMake: Recipe Ontology Project / OE Fall 2018 - Additional Information

Research

 


Publications


Presentations

WhatToMake Related Work & References


[1] Allrecipes.com, “Allrecipes | Food, friends, and recipe inspiration,” 2010. [Online]. Available: https://www.allrecipes.com/. [Accessed Sep. 29, 2018].
[2] B. Yamamoto-Taylor, “Guide to Gluten-Free Foods & Substitutes,”coosmarts.com, May 2018. [Online]. Available: https://www.cooksmarts.com/articles/gluten-free-diet-substitutions-list/. [Accessed October 5, 2018]
[3] BBC, “Food Ontology,” ONTOLOGIES, March 2014. [Online]. Available: https://www.bbc.co.uk/ontologies/fo. [Accessed Sep. 29, 2018].
[4] BioPortal, “FoodOn,” November 2018. [Online]. Available: https://bioportal.bioontology.org/ontologies/FOODON. [Accessed Nov. 14, 2018].
[5] C. Giuliano, and A. Gliozzo, “Instance-Based Ontology Population Exploiting Named-Entity Substitution,” August 2008. [Online]. Available: http://www.academia.edu/18671470/Instance-based_ontology_population_exp…. [Accessed Dec. 8, 2018].
[6] C. Su, C. Chih2, and Y. Chen, “Ontology-based Personalized Diet Plan Web Service Using HL7 Health Screening Data,”2012. [Online]. Available: https://pdfs.semanticscholar.org/2271/6d0a28bd707d839cef57225c373749069…. [Accessed Dec. 8, 2018].
[7] Curves International, Inc, “ALLERGY SUBSTITUTIONS – TREE NUT,” 2015. [Online]. Available: https://www.mycurves.com/uploads/cc_resources_pdfs/2015foodallergy_tree…. [Accessed October 5, 2018]
[8] D. Çelik, “FoodWiki: Ontology-Driven Mobile Safe Food Consumption System,” March 2015. [Online]. Available: https://www.hindawi.com/journals/tswj/2015/475410/. [Accessed Nov. 30, 2018].
[9] Dublin Core Metadata Initiative, “DCMI Metadata Terms,” June 2012. [Online]. Available: http://www.dublincore.org/documents/dcmi-terms/. [Accessed Nov. 24, 2018].
[10] E. Griffiths, “FoodON: A Global Farm-to-Fork Food Ontology.” [Online]. Available: http://ceur-ws.org/Vol-1747/IP21_ICBO2016.pdf. [Accessed Dec. 8, 2018].
[11] F. Batista et al., “Ontology construction: cooking domain,” Feb. 2006. [Online]. Available: https://www.researchgate.net/publication/200552832_Ontology_constructio…. [Accessed Dec. 8, 2018].
[12] F. Vitali et al., “ONS: an ontology for a standardized description of interventions and observational studies in nutrition,” April 2018. [Online]. Available: https://genesandnutrition.biomedcentral.com/articles/10.1186/s12263-018…. [Accessed Nov. 30, 2018].
[13] Food Allergy Research and Education, “Your Food Allergy Field Guide,” foodallergy.org, 2017. [Online]. Available: https://www.foodallergy.org/sites/default/files/migrated-files/file/fie…. [Accessed Oct. 3, 2018].
[14] G. Smith, “Outstanding Recipes Free of Top Allergens and Gluten,” Allergic Living.com, 2017. [Online]. Available: https://www.allergicliving.com/recipes/. [Accessed Sep. 29, 2018].
[15] He Group, “Human Disease Ontology,” Ontobee, March 2018. [Online]. Available: http://www.ontobee.org/ontology/DOID?iri=http://purl.obolibrary.org/obo…. [Accessed Sep. 29, 2018].
[16] J. Cantais et al., “An Example of Food Ontology for Diabetes Control,” In Proceedings of Workshop on Ontology, January 2005. [Abstract]. Available: CiteSeerX, http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.137.8373. [Accessed Oct. 1, 2018]
[17] J. Clunis, “Designing an Ontology for Managing the Diets of Hypertensive Individuals,” Jan. 2016. [Online]. Available: https://etd.ohiolink.edu/!etd.send_file?accession=kent1453196523&dispos…. [Accessed Nov. 30, 2018].
[18] J. Raad and C.Cruz, “A Survey on Ontology Evaluation Methods,” Nov. 2015. [Online]. Available: https://hal.archives-ouvertes.fr/hal-01274199/document. [Accessed Dec. 1, 2018].
[19] Juan Luis Díaz de León S. et al., “Universal Networking Language: Advances in Theory and Applications,” 2005. [Online]. Available: https://www.unl.gelbukh.com/UNL.pdf. [Accessed Nov. 30, 2018].
[20] Kodi, “TheMealDB,” 2016. [Online]. Available: https://www.themealdb.com/api.php. [Accessed Sep. 29, 2018].
[21] L. Alden, “The Cook's Thesaurus,” 1996-2006. [Online]. Available: http://www.foodsubs.com/. [Accessed Sep. 29, 2018].
[22] M. Kolchin, and D. Zamula, “Food Product Ontology: Initial Implementation of a Vocabulary for Describing Food Products.” [Online]. Available: https://www.fruct.org/publications/abstract14/files/Kol_21.pdf. [Accessed Dec. 8, 2018].
[23] M. Sam, A. A. Krisnadhi, C. Wang, J. Gallagher, and P. Hitzler, “An Ontology Design Pattern for Cooking Recipes – Classroom Created,” Oct. 2014. [Online]. Available: http://ceur-ws.org/Vol-1302/paper5.pdf. [Accessed Nov. 30, 2018].
[24] M. TaboadaEmail, H. Rodriguez, R. C. Gudivada, and D. Martinez, “A new synonym-substitution method to enrich the human phenotype ontology,” Oct. 2017. [Online]. Available: https://bmcbioinformatics.biomedcentral.com/articles/10.1186/s12859-017…. [Accessed Dec. 8, 2018].
[25] M. Vene, “Example: Recipe Database - !gunzip command not working,”Github.com, Apr. 2017. [Online]. Available: http://openrecipes.s3.amazonaws.com/openrecipes.txt. [Accessed Sep. 29, 2018].
[26] Montignac Method, “Search for a specific Glycemic Index,” 2014. [Online]. Available: http://www.montignac.com/en/search-for-a-specific-glycemic-index/. [Accessed Nov. 1, 2018].
[27] nanopub.org, “Nanopub.org: Learn how to create, find, use and cite nanopublications,” 2018. [Online]. Available: http://nanopub.org/wordpress/. [Accessed Nov. 24, 2018].
[28] P. Tumnark, et al., “Ontology-Based Personalized Dietary Recommendation for Weightlifting,” 2013. [Online]. Available: https://pdfs.semanticscholar.org/ae39/1a6f118fc81d891b5e5bf8d4d03ce0037…. [Accessed Dec. 8, 2018].
[29] QUDT.org, “QUDT,” 2014. [Online]. Available: http://www.qudt.org/. [Accessed Nov. 30, 2018].
[30] R. Sethi, and B. Shekar, “Mining Substitution Rules: A Knowledge-based,” 2018. [Online]. Available: http://www.scitepress.org/Papers/2018/65774/65774.pdf. [Accessed Dec. 8, 2018].
[31] S. Lynn et al., “Disease Ontology: A backbone for disease semantic integration,” Nov. 2011. [Online]. Available: https://www.researchgate.net/publication/51796080_Disease_Ontology_A_ba…. [Accessed Dec. 8, 2018].
[32] T. Bailoni et al., “Healthy Lifestyle Support: The PerKApp Ontology.” [Online]. Available: https://www.w3.org/community/owled/files/2016/11/OWLED-ORE-2016_paper_3…. [Accessed Dec. 8, 2018].
[33] T. Helmy, A. Al-Nazer, S. Al-Bukhitan, and A. Iqbal, “Health, Food and User's Profile Ontologies for Personalized Information Retrieval,” 2015. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S187705091500914X. [Accessed Dec. 8, 2018].
[34] W. A. Żukiewicz-Sobczak, P. Wróblewska, P. Adamczuk, and P. Kopczyński, “Causes, symptoms and prevention of food allergy,” Current neurology and neuroscience reports., Apr-2013. [Online]. Available: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3834685/. [Accessed: 03-Oct-2018].
[35] W. Hogan, “Towards an ontological theory of substance intolerance and hypersensitivity,” Feb. 2011. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S1532046410000183. [Accessed Dec. 8, 2018].
[36] W3C, “GoodRelations,” March 2015. [Online]. Available: https://www.w3.org/wiki/GoodRelations. [Accessed Nov. 30, 2018].
[37] W3C, “SKOS Simple Knowledge Organization System - Home Page,” 2018. [Online]. Available: https://www.w3.org/2004/02/skos/. [Accessed Nov. 24, 2018].


WhatToMake MIT License

Copyright 2018 WhatToMake

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Design

Use Case


Conceptual Model and Ontology Documentation

WhatToMake Conceptual Model

In creating this ontology, we set out to relate recipes and their ingredients in a way that allows users to query the system and get results that would accommodate different requirements. Some of these requirements have to do with the meal or course type or the preparation time of a recipe, while others have to do with allergies and substitution requests. We thus needed to model our ontology in a way that would allow us to efficiently answer these types of questions. Our ontology is made up of several major classes: food, ingredient, recipe, characteristic, user, course, and meal. These classes can be seen in the overview diagram below.

This diagram illustrates how the classes (denoted by green rectangles) are related to each other through object properties (denoted by the red rectangles). The data properties for each class are represented by the yellow rectangles. In some cases, there is a limited set of individuals used to represent different meals or courses. These individuals are shown as purple circles.

This piece of the concept diagram illustrates the relationship that the Recipe class has with other classes and properties. The recipe class has individuals that represent specific recipes. Each recipe individual has three data properties: hasCookTime, hasCookingTemprature, and serves. Each recipe individual also has however many hasIngredient relations with ingredient individuals. Each recipe has at least one Meal and Course that it is recommended for. Each ingredient individual has a boolean data property hasGluten to indicate whether this ingredient contains gluten and a data property hasGlycemicIndex that stores the glycemic index value for this ingredient.

This piece of the diagram shows the makeup of the Characteristic class. Each ingredient can have the relations hasFlavor and/or hasTexture, which represent the flavor and texture of this ingredient. This can help us when trying to make substitutions for ingredients. The flavors and textures themselves are represented as individuals.

This piece of the diagram shows the relationship between Users and Ingredients/Recipes. A user (which is represented as an individual) can have a “dislikes,” “forbids,” or “isAllergicTo” relationship with an ingredient. This makes it so the user doesn’t have to input this information into the system every time. The user can also save recipes, which is represented by the “hasSaved” relation so that any recipes this user particularly likes can be easily displayed.

In addition to the ingredient class (which is used to indicate which individuals are ingredients), there is a separate hierarchy to classify these ingredients as foods. The top level element is “Food” and serves as the superclass for all food classifications. The classes represented in blue are existing classes that were imported from the EBI Food Ontology and the classes represented in green are additions made to improve the classification. This diagram does not represent all of the imported classes, but rather shows a representative set of those classes that are most relevant to the competency questions. To see any previous versions, go to the Assignments page.

WhatToMake Ontology

Below is the most updated version of the ontology for the WhatToMake project available for download as an RDF file. 


Terms List


Demonstration and Queries

WhatToMake Demonstration and Queries

The functionality of the WhatToMake system can be demonstrated through the six competency questions that were devised in order to develop the ontology. The following static demonstration goes through each of these questions, explains how the answers are derived, and illustrates how a user would input the information into the WhatToMake application to get these results.
1) What can I cook with beef, potatoes and carrots? Answer: Here is a list of recipes that use beef, potatoes, and carrots. This answer uses the relationship between the ingredients and recipes in our ontology to identify a recipe that contains all the desired ingredients. Currently, the answer is required to include all ingredients requested. However, an opportunity for expansion would be to relax the constraints to only look for recipes that satisfy some of the requested ingredients if less than a certain number of recipes can be found.

In the screenshot above you can see that a user can input the desired ingredients as well as other parameters such as the meal, course, and preparation time. The results are displayed alongside the inputs as links to individual pages for these recipes that list the ingredients. The query used to generate these results can be seen below. PREFIX rdf: PREFIX owl: PREFIX rdfs: PREFIX xsd: PREFIX wtm: PREFIX wtmi: SELECT distinct ?recipes WHERE { ?recipes wtm:hasIngredient wtmi:Beef . ?recipes wtm:hasIngredient wtmi:Carrot . ?recipes wtm:hasIngredient wtmi:Potato . } Results:

recipes:
beef nilaga
beef stew
saucy shepherd pie

2) What can I cook with kamut, salt and baking powder? Answer: Here is a list of recipes that use kamut, salt and baking powder, but only 1 was found. Here are four additional recipes which normally use other flour ingredients, but can be made with kamut flour, salt and baking powder. This answer requires the use of the substitution information contained in the ontology in order to identify a recipe which normally uses a different ingredient, but which can use the ingredients that the user has on hand. The system will first look for exact matches to the ingredient constraints, but if less than a certain amount of recipes are found, the system will relax the constraints and present additional recipes with ingredients that can be substituted with the requested ingredients. In this case, different types of flour can be substituted by kamut flour in some recipes to satisfy the users’ requests.

The user will input their requirements the same way, but the system will return a greater number of recipes and indicate that some of them can use alternatives. The next question will give greater detail about these types of substitutions and how they are displayed for the user. The query used to answer this question is shown below. PREFIX rdf: PREFIX owl: PREFIX rdfs: PREFIX xsd: PREFIX wtm: PREFIX wtmi: SELECT DISTINCT ?recipe WHERE { ?recipe wtm:hasIngredient ?flourIngredient . ?recipe wtm:hasIngredient wtmi:Salt . ?recipe wtm:hasIngredient wtmi:BakingPowder . ?kamutSub wtm:substitutesFor wtmi:KamutFlour . FILTER (!(?flourIngredient = wtmi:KamutFlour || ?flourIngredient = ?kamutSub)) } Results:

recipes:
kamut muffin
brownies
almond biscotti
whole grain banana pancake
gluten free coconut cake

3) I don’t like almonds. What substitute can I use for almonds in this recipe? Answer: Walnuts and pecans are a good substitute for almonds. This answer uses the substitution information in the ontology to find a suitable replacement for a specific ingredient when requested by the user through looking for foods in a similar category or in a substitution category. In this example (because no allergen specification has been made), the ontology will propose a substitution by looking within the “tree nut” category and suggest walnuts and pecans (two different kinds of tree nut) for almonds for this recipe. In this case, the ontology will select the tree nut that has the most similar properties to almonds (properties include things like texture and flavor).

When a user is returned a recipe, they can click on that recipe and be brought to the individual page for that recipe. There, the user is presented with the list of ingredients used in that recipe. The name of the recipe itself links to the original recipe resource where that recipe was found which is how the user will retrieve more detailed recipe information that is not encoded in this system. If a user wants a substitution for any of the ingredients, they can select which of these ingredients they want substitutions for and the system will return those substitutions in the way explained above. The system will also display some of the information pertaining to why it suggested this substituion, which in this case had to do with the texture of almonds. The query used to generate these results is below. This question also introduces the idea of the "user profile" which contains the information about the user and certain attributes they have. For example, this user has specified that they do not like almonds. PREFIX rdf: PREFIX owl: PREFIX rdfs: PREFIX xsd: PREFIX wtm: PREFIX wtmi: SELECT DISTINCT ?ingredient ?texture WHERE { wtmi:Almond wtm:hasTexture ?texture . ?ingredient wtm:hasTexture ?texture . FILTER EXISTS { ?ingredient a ?class . ?class rdfs:label "tree nut"@en . } FILTER (?ingredient != wtmi:Almond) } Results:

ingredient: texture:
walnut crunchy
pecan crunchy

4) What can I cook with chicken that will take less than 45 minutes to finish? Answer: You can make baked chicken tenders with a total cook time of 45 minutes, with 4 other recipes satisfied the time requirement. This answer requires the system to query the recipes for their total cook time and filter out recipes that do not meet the time constraint. Currently, there are 4 categories that can be selected: less than 30 minutes, less than 45 minutes, less than 1 hour, and less than 1 hour and 30 minutes. For future development, the system could provide the ability to provide a more custom range and parse that range into a query, but for now these set ranges are used for simplicity.

Here, the user selected "less than 45 minutes" for the preparation time and can see the time each recipe takes when it is displayed in the results. The query used to generate these results can be seen below. PREFIX rdf: PREFIX owl: PREFIX rdfs: PREFIX xsd: PREFIX wtm: PREFIX wtmi: SELECT distinct ?recipes ?time WHERE { ?recipes wtm:hasCookTime ?time FILTER(?time <= 45) ?recipes wtm:hasIngredient wtmi:Chicken } Results:

recipes: time:
baked chicken tender 45
smothered chicken breast 35
chicken salad 15
braised balsamic chicken 35
thai chicken 15

5) What can I cook with chicken that is a dinner entree for a guest who has type II diabetes? Answer: You can make braised balsamic chicken and grilled chicken kabob, which are recommended for dinner and as an entree but are not high glycemic recipes. This answer requires the system to query recipes that satisfy multiple constraints: recipes that include chicken, recipes that are recommended for dinner, recipes that are recommended as entrees, and recipes that are not considered "high-glycemic recipes." A high-glycemic recipe is one that contains an ingredient that has a glycemic index of greater than 50.

In the screenshot above, you can see that the user has inputted all of the requirements and checked the box to filter out high-glycemic recipes. The query used to generate these results can be seen below. PREFIX owl: PREFIX rdfs: PREFIX xsd: PREFIX wtm: PREFIX wtmi: SELECT distinct ?recipe WHERE { ?recipes wtm:hasIngredient wtmi:Chicken . ?recipe wtm:isRecommendedForCourse wtm:Entree . ?recipe wtm:isRecommendedForMeal wtm:Dinner . FILTER NOT EXISTS{ ?recipe wtm:hasIngredient ?ingredient . ?ingredient wtm:hasGlycemicIndex ?GI . FILTER (?GI >= 50) } } Results:

recipes:
braised balsamic chicken
grilled chicken kabob

6) I am allergic to tree nuts. What can I make with bananas that does not contain tree nuts? Answer: You can make whole grain banana pancakes and banana bread with pumpkin seeds instead of walnuts. This answer requires the system to use the ontology to identify an entire category of foods that are not appropriate replacements in a recipe and then identify a food individual that can both substitute for the original ingredient and is not a member of the forbidden class. In this example, the ontology will have to look outside of the “tree nut” class for a substitution. However, the ontology contains several "substitutesFor" relationships that relate two ingredients as substitutes. If such a relationship does not exist between ingredients, then the system can infer substitutes similarly to how it was done in question 3, but with looking outside of the "tree nut" class to find substitutions.

In this screenshot you can see that this user has "tree nuts" listed as an allergy in her profile. Because of this, the system knows to incorporate her allergy into the question. In this case, there are two types of results returned. The first is recipes that do not contain the allergen at all. The second is recipes that do contain the allergen but with substitutions automatically offered in place of the allergen. This question required multiple queries changed together to answer, all of which can be seen broken down below. Query 6a) Recipes that contain bananas and do not contain tree nuts at all PREFIX rdf: PREFIX owl: PREFIX rdfs: PREFIX xsd: PREFIX wtm: PREFIX wtmi: SELECT DISTINCT ?recipe WHERE { ?recipe wtm:hasIngredient wtmi:Banana . FILTER NOT EXISTS { ?recipe wtm:hasIngredient ?ingredient . ?ingredient a ?class . ?class rdfs:label "tree nut"@en . } } Results:

recipes:
whole grain banana pancake

Query 6b) Recipes that contain bananas (no restriction on tree nuts) PREFIX rdf: PREFIX owl: PREFIX rdfs: PREFIX xsd: PREFIX wtm: PREFIX wtmi: SELECT DISTINCT ?recipe WHERE { ?recipe wtm:hasIngredient wtmi:Banana . } Results:

recipes:
whole grain banana pancake
banana bread
banana blueberry almond flour muffin

Query 6c) Using "banana bread" as an example, what ingredients are tree nuts. PREFIX rdf: PREFIX owl: PREFIX rdfs: PREFIX xsd: PREFIX wtm: PREFIX wtmi: SELECT DISTINCT ?ingredient WHERE { wtmi:BananaBread wtm:hasIngredient ?ingredient . ?ingredient a ?class . ?class rdfs:label "tree nut"@en . } Results:

ingredient:
walnut

Query 6d) What non-tree nut substitutions exist for walnuts? PREFIX rdf: PREFIX owl: PREFIX rdfs: PREFIX xsd: PREFIX wtm: PREFIX wtmi: SELECT DISTINCT ?ingredient WHERE { ?ingredient wtm:substitutesFor wtmi:Walnut FILTER NOT EXISTS { ?ingredient a ?class . ?class rdfs:label "tree nut"@en . } } Results:

ingredient:
pumpkin seed

Previous Versions of Queries: Embedded Images:


 

WhatToMake Getting Involved & Maintenance Policy

Maintenance Policy

Our maintainance policy is primarily focused on ensuring that our data remains available for use as long as possible. We will never change the name of our ontology or its URL. This will ensure that references to our ontology will always be valid and that we will not break applications that may come to rely on our ontology in the future. Any future changes to the ontology will be appropriately documented both in the headers of the ontology itself and in accompanying documentation. Future versions of the ontology with “breaking changes” will be hosted at new URLs so that previous versions of the ontology continue to be available.

Getting Involved


There are several places where WhatToMake could expand. Different types of expansion include encoding measurement information, adding other common types of allergies and dietary restrictions, expanding the food classification, adding recipes and ingredients, and improving the inference of substitutions.
If you are interested in contributing to the WhatToMake project or have any other ideas or suggestions, please contact us at the emails below:

Forest Eckhardt - eckhaf@rpi.edu
Kevin Blissett - blissk@rpi.edu
Miao Qi - qim@rpi.edu
Yarden Ne’eman - neemay@rpi.edu

Class Content

WhatToMake Course Assignments


This page contains all of the weekly assignments submitted for the Ontology Engineering Course in the process of developing the WhatToMake Application.

Paper Outline

WhatToMake Paper Draft (PDF)

Reports

Report (.docx, OE_12)
 

Use Cases

Use Case (.docx, OE_12)
 

Conceptual Model

Presentation PDFs:
Conceptual Model Diagram Presentation (PDF, OE_11)
 

PNG/XML Documents:
Raw XML of Conceptual Model Diagram (OE_11)
Full Conceptual Model Diagram (PNG, OE_11)
 

Terms List

Terms List (.xlsx, OE_12)