Created
December 16, 2015 18:08
-
-
Save mookerji/928ea32656ecb56457ae to your computer and use it in GitHub Desktop.
view-source:http://foobartartine.com/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function generateDish() { | |
var ADJ_PROB = 0.5; | |
var STRUCTURE_PROB = 0.5; | |
var adjs = ["chilled", "fried", "smoked", "brined", "cultured", "farmer's", "pressed", "cured", "charred", "dill", "sweet", "corned", "kefir", "paprika", "pickled", "truffled", "black", "rye", "sour cream", "preserved", "burnt", "seeded", "dried"]; | |
var ingredients = ["cabbage", "chicken", "tongue", "cheese", "liver", "sturgeon", "chard", "tuna", "beef", "radish", "mushroom", "trout", "carrot", "yoghurt", "lard", "bone marrow", "tripe", "bottarga", "egg", "catfish", "ramp", "tendon", "greens", "fennel", "chicories", "bonito", "potato", "garlic", "mussel", "nettle", "herring", "sardine", "walnut", "plum"]; | |
var structures = ["croquettes", "melt", "stew", "soup", "slab", "bread", "butter", "pickles", "dip", "dumplings", "broth", "tartare", "loin", "crackers", "cake", "steak", "flatbread", "toast"]; | |
var dish = ""; | |
if (_.random(0, 100) < ADJ_PROB * 100) { | |
dish += _.sample(adjs) + " "; | |
} | |
dish += _.sample(ingredients) + " "; | |
if (_.random(0, 100) < STRUCTURE_PROB * 100) { | |
dish += _.sample(structures) + " "; | |
} | |
dish += "with "; | |
if (_.random(0, 100) < ADJ_PROB * 100) { | |
dish += _.sample(adjs) + " "; | |
} | |
dish += _.sample(ingredients) + " "; | |
if (_.random(0, 100) < STRUCTURE_PROB * 100) { | |
dish += _.sample(structures) + " "; | |
} | |
return dish; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment