How to save and load rdf indexes into/from a file?

I’m using: SWI-Prolog version 2.1.22

I want the code to:

I am using library(semweb/rdf_litindex) to create customized rdf indexes. I would like to pre-generate these index maps and save them into a file and reload them at start at run-time.

How to accomplish this?

Thanks,

Nan

See: library(persistency): Provide persistent dynamic predicates.

This post which while not perfect is the most refined example I know


Also see: Quick load files

Hi Eric,

Thank you so much for the quick response.

my understanding is that library(persistency) will persist rdf/3 and rdf/4 only not the literal index map. I am looking to persist the literal index map and able to reload it.

Nan

Thanks for the update. I have never used library(persistency) with rdf/3 and rdf/4 so I can’t say.

I don’t plan to try, but if you do and have problems, I won’t run away, but can’t promise I can be of much help.

There is no support for that. Unless one uses some smart binary format, to save the maps there is probably not that much to gain with save/reload vs recompute.

1 Like