Dan Davis kirjoitti 24.11.2017 klo 16:53:
Rdflib has a graph_diff method that returns common, triples, only in left,
only in right.   It is in IsonorpgicGraph class, so it should handle blank
nodes.

Good luck running that on something like Wikidata though. It's far too big to fit in memory.

I'd use N-Triple files (old and new) sorted using the unix command sort, then use diff to determine added and removed triples, and finally turn those into INSERT DATA and DELETE DATA update operations. Assuming there are no blank nodes.

-Osma

(speaking as the author of the current rdflib in-memory store, IOMemory)

--
Osma Suominen
D.Sc. (Tech), Information Systems Specialist
National Library of Finland
P.O. Box 26 (Kaikukatu 4)
00014 HELSINGIN YLIOPISTO
Tel. +358 50 3199529
[email protected]
http://www.nationallibrary.fi

Reply via email to