Re: Is there an RDF diff tool?

Hi Jie!

In RDFLib 3, the Python library for RDF, there is a module
(rdflib.compare), which has tools for diff:ing graphs (using an
algorithm by Sean B. Palmer for e.g. comparing bnodes). Take a look at
the documentation (docstrings) in the module for some usage examples:

    <http://code.google.com/p/rdflib/source/browse/trunk/rdflib/compare.py>

It's programmatic usage, but since you get the diffs as graphs, you
can serialize them using the API, e.g.:

    from rdflib import Graph
    from rdflib.compare import to_isomorphic, graph_diff
    # ... use code like in the documentation
    # ...
    print in_both.serialize(format="n3")
    print in_first.serialize(format="n3")
    print in_second.serialize(format="n3")

Best regards,
Niklas



On Sat, Oct 30, 2010 at 5:44 PM, Jie Bao <baojie@gmail.com> wrote:
> Hi
>
> I'm again seeking for help from our really helpful SW list.
>
> I'm looking for a tool, or an online service, that can generate diff
> of two RDF files. That is, by inputing two RDF files, the tool will
> generate another RDF file, containing triples in the first RDF but not
> in the second.
>
> There have been some papers on this topic. I wonder if there is any
> working implementation available.
>
> Again, thanks in advance!
>
> Jie
> -----
> Jie Bao
> Tetherless World Constellation
> Rensselaer Polytechnic Institute
> baojie@cs.rpi.edu
> http://www.cs.rpi.edu/~baojie
>
>

Received on Saturday, 30 October 2010 19:45:14 UTC