Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save the rdflib graph as hdt format #3

Open
meisyarahd opened this issue Sep 29, 2020 · 5 comments
Open

Save the rdflib graph as hdt format #3

meisyarahd opened this issue Sep 29, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@meisyarahd
Copy link

Is it possible to load my RDF file with rdflib and convert it into an hdt document, and eventually save it as a file?

@FlorianLudwig
Copy link
Collaborator

Hi @meisyarahd,

this is not supported with RDFLib. The model how rdflib works is incompatible with the unmutable nature of hdt-files. Therefor this is not supported. To convert to hdt you are better served using one of those tools: http://www.rdfhdt.org/downloads/

@white-gecko
Copy link
Member

Wouldn't it be possible to implement it as a serialization, just similar to turtle?

@FlorianLudwig
Copy link
Collaborator

@white-gecko yes, that would be possible.

To be honest, for me this use-case is still not really interesting. Generating hdt is more resource intensive than other formats as it is heavily optimized towards reading - not writing. To generate a hdt the full graph must be sorted. As this is quite memory intensive I would always prefer to use the pure c++ implementation and avoid any overhead to generate the hdt.

And for small graphs - where the overhead does not matter - hdt might not be interesting at all.

This is not meant as a "this is a bad idea" but more as a warning to keep memory usage in mind if someone wants to take this on :)

@mielvds
Copy link

mielvds commented Apr 20, 2021

Can we not merge Callidon/pyHDT#4? I think it's up to the user of RDFlib to think about memory, with probably the exception of threading / multiprocessing.

@Callidon Callidon added the enhancement New feature or request label Feb 28, 2022
@chiarcos
Copy link

As a side-note, I found it relatively easy to integrate HDT-CPP via docker into Python. Just create a turtle tempfile and hand the result over to HDT-CPP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants