This is Creative Cooking Assistant, a course project for CMPS 140/240 (Winter 2011) at UCSC.
- Marcelo Siero
- Gregory Jackson
- Ryan Andonian
- Chris Reynolds
- Andy Nguyen
- Josh Rosen
- Mike Wilson
Our project has been tested with Python 2.6.
Our project requires a few python libraries, which are listed in
requirements.txt. To install the required libraries using pip, run
pip install -r requirements.txt.
sudo make install_requirements'
The NLG requires Java.
Running the System
To run the command line chat interface, run
You can also use 'make run'.
The project includes an experimental web server, which can be used by running
python web_server.py and browsing to
Most of these tools accept command line options; try running these programs
--help for more information.
To rebuild the database, first import the ontology by running
ontology_import.py. Then, use
python allrecipes.py [filenames of allrecipes
html files] to add recipes from allrecipes.com pages.
To update the NLU's ingredients and cuisine wordlists, run
To get a fresh database from the server, rebuild the ingredients, and regenerate
the pickled objects, use
We use the official Python coding standard,
The pep8.py tool to validate code against
PEP8. In addition, we use Pylint to
perform other code quality checks. The
pylintrc file allows Pylint's checks to be modified as needed.
In addition to the tests in the
tests directory, some modules contain
doctests. The doctests in an
individual file can be run using the
python -m doctest myfilename.py
command. Or, py.test can run the doctests (in addition
to other tests) using the
py.test --doctest-modules command. Or all tests
can be run by using
The tests directory contains two scripts for evaluating the system. The
extract_ingredient_parts_test.py tests the ingredient part extraction code
against a number of handwritten examples hosted in a Google Docs spreadsheet.
database_stats.py script generates statistics on the number of
ingredients, recipes, and ontology nodes in a database and finds ingredients
that are missing from the ontology.