270 likes | 447 Views
Basic Principles of Semantic Web. Besnik Fetahu. What is Semantic Web?. The main vision of the inventor of the web Tim Berners-Lee was [1] :
E N D
Basic Principles of Semantic Web Besnik Fetahu
What is Semantic Web? • The main vision of the inventor of the web Tim Berners-Lee was [1]: I have a dream for the Web [in which computers] become capable of analyzing all the data on the Web – the content, links, and transactions between people and computers. A ‘Semantic Web’, which should make this possible, has yet to emerge, but when it does, the day-to-day mechanisms of trade, bureaucracy and our daily lives will be handled by machines talking to machines. The ‘intelligent agents’ people have touted for ages will finally materialize. Tim Berners-Lee, 1999
What is Semantic Web? Fig.1. Semantic Web Framework
URI – Uniform Resource Identifier • URI can be as: • URL – Uniform Resource Locator • URN – Uniform Resource Name
XML – Extensible Markup Language • XML was designed as an option to send documents easier across the web, it is considered an extensible language because it allows the user to define the mark-up elements. <sentence><person href="http://aaronsw.com">I</person> just got a new pet <animal type="dog" ref="http://aaronsw.com/myDog">dog</animal>.</sentence>
XML – Extensible Markup Language • Problems with the name of elements. • Uniquely identify element names using XML namespaces. <sentence xmlns="http://example.org/xml/documents/" xmlns:c="http://animals.example.net/xmlns/"> <c: person c:href="http://aaronsw.com/">I</c:person> just got a new pet <c:animal>dog</c:animal>.</sentence>
RDF – Resource Description Framework • Important layer of Semantic Web. • Created by triple element blocks • Object – Attribute – Value: O(A;V) • Other notation: : [O]_A![V] • Objects, and values can be interchanged.
RDF – Resource Description Framework • hasName (‘http://www.famouswriters.org/twain/mark’, "Mark Twain") • hasWritten (‘http://www.famouswriters.org/twain/mark’, ‘http://www.books.org/ISBN0001047582’) • title (‘http://www.books.org/ISBN0001047582’, "The Adventures of Tom Sawyer")
RDF – Resource Description Framework • RDF also uses XML syntax for describing relations among these triple objects: <rdf:Description rdf:about="http://www.famouswriters.org/twain/mark"> <s:hasName>Mark Twain</s:hasName> <s:hasWritten rdf:resource="http://www.books.org/ISBN0001047582"/> </rdf:Description> <rdf:Description rdf:about="http://www.books.org/ISBN0001047582"> <s:title>The Adventures of Tom Sawyer</s:title> <rdf:type rdf:resource="http://www.description.org/schema#Book"/> </rdf:Description>
RDFS – RDF Schema • RDF Schema is a mechanism that lets developers specify a vocabulary for RDF data and specify objects that can be applied to a particular attribute. About RDF Schema we can think about as a simple data typing model for RDF, this lets us create classes and properties with which we can describe very clearly the triple objects. • RDF Schema starts with: http://www.w3.org/2000/01/rdf-schema#
RDFS – RDF Schema • :Book rdf:type rdfs:Class . • :bookTitle rdf:type rdf:Property . • :bookTitle rdfs:domain :Book . • :bookTitle rdfs:range rdfs:Literal . • :MyBook rdf:type :Book . • :MyBook :bookTitle "My Book" .
RDFS – RDF Schema Fig.5. Defining vocabulary and class hierarchy
RDFS – RDF Schema • Now in the framework we have included three layers: • XML – which defines the syntactic layer • RDF – which defines the structure layer using triple objects • RDFS – which defines the semantic layer, using classes, properties and organizing all these in a hierarchical manner.
Ontology, Inferences and DAML • Ontology: used to describe a world that consists of types, properties, relationships … etc • Ontology components in computer science are described using ontology languages like: • CycL • Dogma (Developing Ontology-Grounded Methods and Applications) • F-Logic (Frame Logic) • KIF (Knowledge Interchange Format) • KL-ONE
Ontology, Inferences and DAML • Markup language, that use markup schema to encode knowledge: • DAML + OIL • Ontology Inference Layer (OIL) • Web Ontology Language (WOL) • Resource Description Framework • RDF Schema • SHOE
Ontology, Inferences and DAML • Components included: • Individuals • Classes • Attributes • Relations • Function terms • Restrictions • Rules • Axioms • Events
DAML + OIL • DAML+OIL is an ontology language, it is used to describe the structure of a domain, the structure is described using classes and properties. • DAML + OIL also uses axioms in order to present equivalencies and assertions.
DAML + OIL • DAML + OIL triples can be represented in different syntactic forms. It assigns for each triple of RDF a specific meaning. DAML+OIL only provides a semantic interpretation for those parts of an RDF graph that instantiate the schema
DAML + OIL • Ontology uses axioms to assert facts about classes like describing what it presents, e.g.: <daml:Class rdf:ID="Animal"/> <daml:Class rdf:ID="Man"> <rdfs:subClassOf rdf:resource="#Person"/> <rdfs:subClassOf rdf:resource="#Male"/> </daml:Class>
DAML + OIL • DAML provides methods of creating inverse properties, unambiguous properties, lists, restrictions etc. • An example of these inverse properties: :hasName daml:inverseOf :isNameOf :Sean :hasName "Sean“ "Sean" :isNameOf :Sean
Inference • The principle of "inference" is quite a simple, being able to derive new data from data that you already know • :MyCar de:macht "160KW“ • de:macht daml:equivalentTo en:power • :MyCar de:power “160KW”
Logic • For the Semantic Web to become expressive enough we have to create a very powerful logical language in order to make inferences. • There is a logical language that is currently in use by the semantic web Webized version of KIF (Knowledge Interchange Format).
Logic { { :Joe :loves :TheSimpsons } a log:Falsehood . { :Joe :is :Nuts } a log:Falsehood .} a log:Falsehood . • This can be read as “it is not true that Joe does not love The Simpsons and is not nuts”.
Trust and Proof • This is the layer in which very little is done. • This has to do with information provided by different sources • source a) states that “x is blue” • source b) states that “x is red”
Context • The future applications on the semantic web will depend on context of the information to decide whether they trust or not the data. This is for example I receive information from a trustable source which he made some claims about the data, and because I know him I also trust that claim.
Proof Languages • Proof languages are just languages used to verify the correctness of a statement. An instance of proof language generally consists of inference items that are used to derive the information into a question, and the trust of each of these items can be checked. • For example if we have a statement to prove that “Joe loves Mary”, and we have the items like “:Joe :loves :MSJ” and another item that uses daml to state that “:MSJ dam:equivalentTo :Mary”, and for these items we’ve got the checksums in order to verify the correctness of information.
Proof Languages • Notation3: @prefix : <http://infomesh.net/2001/proofexample/#> . @prefix p: <http://www.w3.org/2001/07/imaginary-proof-ontology#> . @prefix log: <http://www.w3.org/2000/10/swap/log#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . p:ProvenTruth rdfs:subClassOflog:Truth . # Proof { { <a.n3> p:checksum <md5:blargh>; log:resolvesTo [ log:includes { :Joe :loves :MJS } ] } log:implies { :Step1 a p:Success } } a log:Truth . { { <b.n3> p:checksum <md5:test>; log:resolvesTo [ log:includes { :MJS = :Mary } ] } log:implies { :Step2 a p:Success } } a log:Truth . { { :Step1 a p:Success . :Step2 a p:Success } log:implies { { :Joe :loves :Mary } a p:ProvenTruth } } a log:Truth