Skip to content

dice-group/rdf2k2-cpp

Repository files navigation

rdf2k2-cpp

RDF Compression using k2-trees in C++

Compresses an RDF file to a k2 tree with a HDT Dictionary. Will result into two files DATASET.k2 and DATASET.k2.dict.

Java

For the java version visit https://github.com/dice-group/GraphCompression

Build

First you need to install autoconf and serd

apt-get install autoconf
https://github.com/drobilla/serd
./generateHDTLib.sh # this will generate the HDT files 
./build.sh

The executable will be in build_release/rdf2k2_cpp

Usage

Compression

rdf2k2_cpp -c -tkd2 INPUT_RDF OUTPUT_K2.2

Decompression

You need the INPUT_K2k2 file and the INPUT_K2k2.dict file in the same folder

rdf2k2_cpp -d -kd2 INPUT_K2.k2 OUTPUT_RDF_NTRIPLE

Precompressed Datasets

You can get precompressed datasets at https://hobbitdata.informatik.uni-leipzig.de/rdf2k2/

Troubleshooting

GLIBCXX not found

rdf2k2-cpp/build_release/rdf2k2_cpp: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found 

Install the newest gcc, if the error still happens:

export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64