Non-ingredient Detection in User-generated Recipes using the Sequence Tagging Approach (2020)

Abstract: Recently, the number of user-generated recipes on the Internet has increased. In such recipes, users are generally supposed to write a title, an ingredient list, and steps to create a dish. However, some items in an ingredient list in a user-generated recipe are not actually edible ingredients. For example, headings, comments, and kitchenware sometimes appear in an ingredient list because users can freely write the list in their recipes. Such noise makes it difficult for computers to use recipes for a variety of tasks, such as calorie estimation. To address this issue, we propose a non-ingredient detection method inspired by a neural sequence tagging model. In our experiment, we annotated 6,675 ingredients in 600 user-generated recipes and showed that our proposed method achieved a 93.3 F1 score.

## introduction at the present time, many people upload their recipes to the internet. for example, over 6.7 million recipes have been uploaded to cookpad, 1 one of the largest recipe sharing services in the world. most of the recipes on the service are posted by ordinary users. figure 1 shows an example of a recipe. note that we use japanese examples in this study because approximately half of the recipes on cookpad are written in japanese. as seen in the figure, a recipe generally consists of a title, ingredient list, and steps. an ingredient list is a set of items that have an ingredient name and quantity. however, some items in an ingredient list in a user-generated recipe are not actually edible ingredients in a user-generated recipe. for example, the third item 調味料 (seasoning) in figure 1 is 1 https://cookpad.com title ナスとピーマンの味噌炒め (eggplant and green pepper miso stir-fry) ingredient list ナス (eggplant) 5 個 (5 pieces) ピーマン (green pepper) 5 個 (5 pieces) 調味料 (seasoning) n/a 味噌 (miso) 大さじ 3 (3 tbs) 砂糖 (sugar) 大さじ 2 (2 tbs) 酒 (sake) 大さじ 2 (2 tbs) steps 1. ナスを輪切りにする (cut eggplants into round slices) 2. ... not an ingredient but the heading for the following ingredients. in a user-generated recipe, people freely use the ingredients field to describe ingredients. this noise makes it difficult for computers to use recipes for a variety of tasks, such as calorie estimation. in this paper, we propose a method to detect non-ingredient items from an ingredient list in a user-generated recipe. inspired by a sequence tagging approach, our method solves the problem by predicting a label (ingredient or non-ingredient) for each item in an ingredient list sequentially. in our experiment, we annotated 6, 675 ingredients in 600 recipes from cookpad and investigated the performance of our method using the recipes. ## related work the increase in the number of recipes on the internet has led to an increase in studies on these data, such as recipe analysis @xcite , recipe organization @xcite , and recipe generation @xcite . additionally, many recipe-related corpora and datasets have been published recently to promote studies on recipes @xcite @xcite . among such recipe-related studies, the following two previous works focused on informal text in user-generated recipes, like our study. @xcite converted ingredients written in an user-generated recipe into their canonical forms in an ingredient dictionary. however, in that study, there was no assumption that non-ingredients appear in a recipe, unlike our study. by contrast, @xcite distinguished non-steps written in a user-generated recipe from actual steps, such as an advertisement for the author's recipe books, which are not related to cooking. our study focuses on ingredients in a recipe, unlike their work; that is, we distinguish noningredients written in a user-generated recipe from actual ingredients. our study is the first to pay attention to noningredients in a user-generated recipe. this contributes to a variety of recipe-related studies, particularly based on ingredients in a recipe, such as calorie estimation @xcite , recipe clustering @xcite , and reciperelated term detection @xcite . ## task definition the primary task in this study is to classify an item in an ingredient list as an ingredient or noningredient. in this work, we define non-ingredient items based on edibility. figure 2 shows examples of ingredient lists in user-generated recipes. "ホワイトソース" (white sauce) in figure 2(a) is not an ingredient but a heading. the items below it are ingredients for white sauce. an item without a quantity is likely to be a non-ingredient. by contrast, "お好みの野菜" (favorite vegetables) in figure 2 (b) is an actual ingredient. as shown by this example, an item without a quantity is not always a non-ingredient. "(↑ バターでもいいです)" ((↑ you can use butter)) in figure 2(c ) is used as a comment, which mentions the previous ingredient "マーガリン" (margarine). "竹串" (bamboo skewers) in figure 2(d ) is a non-ingredient because it is not edible. in some recipes, kitchenware appears on the ingredient list, like this example. the goal ingredient list . . . . . . ローリエ (bay leaf) 2 枚 (2 pieces) ホワイトソース (white sauce) n/a バター (butter) 30g (30 grams) . . . . . . (a) example of a cream stew recipe. ingredient list . . . . . . にんじん (carrot) 1 本 (1 piece) お好みの野菜 (favorite vegetables) n/a 水 (water) 1000cc (1000 cc) . . . . . . (b) example of a hot pot recipe. ingredient list . . . . . . マーガリン (margarine) 60g (60 grams) (↑ バターでもいいです) ((↑ you can use butter)) n/a 砂糖 (sugar) 40g (40 grams) . . . . . . (c) example of a cookie recipe. ingredient list . . . . . . サラダ油 (vegetable oil) 小さじ 1 (1 tsp) 竹串 (bamboo skewers) 3 本 (3 pieces) 岩塩 (rock salt) 適量 (desired amount) . . . . . . (d) example of a meat roll recipe. of this study is to detect these inedible items as non-ingredients. ## proposed method in this study, we detect non-ingredient items in an ingredient list using a neural sequence tagging model, shown in figure 3 . ## conclusion in this paper, we introduced a non-ingredient detection task for user-generated recipes and proposed a neural model based on the sequence tagging approach. we used a bigru-based model to predict a label for each ingredient over an ingredient sequence. to evaluate our method, we constructed a dataset that contained 6,675 ingredients of 600 recipes from cookpad. our experimental results showed that the proposed method achieved a 93.3 f1 score in the task. in future work, we plan to verify the effectiveness of our method for downstream tasks, such as calorie estimation.