|
Probably a very simple question: I have multiple RDF file dumps that I want to merge into a single file dump. Thus, what is the easiest way to merge multiple RDF files from the command line, preferrably with I think there must be something more clever that just serializing (by I have searched through |
|
Just concatenating files with NTriples does not work, because blank nodes must not be shared among different RDF graphs. The fasted solution is probably based on serializing to NTriples, renaming blanks, and getting unique NTriple lines. I just wrote my own Perl script, mainly to import RDF data into some Triple store. You can import multiple RDF files into an in-memory store and serialize them afterwards. But there should exist other tools for merging RDF data (?). Edit: rapper could get an additional parameter
Maybe David Beckett is willing to implement such feature, or who wants to dig into the C code? Yes, the simple concatenation does work only in cases you're not using blank nodes. I have also written a small script that loads multiple RDF files into an in-memory RDF store and then serializes them; but, I think, there must be an easier solution. What do you mean by "easier solution"? Writing or extending an NTriple parser that replaces blank-node IDs for each input file should not be that hard - the NTriples-approach is sure faster than loading the RDF into any store. I only wonder that there is no such tool yet. So an easy solution would be if someone implemented it into an existing widespread RDF toolset ;-) By something "easier" I mean something that is already built. Meanwhile, I have already written a simple merge script with an in-memory store (in Python with RDFlib) myself. But I think it would be better if there were a command line tool such as Is the "-x" option available only in newer version of The "-x" option does not exist, it is just a suggestion to implement it in Ahh, I misread the your edit.:-)
showing 5 of 6
show all
|


