Skip to content

Support for HDT's with graph names #54

@mightymax

Description

@mightymax

It is possible to create HDT's from quads with a named graph. The Node HDT library does not seem to support his. Would it be possible to add this feature?

Given this RDF (n-quads format) saved as test.nq:

<S> <P> <O> <G> .

I have created a HDT with the hdt-java tool:

rdf2hdt.sh -index  -rdftype nquad ./test.nq ./test.hdt

If I now open this HDT with the Node library:

const hdt = require('hdt');
hdt.fromFile('./test.hdt').then(function(hdtDocument) {
  return hdtDocument.close();
});

The script fails with the following error:

node:internal/process/promises:394
    triggerUncaughtException(err, true /* fromPromise */);
    ^

[Error: Dictionary Implementation not available]

Node.js v22.14.0

The issue is probably caused by the HDT C++ implementation which also does not seem to support HDT's with quads (same error ERROR: Dictionary Implementation not available):

hdtSearch test.hdt

See this issue.

The HDT Java tools can work with Quads/Named Graphs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions