WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

DeciSym/rdf2hdt

Repository files navigation

Latest Version Lint Build Documentation

rdf2hdt

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.

Installation

Install rdf2hdt with cargo:

cargo install rdf2hdt

Usage

The 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')

Using the build_hdt library

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",
)?;

License

This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.

About

rdf2hdt converter library

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •