The document introduces the Semantic Web and the key technologies that enable it, including RDF, RDF Schema, OWL, and SPARQL. RDF allows for describing resources and relationships between them using triples. RDF Schema extends RDF with a vocabulary for describing properties and classes of resources. OWL builds on RDF and RDF Schema to provide additional expressive power for defining complex ontologies. SPARQL is a query language for retrieving and manipulating data stored in RDF format. These technologies work together to transform the existing web of documents into a web of linked data that can be processed automatically by machines.
1. Introduction toSemantic Web Jose Emilio Labra Gayo University of Oviedo, Spain http://www.di.uniovi.es/~labra
2. The current Web Current Web = the biggest repository of information ever compiled by Humanity Designed for direct human consumption Lots of information available in: Natural Language in HTML English, Spanish, Chinese, Italian, etc. More and More multimedia Images, audio, video, etc. Too much data, not enough knowledge
7. Difficult queries Different languages Multimedia Combine different travel data Example: Travel from Oviedo to Rome Complex questions Example: Asturian people who play soccer
10. …href http://chemistry.uniovi.es Faculty of Chemistry Location Staff … href Location… … … href Unit of information = HTML Page Links are syntactic = href Staff … … href
11. The Semantic Web Data and semantic links School of Computer Engineering http://euitio.uniovi.es r:name 23 r:contains r:author r:age http://uniovi.es Mary Jordan r:name r:name r:contains University of Oviedo http://chemistry.uniovi.es Faculty of Chemistry r:name Unit of information = Data Links are semantic = Properties identified by URI
12. The semantic web The Semantic Web = Web of Data A vision of the web where data is published and can be linked with other data Goals: Reuse data Automate tasks Tim Berners Lee, inventor of the WWW
13. Features of the Web Non-centralized The information may not be consistent Dynamic information Data may change (or servers can fail) Lots of information The system cannot try to capture all the data Open system More information can appear in the future
14. Towards the Semantic Web Trust Digital Signature Proof Unifying Logic Query: SPARQL Ontologies OWL Rules RIF RDF Schema RDF XML URI Unicode Semantic web layer cake, by Tim Berners Lee
15. RDF Resource Description Framework (1998) Description of resources Resources = entities identified by URI Binary Relationships between resources Property = global name of the relationship (URI) Subject Predicate Object
16. RDF Triples Subject A resource identified by URI Can also be a blank node (bNode) Predicate Global Property identified by URI Object Value of property Can be URI, Literal or bNode
17. RDF Graph Model Can be represented in N-Triples @prefix r: <http://example.org#> . <http://euitio.uniovi.es> r:hasPicture <http://pictures.org/p1.jpg>. <http://euitio.uniovi.es> r:name "School of Computer Engineering". <http://pictures.org/p1.jpg> r:subject r:Building . r:Building r:hasPicture http://pictures.org/p1.jpg r:subject http://euitio.uniovi.es School of Computer Engineering r:name URIs are usually abbreviated using namespace declarations
18. RDF is Compositional graph3.rdf graph2.rdf r:subject r:Building http://euitio.uniovi.es r:contains http://pictures.org/p2.jpg University of Oviedo r:hasPicture http://uniovi.es r:name http://chemistry.uniovi.es r:contains r:name http://chemistry.uniovi.es Faculty of Chemistry RDF graphs can be composed graph1.rdf r:Building r:hasPicture http://pictures.org/p1.jpg r:subject http://euitio.uniovi.es School of Computer Engineering r:name
19. RDF is Compositional RDF graphs can be composed graph1.rdf + graph2.rdf+ graph3.rdf r:hasPicture http://pictures.org/p1.jpg r:subject School of Computer Engineering r:Building http://euitio.uniovi.es r:name r:subject r:contains http://pictures.org/p2.jpg University of Oviedo r:hasPicture http://uniovi.es r:name http://chemistry.uniovi.es r:contains r:name Faculty of Chemistry
20. Blank Nodes in RDF Blank nodes are represented as _:number in N-Triples <http://euitio.uniovi.es> r:author _:1 . <http://euitio.uniovi.es> r:author _:2 . _:1 r:name “John Smith” . _:2 r:age “23”^^xsd:positiveInteger . _:2 r:name “Mary Jordan” . Blank nodes are used to identify things that have no URI Example: The author of a web page is a person, not a URI r:name John Smith r:author r:age http://euitio.uniovi.es 23 r:author Mary Jordan r:name
21. Tables in RDF RDF can model relational databases r:firstName John r:lastName _:1 Smith r:nodes r:age _:0 25 r:next r:firstName Mary _:2 r:lastName Jordan r:age 23
22. RDF serialization formats There are several formats to represent RDF data: N3 RDF/XML N-Triples Turtle etc.
23. RDF Data Lots of information is currently published in RDF Some examples: DBPedia offers RDF triples of more than 80,000 persons, 293,000 places, 62,000 music albums, 36,000 films, etc.
26. Benefits of RDF RDF enables better integration of data Transform the Web from fileserver to database Linking open data Expose open datasets in RDF Set links among the data of those datasets Set up query endpoints Altogether billions of triples, millions of links
29. RDF Schema Example r:Person r:Teacher rdfs:subClassOf rdfs:range r:Teacher r:hasTeacher Meaning: if x rdf:type r:Teacher then x rdf:type r:Person Meaning: if X r:hasTeacher Y then Y rdf:type r:Teacher
31. SPARQL Simple Protocol and RDF Query Language Query languagefor the semantic web Graph matching language Extracts information from RDF models A protocol Defines a way of invoking a service WSDL description file HTTP and SOAP bindings It also defines an XML vocabulary for results
32. SPARQL Example prefix r: <http://example.org#> select ?n where { ?p r:subject r:Building. ?x r:hasPicture ?p . ?x r:name ?n . } “Find names of resources who have a picture whose subject is Building”
33. SPARQL example r:subject r:Building r:hasPicture ?p ?x r:name ?n ?p ?n ?x ?p Results School of Computer Engineering ?x ?n r:subject http://pictures.org/p1 r:Building r:hasPicture School of Computer Engineering r:subject r:name http://euitio.uniovi.es http://pictures.org/p2. r:contains University of Oviedo http://uniovi.es r:name r:hasPicture http://chemistry.uniovi.es r:contains r:name Faculty of Chemistry Faculty of Chemistry select ?n where { ?p r:subject r:Building. ?x r:hasPicture ?p . ?x r:name ?n . }
34. SPARQL & Inference The RDF Graph may be obtained by inference rdf:type Results Mary Jordan select ?n where { ?x rdf:type r:Person. ?x r:name ?n . } r:Teacher rdf:type rdfs:subClassOf r:name r:Person Mary Jordan
35. SPARQL More features Limitthe number of returned results; remove duplicates, sort them, … Optional subpatterns (match if possible…) Specify several data sources within the query Construct a graph combining a separate pattern and the query results, or simply askwhether a pattern matches Use datatypes and/or language tags when matching a pattern
36. Obtaining RDF SPARQL Endpoints offer an integration mechanism Big RDF datasets accesible to applications Example: DBPedia Nowadays Data is mostly in Databases It is not feasible to convert all databases to RDF More practical to convert on the fly Several systems: Oracle 11g, Sesame, …
37. RDF and HTML Problems to embed RDF/XML in (x)HTML It can be linked from an HTML page There are some “scrappers” to extract the structure of web pages and dynamically generate RDF Can be a solution for legacy web content Not very elegant 2 proposals for a more systematic way: GRDDL RDFa
39. RDFa RDFa defines attributes to add meta-data to HTML elements Similar to microformats cal:Event rdf:type cal:location meetingBcn Barcelona cal:dtstart 20070508T1000+0200 <html xmlns:cal="http://www.w3.org/2002/12/cal/ical#"> … <body> <p class="cal:Event" about="#meetingBcn"> I will attend a meeting in <span property="cal:location">Barcelona</span>, on <span property="cal:dtstart" content="20070508T1000+0200"> May 8th at 10am </span> </p> ... </body> </html>
40. Ontologies RDFS does not solve all requirements Applications need more expressivity and reasoning In RDFS, it is not possible to create new subclasses OWL (Web Ontology Language) offers a common language to define ontologies
41. What is an Ontology? A model of (some aspect of) the world
42. What is an Ontology? A model of (some aspect of) the world Introduces vocabularyrelevant to domain, e.g.: Anatomy
43. What is an Ontology? A model of (some aspect of) the world Introduces vocabularyrelevant to domain, e.g.: Anatomy Cellular biology
44. What is an Ontology? A model of (some aspect of) the world Introduces vocabularyrelevant to domain, e.g.: Anatomy Cellular biology Aerospace
45. What is an Ontology? A model of (some aspect of) the world Introduces vocabularyrelevant to domain, e.g.: Anatomy Cellular biology Aerospace Dogs
46. What is an Ontology? A model of (some aspect of) the world Introduces vocabularyrelevant to domain, e.g.: Anatomy Cellular biology Aerospace Dogs Hotdogs …
47. What is an Ontology? A model of (some aspect of) the world Introduces vocabularyrelevant to domain Specifies meaning of terms Heartis amuscular organ thatis part of the circulatory system
48. What is an Ontology? A model of (some aspect of) the world Introduces vocabularyrelevant to domain Specifies meaning of terms Heartis amuscular organ thatis part of the circulatory system Formalised using suitable logic
49. OWL OWL enables the description of new classes By enumeration Through intersection, union, complement Through property restrictions It is based on Description Logics Well defined semantics A subset of Predicate Logic Limited use of variables Binary predicates = Properties Unary predicates = Classes
50. OWL: Classes by enumeration Example: “The European Union is formed by Italy, France, Germany, etc.” EUCountry = { Italy, France, Germany, … } #Italy #France #EUCountry oneOf #Germany …
51. OWL: Set theoretic definitions Example: A person is a man or a woman Person = Man Woman #Man #Person unionOf #Woman It also has IntersectionOf and complementOf
52. OWL: Property restrictions It is possible to define new classes by restricting the property values of some class Reasoner acts as a classifier
53. OWL: Property restrictions Value constraints some () value must be from a class all () values must be from a class Example: “An european is a person who has nationality from a European Union country” European Person hasNationality EUCountry hasNationality(#Sergio, #Italy) Person(#Sergio) inference European(#Sergio) x (European(x) Person(x) y (hasNationality(x,y) EUCountry(y))
54. OWL: Property restrictions Cardinality constraints (ie, how many times the property is used on an instance?) exact cardinality minimum cardinality maximum cardinality Person hasFather = 1 x (Person(x) y (hasFather(x,y) z (hasFather(x,z) z = y)))
55. OWL: Property characterizations It is possible to characterize the behaviour of properties: Symmetric, transitive, functional, inverse functional, … transitive(isPartOf) inference isPartOf(#Rome,#Europe) isPartOf(#Rome, #Italy) isPartOf(#Italy, #Europe)
56. OWL: Datatype properties Properties whose range are typed literals Example: age datatypeProperty(#age) range(#age, xsd:positiveInteger) CanVote Person age > “18” inference CanVote(#Sergio) Person(#Sergio) age(#Sergio, 20)
57. OWL and Unique Name Assumption Web = Open System 2 different URIs could identify the same object OWL does not support Unique Name Assumption There is no error in the model It infers that #williamand#Billare the same Person hasFather = 1 hasFather(#Peter, #William) hasFather(#Peter, #Bill) Person(#Peter)
58. OWL: Open World Assumption Traditional systems used Closed World Assumption OWL uses the Open World Assumption Singleton isMarriedWith Person Married isMarriedWith Person Person(#Peter) Person(#Mary) Person(#James) isMarriedWith(#Mary,#Peter) Married(#James) It infers: Married(#Mary) It does not infer: Married(#Peter) Singleton(#Peter) It also infers that James …is married with someone… but it does not know with whom
59. Conclusions Semantic Web technologies = ready for deployment It is easy to publish something in RDF There are already huge amounts of data in RDF Linking to existing ontologies is already possible Social barriers have to be overcome “Open door” policy Use standards Connect to others so others can connect to you A little semantics can have a lot of impact
63. About the University of Oviedo Established in 1608 (400 years) Approx. 25000 students 31 faculties and schools 79 bachelorprogrammes 35 doctoral programmes 26 masterprogrammes
64. About the School of Computing Established in 1982 1000 students 1200 graduates Programmes: Bachelor in Software Engineering Master in Web Engineering Doctoral programme in Web Engineering http://www.informatica.uniovi.es
65. Acknowledgements Parts of this presentation have been taken from similar presentations by: Ivan Hermann Jacco van Ossenbruggen Nova Spivak Ian Horrocks