Skip to content

Latest commit

 

History

History
100 lines (73 loc) · 3.43 KB

README.md

File metadata and controls

100 lines (73 loc) · 3.43 KB


RecipeWebApp

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.

Live Demo (Fully Available until 30.11.2021, limited afterwards)

Download Project with model files & Database (300mb, 3GB uncompressed) Licenced Files (BLS, or the Recipies are not included)

Technology used

  • 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

Features

  • 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

Requirements

  • Python3 (Tested on 3.6 and 3.9)
  • Linux / Win / OSX (Tested on Win10)

Install

  1. The Git Repo lacks the Database login and Models. The Full project can be downloaded above. Alternativly just clone the repo.

  2. Setup a virtual environment for python

python -m venv .venv
  1. Activate the virtal environment

  2. 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
  1. Run the Server:
python server_testing.py
or
server_production.py

Tools

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:

Issues with libaries

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)