/henry

A SWI-Prolog N3 parser/reasoner

Primary LanguagePrologGNU General Public License v2.0GPL-2.0

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.