New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Ccc@Eccbr08 Iis Hanft
1. 1st Computer Cooking Contest Workshop @ ECCBR 08, Trier, 2008-09-01
Realising a CBR-based approach for 1st Computer
Cooking Contest
with CCC IIS
Alexandre Hanft, Norman Ihle, Régis Newo, Kerstin Bach, and Jens Mänz
Intelligent Information Systems Lab, University of Hildesheim, Germany
<second-name>@iis.uni-hildesheim.de
2. Outline
• Introduction (Requirements of Application Domain)
• e:IAS
• Modelling cases, esp. ingredients
• Rules
• Workflows
• Achieve three challenges
• Summary & Future work
1st CCC @ ECCBR 08, Trier 1st September 2008 – p. 2
3. Introduction
• Requirements (short)
– Recipe: Title, list of ingredients, preparation instruction
– users wishes:
• Preferred ingredients,
• dish category,
• cuisine
• Dietetic practices: nonalcholic, nut-free, vegetarian
• Forbidden ingredients
– recognise specialisation of concepts
– Give an recipe as advice according to the users input
• advice based on similarity
– Modification of recipes if none of the existing comply with all
constraints
1st CCC @ ECCBR 08, Trier 1st September 2008 – p. 3
4. Using e:IAS
empolis Information Access Suite
• Industry-strength CBR tool suite
• Why using e:IAS?
– GUI support for modelling
– Supports more than one language
– Powerful rule mechanism
– can use parts of modelling from application „smartcooking24“
• What consist e:IAS of
– Web Client + Server
– XML based
– JSP GUI with TagLibs Knowledge Server hosted in Tomcat
– GUI: Creator for data management, models, processes
1st CCC @ ECCBR 08, Trier 1st September 2008 – p. 4
5. Modelling
• Recipe: Title, list of ingredients, preparation instruction
• Main part concerning ingredients: 10 separate types
– Meat, Vegetables, Fruits, Milk, Liquids, …
– + TypeOfMeal, TypeOfCuisine, Diet
• 1216 different concepts
– + Terms representing them in each language (english, german)
• 782 ingredients
• Questions to deal with
– Difference between botanic classification of an ingredient and
“common knowledge”/ its usage for cooking
modelling depending on the purpose
– Some recipes could be starter as well as main dish
1st CCC @ ECCBR 08, Trier 1st September 2008 – p. 5
6. Model with taxonomies for Similarity
• 17 taxonomies used, for ingredients, e.g. hot
• Source: Sample App, asking experts, Wikipedia
• Similarity calculated depending
on steps up/down
• + Table for similarity values for certain pairs
A B
• Calculate similarity between two concepts: combines A 1
sim measures, takes maximum of both
• Values in table above the threshold used for B 0.8 1
determination of replacing ingredients
• Similarity(Query, Casei) = weighted sum of case
attributes
1st CCC @ ECCBR 08, Trier 1st September 2008 – p. 6
9. Using Rules
Why use Rules?
Dynamic behaviour or: not all could be expressed through similarity...
well supported by e:IAS at different phases
full access to internal Object model
At first stage it looks easy to build/ of moderate effort
different kinds reflecting the aim and time they are called
13 Filter rules (textminer)
50 Completion rules (complete query, retrieval server
Type Of Meal: 13 rules
Type of Cuisine: 28 rules ...
12 Adaptation rules (after getting the retrieval result)
1st CCC @ ECCBR 08, Trier 1st September 2008 – p. 9
10. Adaption Rule: Exchange Meat
VAR
$WrongIngr = Intersection(Query@Att_Extra_Forbidden_Ingredient_Meat;
Case@Att_Ingredient_Meat; 1.0)
$ReplaceIngrCand = DifferenceSet($AllIngr; $WrongIngr);
$ReplaceIngr = Intersection($WrongIngr; $ReplaceIngrCand; 0.5);
$ReplaceIngrWOForbidden = DifferenceSet($ReplaceIngr;
Query@Att_Extra_Forbidden_Ingredient_Meat);
$tip = Concatenation("Please leave out or replace "; $WrongIngrText; " through ";
$ReplaceIngrWOForbiddenText;);
IF
Cardinality($WrongIngr; Integer.V1) > 0
THEN
SetAttribute(Case@Att_Extra_Exchanges_Meat;
Union(Case@Att_Extra_Exchanges_Meat; $ReplaceIngrWOForbidden); none;
override);
SetAttribute(Case@Att_Extra_Exchanges_Text;
Union(Case@Att_Extra_Exchanges_Text; $tip; SetOfText.V1); none; override);
1st CCC @ ECCBR 08, Trier 1st September 2008 – p. 10
11. Adaption Rule: Exchange forbidden Meat
through similar meat
Intersection is set of concepts from
All which are similar > threshhold
forbidden
meat (query) All meat
concepts
meat
concepts
of 1 case
„Please replace “ + + „ through “ +
1st CCC @ ECCBR 08, Trier 1st September 2008 – p. 11
12. Example Rule: recognise Ice Cream
Recognice ice cream
IF AND(
HasElement(Att_MethodOfPreparation;"freeze");
HasElement(Att_Ingredient_SpiceAndHerb; ":sugar");
OR(
Cardinality(Att_Ingredient_Fruit; Integer.V1) > 0;
Cardinality(Intersection("milk"; Att_Ingredient_Milk; 0.8) > 0));
THEN SetAttribute(Att_Extra_TypeOfMeal;
Union(Att_TypeOfMeal; "dessert";"ice cream")
1st CCC @ ECCBR 08, Trier 1st September 2008 – p. 12
13. Workflow
Workflow Engine: ProcessManager
Search Pipeline: Cases
Retrieval
User Filter Query Completion Server
input rules rules
Result Adaptation
rules
1st CCC @ ECCBR 08, Trier 1st September 2008 – p. 13
14. Compulsory task
Input: free Text + Combobox for dietary practices
Result: list of recipes with Title, Ingredients, Prep. + possibly
Replacement instructions
Dietary practice
non alcoholic
Alcohol is part of liquid taxonomy
nut-free
Nuts are part of fruit taxonomy
Modelled from culinaric instead botanic perspective: sheanut, almond
set filter that exclude all recipes with nuts
Vegetarian
exclude all recipes with Meat
1st CCC @ ECCBR 08, Trier 1st September 2008 – p. 14
15. Negation Challenge
Debar arbitrary amount of
Replace Certain ingredients textbox, pattern „do not have ~“
Exclude Type of Cuisine pattern: „do not like ~“
Exclude Specie pattern: „do not like ~“
Replacement through similar ingr. (same type), which are not
also forbidden
for all retrieved cases containing forbidden ingredients
Suggestion: >1 advices possible
Over the whole similarity of each case it is controlled if a case
with or without adaptation is adviced
Depends on the amount of ingredients conforming with the query
1st CCC @ ECCBR 08, Trier 1st September 2008 – p. 15
17. Menu Challenge GUI Example
1st CCC @ ECCBR 08, Trier 1st September 2008 – p. 17
18. Summary & Future Work
• CBR system based on industrial-strength tool including a
powerful rules mechanism.
• Modelling of ingredients with combination of similarity measures
• accomplish the three challenges
• Retain cycle, allow user to modify recipes
• differentiate kind of negation part into “hate ~” and “dislike ~”
• Complete support for other languages
1st CCC @ ECCBR 08, Trier 1st September 2008 – p. 18
19. Thank you for your attention!
Any Questions?
1st CCC @ ECCBR 08, Trier 1st September 2008 – p. 19