Inspiration

I was originally thinking of an application to enable SQL query on packaged foods available in India. But as i later found out, FSSAI which provides licenses to manufacturers, does not provide an open publication of the list of approved packaged foods, or their nutritional contents. As i hoped that such an applicationcould bring more awareness for consumers, and hence push the manufacturers to include healthier products with less sugar (instead of taste), i tried creating an excel sheet collecting data manually from amanon.in pantry and from local store photos (i have collected many). Soon i realized that it would be a humungous task to collect and keep it up to date for just a single person.

During this time i also found the USDA nutrition database, which provides detailed nutritional information of raw, as well as packed foods on their website. I decided to try to scrape a part of their website and start building an application. I was able to run SQL queries now, and get answers to some questions (in SQL). But it was not complete either, and eventually i also learned that National Institute of Nutrition (NIN), Hyderabad had released Indian Food Composition Tables 2017 which included very detailed nutritional information for most raw foods available in India. It felt that i finally found the data source i want. As, i read through their book, i found out about the nutrition scenario in India, as well as the various components in food. I read that simply by eating brown rice instead of white milled rice could help mitigate beriberi which is caused by vitamin b deficiency.

At this point i found a few great youtube channels (What i have learned) and documentaries (fat head) on food, which explained in detail as to why people suffered from diabetes. I had high blood sugar and was fat. I reduced my sugar intake and instead ate more ghee, nuts, cream milk, and oil. I also did some exercise as i also found parkour very interesting after playing mirrors edge catalyst. I have reduced my weight now and i like it.

So i downloaded the IFCT 2017 pdf, and the manually copied the data to an excel sheet which i later put into a csv. I had shown my father and mother the previous application i had built, and they complained that how could they write SQL query. So, this time i learnt about Natural Language Processing (NLP) and started building an application that could atleast understand some basic queries. At this time i found Dialogflow, and immediately decided i wanted to create a bot. So i created one, that could respond with tabes and graphs (as png). However, i couldnt manage to get it published as i faced several errors and got a bit frustrated. So, instead i switched back to slowly updating the NLP algorithm to be able to handle english text queries better.

At this point saw about this Alexa challenge, so i retried again with Dialogflow. For building confidence, i first made "Word Splitter" and got it published in google, alexa, and slack. Taking the next step, i decided to build an application that is able to tell about E and INS numbers listed on food packaging because i thought it would help people easily find the chemicals put into packaged foods. So i built that, and got it published too. But i wanted to add "Indian Food Composition" skill for this competition but as its still a work in progress, i decided to submit "Food Additive" skill instead. This project describes "Food Additive" skill.

What it does

Ask it about any food additive (E number, INS code, or chemical name), and it tell you:

  • E number, and/or INS code
  • Chemical name(s)
  • Type (why it is used for)
  • Status (who has approved its use).

How I built it

I have used the number parsing algorithm i wrote for "Indian Food Composition", so it can understand "E two hundred two" -> "E202". Used node.js because i have good experience with it. its good for prototyping. And thanks a lot to the great Node.js community for incredibly helpful packages. I used dialogflow for google assistant, slack integration, and alexa skills kit for alexa integration. The data source is Wikipedia so thanks to the people writing and maintaining it as well.

Challenges I ran into

I described it in the introduction itself.

Accomplishments that I'm proud of

I had not planned to do this, but i think life is that way. I am proud that i learnt about food, and i will be proud if the skill helps people be more aware about packaged foods and switch to healthy foods.

What I learned

I have described it already.

What's next for Food Additive

Hope to complete the Indian Food Composition skill and learn more about fasting. If i get opportunity for PhD i will try for voice and gesture controlled javascript programming.

Built With

Share this project:

Updates