If your RDF files represent valid OWL 2 ontologies, you can use the owl2diff tool from owl2vcs.
If you need to do it programmatically, the code is open source. The tool is based on OWL API.
Here is an example of what the tool produces. Not triples, but axioms.
$ owl2diff pizza14.owl pizza15.owl
* OntologyID(<http://www.co-ode.org/ontologies/pizza/pizza.owl>)
- Prefix(daml:=<http://www.daml.org/2001/03/daml+oil#>)
- Prefix(protege:=<http://protege.stanford.edu/plugins/owl/protege#>)
* Prefix(:=<http://www.co-ode.org/ontologies/pizza/2006/07/18/pizza.owl#> <http://www.co-ode.org/ontologies/pizza/pizza.owl#>)
- Prefix(dc:=<http://purl.org/dc/elements/1.1/>)
- Import(<http://protege.stanford.edu/plugins/owl/protege>)
- Annotation(protege:defaultLanguage "en"^^xsd:string)
- Annotation(owl:versionInfo "version 1.4"^^xsd:string)
+ Annotation(owl:versionInfo "version 1.5"^^xsd:string)
+ Annotation(owl:versionInfo "v.1.5. Removed protege.owl import and references. Made ontology URI date-independent"@en)
- AnnotationAssertion(rdfs:comment :SpicyPizzaEquivalent "An alternative definition for the SpicyPizza which does away with needing a definition of SpicyTopping and uses a slightly more complicated restriction: Pizzas that have at least one topping that is both a PizzaTopping and has spiciness hot are members of this class. "@en)
- AnnotationAssertion(rdfs:comment :VegetarianPizzaEquivalent2 "An alternative to VegetarianPizzaEquiv1 that does not require a definition of VegetarianTopping. Perhaps more difficult to maintain. Not equivalent to VegetarianPizza "@en)
- AnnotationAssertion(rdfs:label :GoatsCheeseTopping "CoberturaDeQueijoDeCabra "@pt)
+ ClassAssertion(owl:Thing :France)
+ AnnotationAssertion(rdfs:comment :VegetarianPizzaEquivalent2 "An alternative to VegetarianPizzaEquiv1 that does not require a definition of VegetarianTopping. Perhaps more difficult to maintain. Not equivalent to VegetarianPizza"@en)
+ ClassAssertion(owl:Thing :England)
+ AnnotationAssertion(rdfs:comment :SpicyPizzaEquivalent "An alternative definition for the SpicyPizza which does away with needing a definition of SpicyTopping and uses a slightly more complicated restriction: Pizzas that have at least one topping that is both a PizzaTopping and has spiciness hot are members of this class."@en)
+ ClassAssertion(owl:Thing :Germany)
+ ClassAssertion(owl:Thing :America)
+ AnnotationAssertion(rdfs:label :GoatsCheeseTopping "CoberturaDeQueijoDeCabra"@pt)
+ ClassAssertion(owl:Thing :Italy)
answered
03 Jan, 10:49
utapyngo
1.7k●2●11
accept rate:
18%
Duplicate of: "How to find the diff between RDF dumps?"
http://answers.semanticweb.com/questions/14103/how-to-find-the-diff-between-rdf-dumps
I can't see an answer to one that's not an answer to the other. (Merge?)
Re-opening the question, since it received upvotes and several serious answers within the last 24 hours. Let's wait and see...