forked from ad-freiburg/qlever
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquickstart.md.DEPRECATED
49 lines (37 loc) · 1.49 KB
/
quickstart.md.DEPRECATED
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Quickstart
The following instructions build an index from our Scientists Example Knowledge
Base.
**Note:** If you experience an error check the [troubleshooting](./troubleshooting.md) document
for known issues such as problems with Docker on Mac.
## Download and build QLever using `docker`
git clone --recursive https://github.com/ad-freiburg/QLever.git qlever
cd qlever
docker build -t qlever .
## Download the example Knowledge Base
wget http://qlever.cs.uni-freiburg.de/data/scientist-collection.zip
unzip -j scientist-collection.zip -d scientists
## Build a QLever Index
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
## Run QLever
docker run -it -p 7001:7001 \
-v "$(pwd)/index:/index" \
-e INDEX_PREFIX=scientists \
--name qlever \
qlever
Then open [http://localhost:7001/](http://localhost:7001/) in your browser.
For example, all female scientists occurring 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))