vbursztyn / recipe-generator Goto Github PK
View Code? Open in Web Editor NEWProject 2 for Northwestern's EECS 337.
Project 2 for Northwestern's EECS 337.
Based on [1][2][3], the Nutrient Rich Foods Index 9.3 (NRF 9.3) could come in handy:
(i) Three bad ingredients - find whether saturated fat, sugar, or sodium can be minimized;
(ii) Nine good ingredients - find whether protein, fiber, vitamins (A, C & E), and minerals (Ca, Fe, Mg & K) can be maximized.
*See method fetch_nutrition_facts() in RecipeFetcher for building the diagnosis part.
[1] Hess, Julie M., and Joanne L. Slavin. "Healthy snacks: using nutrient profiling to evaluate the nutrient‐density of common snacks in the United States." Journal of food science 82.9 (2017): 2213-2220.
[2] Drewnowski, Adam. "The Nutrient Rich Foods Index helps to identify healthy, affordable foods." The American journal of clinical nutrition 91.4 (2010): 1095S-1101S.
[3] https://depts.washington.edu/uwcphn/news/presentations/NRF_041609.pdf
After diagnosing the problems with a particular recipe (see issue #3), we can suggest a treatment (ingredient replacement) following certain criteria (e.g., NRF 9.3). To do so, we may need to rank possible replacements by their nutritional gains; thus, we may need to tap into an ingredient-centered nutritional database. We can do this by using python-usda [1] to access the National Nutrient Database for Standard Reference [2].
Suggestion: after pairing ingredients in 'ingredient-ingredient_network', we can add nutrients to network nodes.
[1] https://pypi.org/project/python-usda/
[2] https://ndb.nal.usda.gov/ndb/foods/show/11333
Implement method parse() in class RecipeFetcher, or equivalent.
Generation of list:
Base DB is FooDB [ http://foodb.ca/ ]
Selected subcategories:
protein_list = ['Fishes','Swine','Bovines','Crustaceans','Poultry','Animal fats','Animal foods','Meat products','Ground meat','Fish Products','Other mammals','Animal fats','Amphibians','Venison','Mollusks','Marsupials','Rodents','Cetaceans','Equines']
condiment_list = ['Seasonings','Dressings','Sauces','Condiments','Herbs and Spices','Spices','Herbs','Nuts']
df_foods[df_foods['food_subgroup'].isin(protein_list)][['name','food_subgroup']].to_csv(...) -- 193 tuples
df_foods[df_foods['food_subgroup'].isin(condiment_list)][['name','food_subgroup']].to_csv(...) -- 121 tuples
Suggestions: start with Italian, French, Mexican, Indian, and Japanese cuisines. Consider expanding it after getting to a MVP.
Just saw a recipe with the following
STATEMENT: 1 (1.5 fluid ounce) jigger Irish cream liqueur
NAME: (1.5 fluid ounce) jigger Irish cream liqueur
BASETYPE: None
QUANTITY: 1.0
QUANTITY MODIFIER: None
UNIT: None
PREP STEPS: []
Pick (i) a viewpoint towards ingredients, (ii) a network output format, and create a class to generate a network with ingredient pairings (i.e., possible replacements).
Suggested high-level contract: place raw ingredients data in folder 'ingredients_data' and the generated network in folder 'ingredient-ingredient_network.'
Suggestions for (i): cooccurrence in reviews [1] or shared flavor compounds [2].
Suggestions for (ii): for each ingredient, store ingredients at one hop and two hops (as mongoDB collections or directly in the file system).
[1] Teng, Chun-Yuen, Yu-Ru Lin, and Lada A. Adamic. "Recipe recommendation using ingredient networks." Proceedings of the 4th Annual ACM Web Science Conference. ACM, 2012.
[2] https://github.com/lingcheng99/Flavor-Network
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.