I am currently using Protege and I was wondering whether it is actually possible to add the inferred triples (by using a reasoner) into an existing RDF file? After getting inferred triples, I would like to add them onto the existing file. Thank you very much.
Asked
Active
Viewed 286 times
1 Answers
1
In the File menu, there's an item Export inferred axioms as ontology. Exactly which inferred statements will be saved is customizable, and you'll be prompted after selecting that menu item. For instance, when starting with this ontology:
@prefix : <http://www.example.org/testExport#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
<http://www.example.org/testExport>
a owl:Ontology .
:Superclass a owl:Class .
:Subclass a owl:Class ;
rdfs:subClassOf :Superclass .
:a a owl:NamedIndividual , :Subclass .
I get this exported information:
@prefix : <http://www.example.org/testExport#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
<http://www.example.org/testExport2>
a owl:Ontology .
:Superclass a owl:Class ;
rdfs:subClassOf owl:Thing ;
owl:disjointWith owl:Nothing . # inferred
:Subclass a owl:Class ;
rdfs:subClassOf :Superclass ;
owl:disjointWith owl:Nothing . # inferred
:a a owl:Thing , # inferred
:Subclass ,
:Superclass , # inferred
owl:NamedIndividual .

Joshua Taylor
- 84,998
- 9
- 154
- 353