Edamam wanted to create a comprehensive food knowledge graph with data collated from a variety of reliable sources and to package it in an attractive interface. Their goal was to have a platform offering multiple ways of searching and filtering this information to help users make better food choices.
The main challenge of creating an exhaustive knowledge graph about the nutritional value of food ingredients was integrating data from various sources. Some of these sources were structured datasets that supported different standards for publishing and maintaining their data, which lead to redundancies, ambiguities and other data quality issues. Another part of the data was scattered across the web in unstructured form (the recipes were extracted from sources such as the New York Times, Food.com, and Epicurious) and had to be transformed into structured knowledge.
The required solution needed to be able to:
To address these challenges, Edamam used a blend of Ontotext technology solutions focused on an RDF database, web mining, text analysis, ontologies and semantic search.
At the core of the solution is Ontotext’s GraphDB. It loads highly normalized and semantically interlinked data from different sources into a live food knowledge graph. Based on the facts stored in GraphDB, Edamam applies inferencing to derive further insights including cooking time, dietary restrictions (e.g., allergies, vegetarian, kosher, etc.), recipe classifications, recipe complexity, nutrition information per serving and the degree to which the recipe contributes to a balanced diet.
All this knowledge is instantly discoverable as new facts can be inferred in real time. There is a SPARQL end-point and a full-text search using Lucene that have been integrated into GraphDB. Thanks to all this, users can:
Originally, Edamam used Ontotext’s web mining technology to crawl sites and extract recipes but over time, they adapted the crawlers to extend to more and more sites. Once the data was identified, extracted and classified, a link to the original site and full credits were provided.
After extracting the relevant parts of a recipe, Edamam used text analysis and semantic annotation techniques to map ingredients, cooking methods and tools to industry databases. For example, the knowledge graph included the US Department of Agriculture’s Standard Reference, which provided a list of some 9000 ingredients, including full nutrition information about over 140 nutrients. The Edamam database was also mapped to available Linked Open Data such as DBpedia and FreeBase.
Edamam’s food ontology included recipes, ingredients, nutrition information, measures, allergies and more. The solution factored in many domain-specific facts and “pragmatics” that allowed data to be transformed semantically. For example, conversion from a measure (e.g., a cup) to the weight of the product depends on the state of the ingredient. Minced onions weigh more than chopped onions. Certain measures depend on the ingredients themselves – “a pouch of dry onion soup” has a different weight than a “pouch of flavor fresh tuna.” In addition, Edamam was able to transform semantic phrases such as “to taste”, “dash of”, “top it up” to default measures.
Edamam’s vision for this platform was that it could power different recipe healthy eating applications, shopping applications, cooking robots and smart fridges. The initial release of the project included two consumer applications.
The smart-phone application for iPhone and Android was developed by Ontotext’s sibling company Sirma Mobile. The first screen below shows a recipe view and the user can further refine the result set by selecting the computed criterion “Balanced Diet”. The second screen shows detailed nutrition information.
The recipe detail screen below shows instructions, ingredient list, dietary classifications, total energy, a bar with the fundamental nutrients and detailed nutrition information.
The user interface provides efficient full-text search, ranking by various criteria, filtering by dietary restrictions and other recipe classifications.
Empowered by Ontotext’s solution, Edamam was able to deliver real-time nutrition analysis and diet-driven meal recommendations at a very low cost. As a result, the company was in a position to save their clients both time and money, and help them eat better and live healthier. With more than 40,000 business subscribers to their food and nutrition data APIs, Edamam is becoming the place for food, health and wellness businesses as well as individual consumers to find accurate, deep nutrition data.
Do you think this case resembles your particular needs?