Skip to content
Recipe database
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data
src
testing
.gitignore
LICENSE
README.md

README.md

README

  1. Generate JSON data for each recipe. Data will be in finished

cd src && python3 parseHTML.py /location/to/data

  1. Tag recipes. Make sure to have ingredientTagging setup in another directory (see source)

cd src && python3 ingredientTagging.py

  1. Generate the models and then generate the markov files

cd src && python3 markovRecipe.py

Todo

  • Recipe extractors
  • Ingredient parser (using NYTimes phrase-tagger)
  • Unit converter

Unit converter notes

Give the parsed recipe,

{
  "quantity":"1.5",
  "measurement":"cups",
  "ingredient":"green pepper",
  "sr28":"1239810"
}

it will make the conversion to grams:

{
  "quantity":"300",
  "measurement":"gram",
  "ingredient":"green pepper",
  "sr28":"1239810"
}

How to do this?

  1. Look up ingredient in sr28. If found, and the weight associated with it is the same as the current weight, use that conversion, if not make a conversion to a weight associated with the sr28.

  2. (optional) To convert the measurement, use an array of increasing measurement types:

[milliliter, teaspoon, tablespoon, ounce, cup, pint, quart, gallon, liter]

and the associated transformation array (left to right):

[4, 3, 2, 8, 2, 2, 4, 0.2642].

For example, 4 millilter = 1 teaspoon and 0.26452 gallon = 1 liter. Any conversion can be made by simply traversing the array.

  1. Use the sr28 weight to convert to grams.

Data

data/FoodPricesDatabase0304.tab from here which contains prices per 100 g.

data/sr28/* are from the sr28 USDA database. Documentation is available.

Relevant

http://opensourcecook.com/recipes-copyright-law https://news.ycombinator.com/item?id=11711467

You can’t perform that action at this time.