This dataset includes mappings to some of the concepts found in:
- DBpedia
- schema.org
- FoodOn
- Units Ontology
- ChEBI
USDA Knowledge Graph in nanopublications (trig) format
To reproduce the knowledge graph described in the paper, you will require the following:
make
(available on most Linux distributions; can be obtained with some effort for Windows)- Python 3, along with the virtualenv module
- This repository, https://github.com/foodkg/foodkg.github.io/
- im2recipe's Recipe1M dataset. Sign up to acquire it here: http://im2recipe.csail.mit.edu/dataset/login/
Specific instructions for creating and transforming the data are found in /src/README.md
. A high level overview:
- Download the data required by
/src/prep-scripts/README.md
- Build the source data with
make
- Move to
/src/recipe-handler
- Create the linked data with
make
(placed into theout
directory) - Move to
/src/verify
- Create statistics with
make
You will need the following:
- Blazegraph or any equivalent knowledge graph database software
The .trig
data can be imported into a database of your choice. This may take some time, due to the volume of data involved.
If you are using Blazegraph, then you can load the data with the following procedure:
- Start the Blazegraph server and navigate to the web interface (typically
localhost:9999
) - Switch to the UPDATE tab
- In the dropdown menu below the input field, change from "SPARQL Update" to "File path or URL"
- In the input field, enter the absolute path to the generated
.trig
file, prefixed byfile://
. For example, you might load the USDA links with a path offiel:///home/alice/foodkg.github.io/src/recipe-handler/out/iswc/usda-links.trig
, replacingusda-links.trig
with the other file names in the output directory to load everything