How i think we can add machine learning into Groceristar/ChickenKyiv projects?

Arthur Tkachenko
groceristar
Published in
4 min readApr 26, 2018
got it for free from pixabay.com

It’s just a brief intro!

You can read here and understand one of the reasons why I decided to include ML(machine learning — i’m not a pro at this, so don’t be hard with me) into my projects.

I want to explore this field, learn something new and extend my project functionality.

We have a few topics here, right now(but this is not a complete list)

  • auto-assign category of ingredients
  • auto adding a measurement to ingredient quantity
  • image to text converter
  • NLP processing via Bot
  • Websites scrapper -> converter from text into ready to import data related to recipes
  • expenses planner
  • measurements conversion

auto adding a measurement to ingredient quantity

we have a lot of units. Liters, teaspoons, gallons… If i add milk as ingredient, i want to have a system, that will understand — that milk have only few units of measure. Cups, Liters, Milliliters.

If i add olive oil — i don’t need options like kilograms. If i add butter — i didn’t use teaspoons — only grams or kilograms. It’s like tokenization and segregation. My idea was to assign measurements by auto or at least simplify choices.

Can it be done by code of main system?

It can be done by code, for sure. but it’s not a simple solution. and if that can be done by some dedicated system — it’s awesome. but still — yeah, we’re working on backend system that will be able to convert measurements by code

NLP processing via Bot

We can configure some algorithm to work inside our bot. Bot will have a voice enter? Maybe. Because keyboards was invented a long time ago, and maybe it’s time to change something… There a lot of other ways to communicate with users nowadays.

Let’s have a picture here. Hope this will make this article less `nerdy`

Image credit: my friend, Betty — buybycountry.com

Image to Text converter(OCR)

Processing Pinterest images into json arrays that we can import to our db.

I assume we’ll use Python. Will it be a separated server where we send that data or we’ll use it only at our local environment and use it when we need to update our database by hands — not sure.

Another developer in our team have a basic code which will convert image into array. Array will be saved into csv and imported into our database.

We have an image samples that i got from Pinterest, that we can use in order to test how that code working stored here.

As usually, i’m not sure about final structures of resulted array. But i think it can be easy to update later.

Ingredients categorization

When we grab “ingredients/shopping list items” we need to add a department(it’s like a categories of ingredients. Or big titles in your mall — Bread, Dairy) to each item. I want to assign department to ingredient automatically. It’s not a very important thing, but if it can save time — why not to do it?

So if we have milk or cheese — we add dairy. And i assume here ML can be beneficial.

Repo where we store our progress/code here.

Made good progress here — training on items for Dairy section, but will need more items, to make a better results.

Expenses planner

I’m a horrible at buying something in shop. I’m impulsive, can purchase stupid thing without taking care about future. Can we build a system, that will understand my weaknesses and make me aware about it. Like if i want to keep going my diet — i’m restricted to buy a beer. Or i have a virtual limit of purchases per day, per week, or i’ll end up without

measurements conversion

another idea was to teach model to convert measurements because it’s very tricky to have like teaspoon, lb, ounce in one place. we also have a metric and universal systems…

But measurements stuff is a long-shot. Not ready right now. just researching this…

One of my friends also gave me an idea about recommendation system. web is full of recipes, but they’re not personalized. But as we don’t have a lot of information from our users — we decided to pause it for now.

--

--