i have a data set of different ontologies and i want to extract/get all the classes, properties and any other thing that i can get out of ontology. Is there any method or library available for doing that as there are many ontologies and can't do it manually. Later i need to store that all that data in an excel sheet. Any help in that regard will be appreciated. Thanks
You can install a SPARQL endpoint such as Virtuoso Open Source Edition and upload the data from there:
dbpedia_2014.owl
into a new graph in your SPARQL endpoint.DB.DBA.RDF_GRAPH_USER_PERMS_SET ('mygraph', 'nobody', 1);
as ISQL.Now you can pose any kind of SPARQL query, such as:
A list of classes can be fetched with: select * {?s a owl:Class.}
if they are explicitly modelled as such, select * {{?s a owl:Class.} UNION {?s rdfs:subClassOf ?x.}}
otherwise.
Analogously, a list of properties can be queried with select * {?s a rdf:Property.}
, respectively select * {{?s a rdf:Property.} UNION {?s a owl:ObjectProperty.} UNION {?s a owl:DatatypeProperty.}}
.
If you just want a list of classes and properties, you can also use Protégé, which is much easier to set up.