This repository was created for KIK-211 Building NLP Applications course at the University of Helsinki. It contains weekly tasks which can be found in week_number folders, and a final project in tomato_engine folder.
To read more about the code, go to our Wiki
Tomato Engine is a simple search engine which allows you to browse through nearly 1000 (yes, there are 3 zeros!) recipes. You can search for the simplest word such as 'tomato', or use Boolean search to find 'tomato AND NOT ladle' if you lack kitchen utensils!
Tomato Engine is easy to use! We did all the dirty work with virtual environments, libraries, and dependencies ourselves, so the only thing you need is to clone this repo and you're ready to cook.
Nice bonus: we're OS friendly which means you can enjoy the art of food making using either Linux, Mac, or Windows.
Side note: Tomato Engine speaks British English
-
Clone this repository using
git clone
-
Be sure to have Python3 installed
-
Go to tomato_engine folder by
cd tomato_engine
-
Activate the tomato virtual environment with
. tomato/bin/activate
-
Set the environment variables:
Linux & Mac:
export FLASK_APP=search_engine.py
export FLASK_RUN_PORT=8000
Windows:
set FLASK_APP=search_engine.py
set FLASK_RUN_PORT=8000
Windows PowerShell:
$env:FLASK_APP = 'search_engine.py'
$env:FLASK_RUN_PORT = '8000'
Make sure to set these every time you run a new Tomato Engine session. The virtual environment doesn't remember them.
-
Run Tomato Engine
flask run
-
Go to
localhost:8000/search
in your browser to search the recipes -
Choose
Search exact
to search for exact match, orShow all
to show all recipes containing searched items -
In the search bar, type one word such as tomato, or connect several words using boolean values such as tomato AND pasta
NB: Be sure to type the boolean operator in UPPERCASE, otherwise the search won't work!
-
To see the whole recipe, click on the recipe's name. You will be redirected and able to see the whole recipe
-
Check few interesting plots under Get to know your recipes bookmark
-
To leave Tomato Engine, simply close your browser and stop the program (
Ctrl+C
or whatever you're using). To leave the virtual environment, simply typedeactivate
Illustration by Anna-Erika
Recipes from BBC Good Food scraped using Webscraper
Few code snippets used from Mathias Creutz's NLP Tutorials
Libraries and modules:
Project by Linda, Mája, and Anna-Erika
DO JUDGE THE BOOK BY ITS COVER!!!
AT LEAST WE HAVE A VISION
<3