Semantic Web
Now imagine that all the information on the World Wide Web (about bicycles and everything else), currently locked away in a series of unrelated HTML files, was somehow organized and linked in such a way as to be processable by computer applications. These computer applications could wade through the mountains of information available and present to you the specific information you require, in the format you desire. This is the vision of what people call The Semantic Web.
Going back to the bicycle example, this time using a Semantic Web browser (which does not exist yet, by the way), you specify the following criteria for the bicycle you want to buy:
- Road bicycle (as opposed to a mountain, recreational, BMX or child's bicycle)
- Price range
- Gender (some bicycle are built especially for women, for example)
- Height and weight (so that the bicycle is suitable for your body size)
- Your address and a maximum distance radius that you are prepared to travel to visit a bicycle shop
Alternatively, you could order on-line, but it is recommended that you do test rides before you buy.
- The color red (nice, but not essential)
Your Semantic Web browser returns for you:
- A list of bicycles that meet your requirements (type, price, gender, size and color) along with full specifications, recommended retail prices and pictures to view
- A list of bicycle shops (within your specified distance radius) that sell the above bicycles, their advertised prices, whether the bicycles are currently in stock, and address and contact details
- Directions on how to get to each of the shops from your address
How did the Semantic Web browser determine all this? First of all, the available information was organized and categorized in such a way as to be computer application processable. Secondly, using rules associated with the information, and the criteria you specified, inferences were made to determine the information to present to you.
Elements of the Semantic Web
How is data on the Semantic Web linked and organized? What are the rules and how are they specified?
All data on the Semantic Web is described using (among other things) Classes, SubClasses, Properties and Subproperties. How classes and properties fit together is described using Ranges and Domains.
Classes
Classes refer to a type or a category of something. Classes that are a subset of one or more classes are called subclasses. Individual resources that belong to a class are called instances of that class. Instances of a class, which is a subclass of another class, are automatically instances of the higher level class.
Using the bicycle example again, we have the following definitions:
- Four classes:
HumanPoweredVehicle
,Bicycle
,RoadBicycle
andMountatinBicycle
- The
Bicycle
class is a subclass of theHumanPoweredVehicle
class - The
RoadBicycle
andMountainBicycle
classes are subclasses of theBicycle
class
Automatically, without any further definitions, we know that all instances of the RoadBicycle
class also belong to the Bicycle
class and the HumanPoweredVehicle
class.
This is an example of inferencing. Knowing that a resource belongs to a class, which is a subclass of another class, we can deduce, or infer, that the resource also belongs to the higher level class.
Properties
Now that we have classes of things, we need to be able to describe them. Properties are the characteristics, or descriptions, of classes. Properties of high level classes also apply to all subclasses of the class.
Ranges
The values a property can have are specified using Ranges. Properties can have zero or more ranges (where ranges are in fact defined as classes).
For example, we have the following definitions:
- A property of
Color
- Three classes:
Red
,White
andBlue
In order to specify the possible values for the Color
property (red, white or blue), we define that the:
Color
property has range ofRed
classColor
property has range ofWhite
classColor
property has range ofBlue
class
Domains
Properties are assigned to classes using Domains.
For example, to assign the Color
property to the Bicycle
class, we define that the Color
property is in the domain of the Bicycle
class. That is, bicycles have color.
Based on the above range and domain definitions, we have stated that all bicycles have color, and the color can be red, white or blue. From this, we can infer that all bicycles (road and mountain bicycles) come in three colors and three colors only: red, white and blue.
Note - There are no definitions regarding the other types of human powered vehicles besides bicycles. With no rules specified, we can not make any inferences about the color, for example, of row boats, kayaks or any other instances of the HumanPoweredVehicle
class.
Additional Features for Describing Classes and Properties
There are many other features used in inferencing, some of which include:
- Equivalent classes. That is, where two classes are equivalent, the instances of one class are also instances of the other, and vice versa.
For example, the
Bicycle
andTwoWheeledHumanPoweredVehicle
classes are equivalent, and the instances of one class are automatically instances of the other. - Equivalent properties. That is, where two properties are equivalent, an instance of a class with a property also has the equivalent property.
For example,
BicycleSize
andFrameSize
are equivalent properties. An instance of theBicycle
class has aBicycleSize
property, and from this you can infer that the instance also has theFrameSize
property. - Cardinality. That is, the number of values for a property associated with a class.
For example, if the
Color
property has a minimum Cardinality of one with respect to theBicycle
class, then you can infer that all bicycles must have at least one color. They might have two, three or more colors, but they must have at least one.If the
Color
property has a maximum Cardinality of one with respect to theBicycle
class, then you can infer that all bicycles must have only one color.
Implementing Inferencing
The Semantic Web and inferencing is implemented using the features of the following languages:
- RDF (Resource Description Framework). Originally developed by the World-Wide Web Consortium (W3C) as a standard way of describing resources on the Web. As well as resources on the Web, RDF can be used to describe resources that could be on the Web. This means that for any resource (such as a person, a bicycle, or even a concept), whether it exists on the Web or not, provided it can be identified as being on the Web, it can be described using RDF.
- RDF Schema (or RDFS). Provides the vocabulary for defining and describing classes and properties with regards to RDF.
- OWL (Web Ontology Language). Extends the RDFS vocabulary for describing classes and properties, including relationships between classes and properties, equality and inequality, and cardinality.
The intent of this document is only to introduce the concept of inferencing. If you want to know more about inferencing and other Semantic Web related topics, the Semantic Web Best Practices and Deployment Working Group's Semantic Web Tutorials site provides many links to RDF, OWL, SOFA and other sources of information.