Library for converting RDF data to HDT
This is a Rust-based tool that converts RDF data into HDT format. It uses the oxrdfio crate for RDF parsing and conversion,
and then generates and saves the data as HDT. Implementation is based on the HDT specification
and the output HDT is intended to be consumed by one of hdt crate, hdt-cpp,
or hdt-java.
Install rdf2hdt with cargo:
cargo install rdf2hdtThe rdf2hdt CLI tool is used for generating HDT files from RDF input data.
$ rdf2hdt convert --help
Convert RDF to HDT.
The `convert` command parses RDF files, converts it to RDF triples using `oxrdfio` for parsing and conversion, and then generates and saves the data as HDT.
Usage: rdf2hdt convert [OPTIONS] --output <OUTPUT>
Options:
-i, --input <INPUT>...
Path to input RDF file(s).
Provide the path to one or more RDF files that will be parsed and converted. Support file formats: https://crates.io/crates/oxrdfio
-o, --output <OUTPUT>
Path to output file.
Specify the path to save the generated HDT.
-v, --verbose...
Increase logging verbosity
-q, --quiet...
Decrease logging verbosity
-h, --help
Print help (see a summary with '-h')HDT files can be generated directly in Rust.
use rdf2hdt::hdt::buld_hdt;
let result = build_hdt(
vec!["tests/resources/apple.ttl".to_string()],
"output.hdt",
)?;This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.