Suppose all the knowledge of the web was integrated into a huge knowledge base so that programs could perform inferences and learn new things.
Right now the web is human-centric. Searches are by keyword, connections are by link.
The Semantic Web will give structure and meaning to the data on the web. The knowledge will be computer accessible as well as human accessible. (semantics = meaning) Not about links between pages, but about relationships between things and properties of things
Software agents will be able to seek out knowledge based on something more sophisticated than key word search. Computers will be able to "understand" web pages, and make inferences. Programs can answer questions using inference, or choose a course of action.
We have a hierarchy of data representations. From bottom to top
The Resource Description Framework (RDF)
Three fundamental properties, resources, properties, and statements.
A resource is identified by a Universal Resource Identifier (URI)
A property may be a URI
An RDF statement expresses meaning. It is a triple, consisting of a subject, a predicate, and an object (aka value). The predicate is an expression of the relationship between or property of the subject and the object.
www.example.com/index.html was written by Suzy Creamcheese
The subject and often the predicate and/or the object are URIs (Uniform Resource Identifiers), strings which uniquely identify an object. URLs are a subset of URIs. Other examples besides web pages are emails, usenet news articles, google search results.
Objects can be either Resources (URIs) or Literals.
A group of RDF triples forms a graph of knowledge.
www.example.com/index.html was written by Suzy Creamcheese
www.example.com/index.html is written in English
www.example.com/index.html was last modified on November 28, 2005
Suzy Creamcheese works for International Widget
International widget is in Troy NY
Such a graph is known as a Semantic Net in the AI world.
Here is a complete, if simple rdf statement
<?xml version=''1.0''?> <rdf:RDF xmlns:rdf=''http://www.w3.org/1999/02/22-rdf-syntax-ns#'' xmlns:cd=''http://www.recshop.fake/cd#''> <rdf:Description rdf:about=''http://www.recshop.fake/cd/Empire Burlesque''> <cd:artist>Bob Dylan</cd:artist> <cd:price>10.90</cd:price> <cd:year>1985</cd:year> </rdf:Description> <rdf:Description rdf:about="http://www.recshop.fake/cd/Hide your heart"> <cd:artist>Bonnie Tyler</cd:artist> <cd:price>9.90</cd:price> <cd:year>1988</cd:year> </rdf:Description> ... </rdf:RDF>
Root is always rdf:RDF
Note that there are two namespaces, one for rdf and one for the specific knowledge base.
The <rdf:Description> element contains the description of the resource identified by the about attribute, which references an existing resource
Within a description element, a Property is the tag and the value (object) is the content. So in the example, artist, price and year are properties of the resource.
A property can also be a resource
<cd:artist rdf:resource="http://www.recshop.fake/cd/dylan" />
There are three types of container elements
rdf:Bag (like a set, an unordered collection) (Example)
rdf:Seq (an ordered collection) (Example
rdf:Alt (choose one from several alternatives)(Example)
RDF schemas (RDFS) provide a framework; that is, vocabularies of resources to use with RDF
rdfs:subPropertyOf rdfs:Class rdfs:type rdfs:subClass rdfs:domain rdfs:range rdfs:Literal rdfs:Container rdf:Bag rdf:Seq rdf:Alt
RQL - RDF Query Language - like SQL, used to make queries of RDF documents
The Web Ontology Language (OWL)
The expresive power of RDF and RDF Schema is deliberatly very limited: RDF is (roughly) limited to binary predicates, and RDF Schema is (roughly) limited to subclass and subproperty hierarchies, with domain and range restrictions of properties.
There are a number of characteristic cases which require more expressiveness than RDF provides. Here are some examples:
OWL was designed as a new standard Web ontology language. It is based on top RDF and RDFS, and seeks to find a balance between expressive power and efficient reasoning support. Reasoning is important because it allows one to
It also allows us to make inferences (i.e. to learn relationships that are not explicitly stated. For example, if x is an instance of class C and C is a subclass of D, the x is an instance of D
There are three levels of OWL, OWL Lite, OWL DL, and OWL Full
Class
rdfs:subClassOf
rdf:Property
rdfs:subPropertyOf
rdfs:domain - limits the individual to which the property can be applied
rdfs:range - limits the values
Individual
equivalentClass
EquivalentProperty
sameAs
differentFrom
AllDifferent
inverseOf
TransitiveProperty
SymmetricProperty
FunctionalProperty
InverseFunctionalProperty
allValuesFrom
someValuesFrom
minCardinality
maxCardinality
Here is an example of an OWL document
<owl:Class rdf:ID="associateProfessor">
<rdfs:subClassOf rdf:resource="#academicStaffMember"/>
</owl:Class>
<owl:Class rdf:about="associateProfessor">
<owl:disjointWith rdf:resource="#professor"/>
<owl:disjointWith rdf:resource="#assistantProfessor"/>
</owl:Class>
<owl:Class rdf:ID="faculty">
<owl:equivalentClass rdf:resource="#academicStaffMember"/>
</owl:Class>
<owl:ObjectProperty rdf:ID="isTaughtBy">
<rdfs:domain rdf:resource="#course"/>
<rdfs:range rdf:resource="#academicStaffMember"/>
<rdfs:subPropertyOf rdf:resource="#involves"/>
</owl:ObjectProperty>
<owl:ObjectProperty rdf:ID="teaches">
<rdfs:range rdf:resource="#course"/>
<rdfs:domain rdf:resource="#academicStaffMember"/>
<owl:inverseOf rdf:resource="#isTaughtBy"/>
</owl:ObjectProperty>
<owl:Class rdf:about="#firstYearCourse">
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="#isTaughtBy"/>
<owl:allValuesFrom rdf:resource="#Professor"/>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
<owl:Class rdf:about="#course">
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="#isTaughtBy"/>
<owl:minCardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:minCardinality>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
<owl:Class rdf:ID="peopleAtUni">
<owl:unionOf rdf:parseType="Collection">
<owl:Class rdf:about="#staffMember"/>
<owl:Class rdf:about="#student"/>
</owl:unionOf>
</owl:Class>
The Dublin Core
A set of predefined properties of documents (Dublin Ohio, 1995)
Contributor
Coverage
Creator
Format
Date
Description
Identifier
Language
Publisher
Relation
Rights
Source
Subject
Title
Type
Here is a Dublin Core example document.
A Scientific American article by Tim Berners-Lee et al which describes the Semantic Web Vision This article kicked off the whole semantic web initative. Read it. Here is a more readable version but without the pictures (which don't add anything).
The official W3C Primer on RDF This is not required reading, but it is an excellent reference if you would like to learn more about the Semantic web.
As always, the W3Schools web site has a wonderful introductory tutorial on rdf Make sure that you read all of it (Intro, Rules, Examples, Elements, Containers, Collections, Schema, Dublin Core, Reference, and OWL).
Here is a very readable and detailed website about the semantic web. It is too long for you to read in detail, but I strongly recommend it.