Header Dictionary Triples (HDT) for SWI-Prolog

This repository is work in progress to provide access to HDT files from SWI-Prolog based on the C++ library for these files.

HDT files form a natural addition to SWI-Prolog's memory based RDF store to access large amounts of static background knowledge without enlarging the memory footprint.

This repository is organised as a SWI-Prolog pack. To install it, perform the steps below. Tested on Ubuntu Linux. Should work on most Unix-like machines. Installation on Windows requires more creativity.

  1. Clone this repository in your SWI-Prolog pack directory, typically `~/lib/swipl/pack` and install it:

    a. Clone this pack:

    $ git clone https://github.com/JanWielemaker/hdt4swipl hdt

    b. Install the prerequisite libraries. On Ubuntu:

    sudo apt-get install libserd-dev libraptor-dev

    c. Start SWI-Prolog and run

    ?- pack_rebuild(hdt).

If all worked out, you can now use ?- use_module(library(hdt)). to load the library. Please example the comments there to understand the interface.


Usable, but still experimental.

Prolog files

hdt-cpp/hdt-it/hdt-it.proShow source
hdt-cpp/hdt-lib/qmake/hdt-lib.proShow source
hdt-cpp/hdt-lib/qmake/tools/hdtsearch/hdtsearch.proShow source
hdt-cpp/hdt-lib/qmake/tools/rdf2hdt/rdf2hdt.proShow source
hdt-cpp/hdt-lib/qmake/tools/tools.proShow source
hdt-cpp/libcds-v1.0.12/qmake/libcds.proShow source
pack.plShow source
prolog/hdt.pl  -- Access HDT (Header Dictionary Triples) filesShow source
test/test.plShow source