さて、2/3 の材料を含むすべてのレシピを抽出する必要があるとしましょう。レシピはリンクされたデータとして表され、これはhttp://linkedrecipes.org/schemaで使用されるオントロジーです。カレーを使ったレシピの見つけ方を知っています:
PREFIX rdfs: <htp://ww.w3.org/2000/01/rdf-schema#>
PREFIX recipe: <htp://linkedrecipes.org/schema/>
SELECT ?label ?recipe
WHERE{
?food rdfs:label ?label2 .
?food recipe:ingredient_of ?recipe .
?recipe a recipe:Recipe .
?recipe rdfs:label ?label.
FILTER (REGEX(STR(?label2), 'curry', 'i'))
}
しかし、たとえばカレーとチキンのレシピを見つけるにはどうすればよいでしょうか?