A webbased app build to process and edit cooking recipies. Cooking recipes are something almost everybody knows, and will encounter on a regular basis in the mundane life. However finding, managing and creating recipes is often a difficult and tedious task. Many, will simply use their notes app on their phone, or MS Word on their computer to write down the instructions and ingredients.
This project aims to explore technical methods, namly natural language processing, to process and aid in the creation and classification of cooking recipes.
Download Project with model files & Database (300mb, 3GB uncompressed) Licenced Files (BLS, or the Recipies are not included)- Frontend: Angular (CLI) / Typescript / JS
- Backend: Python 3.6
- Webserver: Flask, Flast-RestX (Documentation)
- NLP Libaries: gensim, pyLDAvis, nltk, spacy, tensorflow
- Other central utils: sqlite, mysql, re
- Text processing:
- detection of ingredients
- detection of units
- detection and calculation of item quanity
- parsing of brackets and parentheses
- utilizes Stemming, Lemmatizer, Tokenizer
- Ingredient processing:
- Identification
- Finding best match
- Match confidence
- User interface:
- Basic functionality
- Works in real time
- REST API
- Python3 (Tested on 3.6 and 3.9)
- Linux / Win / OSX (Tested on Win10)
-
The Git Repo lacks the Database login and Models. The Full project can be downloaded above. Alternativly just clone the repo.
-
Setup a virtual environment for python
python -m venv .venv
-
Activate the virtal environment
-
Install the python modules and requirements
python -m pip install -r requirements.txt
python -m spacy download en_core_web_sm
python -m spacy download de_core_news_sm
- Run the Server:
python server_testing.py
or
server_production.py
In the folder "NLP" you will find various scripts that can be used to generated, test and analyse models.
The most relevant project files & scripts can be found here:
Some Libaries had some issues, if you want to build your own models, you will most likeley need to do similar tweaks.
-
For the LDA visualization you need to apply to following fix to the pyLDAvis package:
In the file: pyLDAvis/_display.py:
- replacing open() for urls with urllib.request (or manually paste the css code)