The following instructions build an index from our Scientists Example Knowledge Base.
Note: If you experience an error check the troubleshooting document for known issues such as problems with Docker on Mac.
git clone --recursive https://github.com/ad-freiburg/QLever.git qlever
cd qlever
docker build -t qlever .
wget http://qlever.cs.uni-freiburg.de/data/scientist-collection.zip
unzip -j scientist-collection.zip -d scientists
docker run -it --rm \
-v "$(pwd)/scientists:/input" \
-v "$(pwd)/index:/index" --entrypoint "bash" qlever
qlever@xyz:/app$ IndexBuilderMain -l -i /index/scientists \
-f /input/scientists.nt \
-w /input/scientists.wordsfile.tsv \
-d /input/scientists.docsfile.tsv
qlever@xyz:/app$ exit
docker run -it -p 7001:7001 \
-v "$(pwd)/index:/index" \
-e INDEX_PREFIX=scientists \
--name qlever \
qlever
Then open http://localhost:7001/ in your browser.
For example, all female scientists occuring in the text corpus with the regex "algo.*" can be obtained with the following query
SELECT ?x TEXT(?t) SCORE(?t) WHERE {
?x <is-a> <Scientist> .
?x <Gender> <Female> .
?t ql:contains-entity ?x .
?t ql:contains-word "algo*"
}
ORDER BY DESC(SCORE(?t))