-
Notifications
You must be signed in to change notification settings - Fork 42
/
subs.html
120 lines (99 loc) · 5.35 KB
/
subs.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<!DOCTYPE html>
<html lang="en">
<head>
<title>Subs</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="css/custom.css">
</head>
<body>
<nav class="navbar navbar-inverse mx-auto">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#"></a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li><a href="index.html">Home</a></li>
<li class = "active"><a href="demo.html">Demo</a></li>
<li><a href="foodkg.html">FoodKG Construction</a></li>
<li><a href="whattomake.html">What To Make Application</a></li>
<li><a href="kbqa.html">QA over FoodKG</a></li>
<li><a href="dgo.html">Dietary Guideline Ontology</a></li>
<li class = "active"><a href="subs.html">Ingredient Subsitutions</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</div>
</div>
</nav>
<div class="container-fluid text-center">
<div class="row content">
<div class="col-sm-2 sidenav">
<div class="bg"></div>
<span class="caption">
source: <a href="https://www.freeimages.com/search/food-question-mark">https://www.freeimages.com/search/food-question-mark</a>.
</span>
</div>
<div class="col-sm-8 text-left">
<a href="https://github.com/foodkg/foodkg.github.io"><img style="position: absolute; top: 0; right: 0; border: 0;"
src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
<!-- Content -->
<h1>Ingredient Substitutions</h1>
<br/>
<p>
We are exploring the possibilities of using the FoodKG to suggest ingredient substitutions in recipes.
This work is motivated by trying to make recipes healthier for people with specific dietary constraints, like
trying to reduce their carbohydrate intake or avoiding eating specific types of foods.
</p>
<hr>
<h2>Approach</h2>
<h3>Diet-Improvement Ingredient Substitution Heuristic (DIISH)</h3>
<p>
We calculate a substitutability score based on a heuristic we have developed, DIISH. This heuristic combines both
implicit and explicit semantic information about ingredients to try to determine good substitutes.
</p>
<p>
We calculate implicit semantics using word embeddings models - a Word2Vec model trained on data from the
<a href="http://im2recipe.csail.mit.edu/">Im2Recipe project</a>, and a word embedding model from <a href="https://spacy.io/">spaCy</a>.</p>
<p>
We calculate explicit semantics using recipe and ingredient information in the FoodKG. We calculate scores to
try to capture information like whether ingredients are used in similar recipe contexts and whether ingredients
are paired together with similar ingredients.
</p>
<p>
The DIISH substitutability score is calculated for ingredients, and we rank substitute candidates to provide our
final result. We also leverage the FoodKG's links to FoodOn's food ontology to help generalize ingredient uses,
as well as filter out options that are unlikely to be considered good substitutes.
</p>
<h3>Substitute Data</h3>
<p>One source that we used to collect substitution data is <a href="http://foodsubs.com/">The Cook's Thesaurus</a>.
This website has a large catalog of ingredients, providing background information about the ignredient
as well as some common options for substitutions.</p>
<p>We also use Food.com review data to collect more data on substitutions. More information about the data set can be found
<a href="https://www.kaggle.com/shuyangli94/food-com-recipes-and-user-interactions">here</a>.</p>
<br/>
<p>
The scripts used to scrape and parse the pages from The Cook's Thesaurus, as well as the scripts used to
parse the Food.com review data into ingredient substitution tuples, is open sourced and can be found
<a href="https://github.com/solashirai/FoodSubstitutionDataScripts">here</a>
</p>
<h4>Prerequisites for obtaining substitution data and running the scripts</h4>
<ul>
<li>Create a virtual environment and install the prerequisites found in <code>requirements.txt</code></li>
<li>Follow instructions found in the README files to collect the appropriate data necessary to run the scripts.
This will generally include requiring some files that are generated by FoodKG.</li>
</ul>
<h3>ISWC 2020 Poster</h3>
<br/>
<img width="100%"
src="images/ISWC2020_poster_ingredient_substitution_expanded.jpg" />
</body>
</html>