-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (35 loc) · 1.26 KB
/
Makefile
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
TTLS := ${shell cat open.txt | grep -v open.ttl | grep -v node_modules }
VALIDS := ${shell cat open.txt | grep -v open.ttl | grep -v node_modules | sed -e 's/ttl/txt/' }
JSONS := ${shell ls -1 *.shex | sed -e 's/shex/json/' }
# assumes Groovy >4.0.4 to be installed, see the README
SHEXVALIDATE=groovy validate.groovy
.PRECIOUS: %.json
all: ${JSONS}
open.txt:
@bash fetchData.sh
validation: ${VALIDS}
%.txt: %.ttl
@echo "Validating $<"
@cat $< | rapper -i turtle -t -q - . > /dev/null
clean:
# deletes computed files
@rm -f *.json
@rm -Rf sbd4nano nanosolveit smartnanotox wikidata wp1 wp2 assertions diamonds aop nanocommons vhp4safety ambit nanowiki
distclean: clean
# also deletes downloaded files
@rm -Rf dataset.* wikidata/ wp1/ nanowiki/
%.json: %.shex open.ttl
@echo "Validating the $*s"
@${SHEXVALIDATE} Resource open.ttl $* > $@
open.ttl: ${TTLS} validation
@cat ${TTLS} > open.ttl
statistics:
@echo "Calculating statistics"
@for ttl in ${TTLS}; do \
echo " Running for $$ttl" ; \
roqet -q -r csv dataset_count.rq -D $$ttl | grep "Total" ; \
roqet -q -r csv database_count.rq -D $$ttl | grep "Total" ; \
roqet -q -r csv model_count.rq -D $$ttl | grep "Total" ; \
roqet -q -r csv assertion_count.rq -D $$ttl | grep "Total" ; \
echo -n "" ; \
done