Here’s a regenerated and improved README.md, with your requested addition about the demo_data option clearly integrated and the overall structure polished for readability:
# Greycat Triple-Store Demo (with DBpedia)
A minimal, end-to-end demo that downloads a [DBpedia](https://www.dbpedia.org/) snapshot, imports it into **Greycat**, and lets you explore the data as a knowledge graph.
For quick testing, a lightweight **demo dataset** is also included (see [Use demo data instead of DBpedia](#use-demo-data-instead-of-dbpedia)).
---
## Prerequisites
* **bash**, **curl**, **wget**
* **gzip** and **bzip2** (for `.gz` / `.bz2` files)
* Ubuntu/Debian:
```bash
sudo apt-get install -y gzip bzip2
```
* 76 GB of free disk space in `./data/` (DBpedia is large)
* Around 83 GB of free disk space for `./gcdata/` (Greycat graph database)
---
## 1) Get the DBpedia data
This fetches the **latest-core** DBpedia files, puts them in `./data/`, and auto-decompresses archives:
```bash
./download.sh💡 Tip: Safe to rerun — it resumes partial downloads and only (re)extracts missing files.
curl -fsSL https://get.greycat.io/install.sh | bash -s stableAdd Greycat to your PATH if needed (the installer prints instructions).
From the project root:
greycat installCreate or edit a .env file in the project root:
# Cache size for Greycat (tune for your machine & dataset size)
GREYCAT_CACHE=8000
# Number of worker threads
GREYCAT_WORKERS=4Guidance
- Increase
GREYCAT_CACHEif you have plenty of RAM. - Set
GREYCAT_WORKERSnear (but not far above) your CPU thread count.
greycat run importThis step reads the decompressed DBpedia files from ./data/ (e.g., .nt, .ttl, etc.) and builds the graph in Greycat’s storage.
Start the local server:
greycat serve --user=1Then open the Explorer UI: 👉 http://localhost:8080/explorer/
If you don’t want to download the full DBpedia dataset, you can use the lightweight demo_data/ folder included in the repo.
To switch:
-
Open
project.gcl. -
Comment out the DBpedia import line:
// TripleStoreService::importDir("./data"); -
Uncomment the demo dataset line:
TripleStoreService::importDir("./demo_data");
Then continue with the import step (greycat run import) — the graph will be built from the demo dataset.
On a machine with 128 CPU and 512 GB RAM, we managed to achieve the following:
Parsed: 82 files
Parsed: 544,919,951 lines
Speed: 431,700.211 lines/s
Duration: 21 minutes
with the following .env:
GREYCAT_CACHE=400000
GREYCAT_WORKERS=20
Verify downloaded files
ls -lh ./data | headPeek inside an RDF N-Triples file
head -n 5 ./data/*.ntCount lines (rough proxy for triple count in .nt)
wc -l ./data/*.nt.
├─ src/ # Greycat triple-store graph database library
├─ data/ # Decompressed DBpedia files here
├─ demo_data/ # Small sample dataset for quick testing
├─ project.gcl # Greycat main entry point (edit for dataset choice)
├─ .env # Greycat settings (cache, workers)
├─ download.sh # Fetches DBpedia core & auto-decompresses into ./data
└─ ...
# Option A: Full DBpedia
./download.sh
curl -fsSL https://get.greycat.io/install.sh | bash -s stable
greycat install
echo -e "GREYCAT_CACHE=400000\nGREYCAT_WORKERS=83" > .env
greycat run import
greycat serve --user=1
# → open http://localhost:8080/explorer/
# Option B: Demo dataset
# (edit project.gcl as described above before import)
curl -fsSL https://get.greycat.io/install.sh | bash -s stable
greycat install
echo -e "GREYCAT_CACHE=400000\nGREYCAT_WORKERS=83" > .env
greycat run import
greycat serve --user=1
# → open http://localhost:8080/explorer/