Re:Generating weird cooking recipes with TensorFlow
by 131012 on Monday June 22, 2020 @08:58AM
(#23599643)
I find it interesting that the model doesn't get one of the simplest rule of a recipe: the ingredients list and the ingredients in the instructions must be the same.
Obviously, it is because the model "understands" the structure of the sentence, but is oblivious of the text as a whole.
Thankfully the task is rather easier than learning natural language concepts. The LSTM only has to learn basic concepts of the language of recipes, which is considerably simpler than unrestricted natural English.
For example, in natural English one would say
Whereas a recipe will simply say: As in the example on the repository.Also, it seems that most, if not all, sentences begin with a verb that describes an action followed by a list of ingredients to be combined. "Stir the olive oil, garlic, thyme and 1 teaspoon salt in a saucepan;" etc. The regularity and repetitiveness of such structures makes them much easier to learn than arbitrary English text. In more practical terms, they also make the instance space for this task a lot more dense than arbitrary English text, were a sentence with a certain structure may only repeat once after a million utterances.
Edit: OK, if I don't say this I'll explode. "one cup" is "two sticks"? This is just not going to work.