Recipe for Life (RWET Final)

For RWET final I made a recipe book of life advice.

The procedure

1.Scrape answers from Quora

Screen Shot 2018-04-27 at 3.00.05 PM

I give it the URL of a particular question, and it will return me the scraped answers for the question, and save them as a text file.

2. Extract all the nouns (of certain relative dependency) and clean the data

Screen Shot 2018-04-27 at 3.07.14 PMScreen Shot 2018-04-27 at 3.07.24 PM

3. Create the framework for generating fake recipe

part 1: Ingredients — (randomly select 15 words from the ingredients pool (the list of nouns from the previous step)Screen Shot 2018-04-27 at 3.18.54 PM

Part2: staring step — Creating a list of starting word for running Markov chains (prepare, cut, chop  etc.)

Part3: middle steps — Creating a list of starting words for running Markov chains

Part3: last step — Creating a list of starting words for running Markov chains  (Finally xxxx)

Screen Shot 2018-04-27 at 3.24.10 PM

4. Run Markov Chain

I tried different source texts including scraping from recipe websites, various cookbook. The one I ended up using is an Italian cookbook.

4. Replace original ingredients with new ingredients from the list of nouns we got from quora scrape 

Screen Shot 2018-04-27 at 3.19.04 PM

Still looking for a way to better identify the ingredients.

Some of the results:

Screen Shot 2018-04-27 at 3.30.06 PM
How To Make Friends
Screen Shot 2018-04-27 at 3.28.56 PM
How to Make Friends




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s