Home » Vocabularies » Schema.org
Category Archives: Schema.org
The difference between Schema.org and OWL
In this blog post I describe some of the main differences between Schema.org vocabularies and OWL ontologies, the implications of these differences and the kind of steps you will need to take to translate Schema.org vocabularies to OWL ontologies.
Overall I keep this discussion at a high-level. For in-depth reviews of the differences between Schema.org and OWL I provide relevant links at the end of this post.
Key differences
There are 2 main differences between OWL and Schema.org.
- Intended purpose: The primary purpose of Schema.org is to enable sharing of structured data on the internet. The primary purpose of OWL is to enable sophisticated reasoning across the structure of your data.
- Difference in language: Due to the difference in purpose, there are substantial differences in language. The main reason being that the language for OWL can be translated into precise mathematical logic axioms, which allows for much richer inferences to be drawn. This is the reason for OWL preferring
rdfs:domain/rdfs:range
toschema:domainIncludes/schema:rangeIncludes
. The benefit of usingrdfs:domain/rdfs:range
is that they have precise defined mathematical logic meaning, whereasschema:domainIncludes/schema:rangeIncludes
do not have mathematical meaning.
What does this mean?
Using Schema.org you could draw some limited inferences. For example a reasoner can determine that the SNOMED concept http://purl.bioontology.org/ontology/SNOMEDCT/116154003
is a schema:Patient
which is a schema:Person
. But the language used in Schema.org by itself is not rich enough to detect inconsistencies. I.e., there is no way to say that schema:Person
is disjoint from schema:Product
. This allows for stating myexample:john a schema:Person
and myexample:john a schema:Product
without a reasoner being able to detect the inconsistency. Using OWL it is possible to state that schema:Person
and schema:Product
are disjoint.
Does this mean you should prefer OWL to Schema.org? No, not if your intended purpose of your ontology is to share data. Then it is best to use concepts from Schema.org and add the axioms that will provide the inferences you need. If reasoning is not your reason for wanting to use Schema.org/OWL, then just use Schema.org.
Can you translate Schema.org to OWL?
Strictly speaking, since RDF & RDFS is a subset of OWL, Schema.org is an OWL definition already, albeit one with limited reasoning capability. Any “translation” to OWL will mean adding axioms to Schema.org to increase the inferences that can be drawn from Schema.org documents. It is a pity that Schema.org does not (the current link to the OWL file is dead) provide an OWL file with the additional axioms that will enable richer reasoning.
- Add
rdfs:domain
andrdfs:range
restrictions rather than replacingschema:domainIncludes
andschema:rangeIncludes
. Replacingschema:domainIncludes
andschema:rangeIncludes
could result in search engines not finding information. - Add
owl:disjointWith
andowl:disjointObjectProperties
respectively for all classes and properties that do not share individuals. - By looking at the documentation of Schema.org it gives the impression that classes have attributes. I.e.,
schema:Person
has an attributeschema:givenName
. However, there is nothing in the definition ofschema:Person
that enforces that theschema:Person
class must have aschema:givenName
attribute. I describe here, here and here how to define “attributes” for classes in a way that can be used by OWL reasoners.
Conclusion
Schema.org is mainly for sharing structured data on the Internet. OWL is used mainly to reason over structured data to determine inconsistencies in the schema.
For in-depth discussions on the differences between Schema.org and OWL I highly recommend reading the papers by Patel-Schneider and Hernich et al.