-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
65 lines (37 loc) · 1.67 KB
/
README
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
HENRY (N3 parser and reasoner for SWI-Prolog)
------------------------------------------------
Warning: This is code I've written as part of my PhD thesis
and haven't touched since 2007. The only changes I made were to make
it work with recent SWI-Prolog (> 6.0.0). This was imported
from http://code.google.com/p/km-rdf/.
First:
* Where does this name come from?
- From Chris Sutton (http://sonictruths.net) - thanks Chris!
Install:
* Make sure you have SWI-Prolog installed:
http://www.swi-prolog.org/
* If you want to query your N3-entailed store
using SPARQL, get SeRQL from:
http://e-culture.multimedian.nl/software/ClioPatria.shtml
And put the SeRQL directory in the Henry directory.
Use:
* The swicwm.pl script behaves (almost) like the following command
line, involving CWM (http://www.w3.org/2000/10/swap/doc/cwm.html):
$ cwm $1 --think --rdf --data
Example use:
$ ./swicwm.pl examples/family.n3
* You can create a SPARQL end-point on top of N3 documents by using the
henry.pl script. Make you sure you installed SeRQL, as described above.
* From the Prolog command-line, you need to load entailment.pl:
?- [entailment].
You can then load some n3 files using:
?- n3_load('file.n3').
Or some RDF (XML or turtle) files using:
?- rdf_load('file.rdf').
Then, you can compile the N3 rules you have in store using:
?- compile_all.
Then, the derived statements are accessible through:
?- entailment:rdf(Subject,Predicate,Object).
* This same module can be used as an entailment module in ClioPatria,
which is what the 'henry.pl' script does. Giving access to the
N3 entailments through SPARQL.