Your SlideShare is downloading. ×
Semantic Web: an introduction
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Semantic Web: an introduction

239
views

Published on

Short seminar about the Semantic Web for the "Artificial Intelligence" course at Politecnico di Torino (academic year 2013/2014)

Short seminar about the Semantic Web for the "Artificial Intelligence" course at Politecnico di Torino (academic year 2013/2014)

Published in: Technology, Education

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
239
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. THE SEMANTIC WEB AN INTRODUCTION LUIGI DE RUSSIS
  • 2. THE WEB IS A WEB OF DOCUMENT FOR PEOPLE,NOT FOR MACHINES
  • 3. THE WEB IS A WEB OF DOCUMENT
  • 4. THE SEMANTIC WEB IS A WEB OF DATA LinkingOpen Data cloud diagram, by Richard Cyganiak and Anja Jentzsch. http://lod-cloud.net/
  • 5. LET’S THINK!
  • 6. HOW TO GET DATA FROM THE WEB?
  • 7. HOW TO GET DATA FROM THE WEB? DATA IS PRESENT ON SOME WEBSITES Wikipedia,GitHub,Twitter,Facebook,… HOW TO GET IT? different,evolvingandproprietaryWebAPIs variousdataexchangeformats
  • 8. EXAMPLE GITHUB WebAPIs(thirdversion) https://developer.github.com/v3 DataavailableinJSON Authenticationisrequired formostcalls
  • 9. EXAMPLE TWITTER https://dev.twitter.com/docs/ Authenticationisrequired formostcalls Limitationsaboutnumberofrequests DataavailableinJSON RESTfulWebAPIs(version1.1) StreamingAPIs(version1.1)
  • 10. EXAMPLE WIKIPEDIA MediaWikiWebAPIs(version1.1) http://www.mediawiki.org/wiki/API:Main_page DataavailableinJSON,PHP,WDDX,XML,YAML,TXT,… RSS DirectXMLexports
  • 11. HOW TO GET DATA FROM THE WEB? DATA IS LOCKED IN “DATA ISLANDS” Wikipedia,GitHub,Twitter,Facebook,… LIMITED OR NO ACCESS TO THIS DATA different,evolvingandproprietaryWebAPIs variousdataexchangeformats
  • 12. DATA ON THE WEB IS NOT ENOUGH! weneedaproperinfrastructure DATA SHOULD BE AVAILABLE ON THE WEB accessibleandstructuredviastandardWebtechnologies notcontrolledbyapplications,only DATA SHOULD BE INTERLINKED OVER THE WEB i.e.,datacanbeintegratedovertheWeb THIS IS WHERE SEMANTIC WEB COME IN
  • 13. DEFINITIONS
  • 14. To a computer,theWeb is a flat,boring world, devoid of meaning. This is a pity, as in factdocumentson theWeb describereal objects and imaginary concepts.[…] Adding semanticstothe Web involvestwothings: allowing documents which have informationin machine-readable forms, and allowing links tobe createdwith relationship values. Only when we have this extra level of semanticswe will be able touse computerpower tohelp us exploit the information toa greaterextent than our own reading. TIM BERNERS-LEE,1994
  • 15. THE INTERNET,1994C.A. NEW! NEW! NoGoogle,Wikipedia,Amazon, …yet!
  • 16. I have a dream for the Web [in which computers]become capableof analyzing all thedata on the Web – thecontent, links, and transactionbetweenpeople and computers. A “SemanticWeb”, which should make thispossible, has yet to emerge, but when it does, the day-to-day mechanismsof trade, bureaucracy and our daily lives will be handled by machinestalking to machines.The“intelligentagents”people have toutedfor ages will finally materialize. TIM BERNERS-LEE,1999 Weaving the Web–The OriginalDesign and Ultimate Destiny of the WorldWideWebby Its Inventor. Tim Berners-Lee,HarperSan Francisco,September1999
  • 17. THE SEMANTIC WEB IS A WEB OF DATA THE SEMANTIC WEB IS THE WEB samebasetechnologies,evolutionary,decentralized IT IS ABOUT COMMON FORMATS forintegrationandcombinationofdatadrawnfromdiversesources IT IS ABOUT A LANGUAGE forrecordinghowthedatarelatestorealworldobjects
  • 18. WHAT IS THE RELATIONSHIP WITH AI? INFLUENCE SometechnologiesintheSemanticWebbenefitedalotfromAIresearch anddevelopment(andviceversa) DIFFERENT GOALS ArtificialIntelligenceapproach:buildsmartermachines,teach computerstoinferthemeaningofdata SemanticWebapproach:havesmarterdata,makedataeasierfor machinestofind,accessandprocess
  • 19. FUNDAMENTALS
  • 20. RESOURCE AND DESCRIPTION RESOURCE everydocument“reachable”ontheWeb nomatterthecontent,format,language,etc. RESOURCE DESCRIPTION independentfromtheformat standardlanguage(basedonmetadata)
  • 21. RESOURCE AND DESCRIPTION Resources
  • 22. RESOURCE AND DESCRIPTION Description
  • 23. RESOURCE AND DESCRIPTION DescriptionTitle Author Date Topic Quality Title Author Date Topic
  • 24. URIS unambiguousnamesforresources RDF acommondatamodeltoconnectanddescriberesources SPARQL accesstothedatamodel RDFS,OWL commondescriptionlanguages OWL,RIF reasoning(mainlylogicinference)
  • 25. MODELING DATA
  • 26. EXAMPLE:BOOKSTORE RepresentthefollowingdataabouttheAIbookasasetof relations Title:“ArtificialIntelligence:AModern Approach” Author:Russel,StuartandNorvig,Peter Publisher: PrenticeHall ISBN:978-0136042594
  • 27. EXAMPLE:BOOKSTORE http://...isbn/9780136042594 Resource
  • 28. EXAMPLE:BOOKSTORE http://...isbn/9780136042594 Artificial Intelligence: A Modern Approach Literal
  • 29. EXAMPLE:BOOKSTORE http://...isbn/9780136042594 Artificial Intelligence: A Modern Approach title
  • 30. EXAMPLE:BOOKSTORE http://...isbn/9780136042594 Artificial Intelligence: A Modern Approach Prentice Hall Russel, Stuart Norvig, Peter title publisher author author
  • 31. RDF:RESOURCE DESCRIPTION FRAMEWORK STRUCTURED IN STATEMENTS SUBJECT aresource(URI) PREDICATE averb,propertyorrelationship OBJECT aresourceoraliteralstring
  • 32. EXAMPLE:BOOKSTORE http://...isbn/9780136042594 Artificial Intelligence: A Modern Approach Prentice Hall Russel, Stuart Norvig, Peter title publisher author author Subject Object Object Object Object Predicate Predicate Predicate
  • 33. EXAMPLE:BOOKSTORE http://...isbn/9780136042594 Artificial Intelligence: A Modern Approach title RDFIN XMLSYNTAX <rdf:RDFxmlns:rdf=http://www.w3.org/…/22-rdf-syntax-ns#> <rdf:Descriptionabout=“http://...isbn/9780136042594”> <title>ArtificialIntelligence:AModernApproach</title> </rdf:Description> </RDF>
  • 34. EXAMPLE:BOOKSTORE http://...isbn/9780136042594 Artificial Intelligence: A Modern Approach title RDFIN TURTLE <http://...isbn/9780136042594> title“ArtificialIntelligence:AModernApproach”
  • 35. LINKIN’DATA
  • 36. EXAMPLE:BOOKSTORE RepresentthefollowingdataabouttheItaliantranslationoftheAIbook asasetofrelations Title:“Intelligenzaartificiale.Unapproccio moderno” Author:Russel,StuartandNorvig,Peter Publisher: PrenticeHall ISBN:978-8871925936 OriginalISBN:978-0136042594
  • 37. EXAMPLE:BOOKSTORE http://...isbn/9788871925936 Intelligenza Artificiale. Un approccio moderno Prentice Hall Russel, Stuart Norvig, Peter title publisher creator creator http://...isbn/9780136042594 original
  • 38. EXAMPLE:BOOKSTORE http://...isbn/9788871925936 Intelligenza Artificiale. Un approccio moderno Prentice Hall title publisher http://...isbn/9780136042594 original http://...isbn/9780136042594 Artificial Intelligence: A Modern Approach Prentice Hall title publisher
  • 39. EXAMPLE:BOOKSTORE http://...isbn/9788871925936 Intelligenza Artificiale. Un approccio moderno Prentice Hall title publisher http://...isbn/9780136042594 original http://...isbn/9780136042594 Artificial Intelligence: A Modern Approach Prentice Hall title creator sameURI,sameresource
  • 40. EXAMPLE:BOOKSTORE http://...isbn/9780136042594 Artificial Intelligence: A Modern Approach Prentice Hall Russel, Stuart Norvig, Peter title publisher author author http://...isbn/9788871925936 Intelligenza Artificiale. Un approccio moderno Prentice Hall title publisher original Russel, Stuart Norvig, Peter creator creator
  • 41. EXAMPLE:BOOKSTORE http://...isbn/9780136042594 Artificial Intelligence: A Modern Approach Prentice Hall Russel, Stuart Norvig, Peter title publisher author author http://...isbn/9788871925936 Intelligenza Artificiale. Un approccio moderno Prentice Hall title publisher original Russel, Stuart Norvig, Peter creator creator Whataboutmergingcreatorandauthor? InRDF,itisnotpossible!
  • 42. PROBLEM:FIELD NAMES ARE ARBITRARY Synonyms:authororcreatorormakerorcontributoror… Singularorplural:authororauthors SOLUTION:STANDARDS generalordomain-specific
  • 43. DUBLIN CORE GENERAL VOCABULARY DublinCoreMetadataInitiative(DCMI) http://dublincore.org BUILDING BLOCKS TO DEFINE METADATA FOR THE SEMANTIC WEB Definetitle,contributor,publisher,license,date,language,etc.
  • 44. PROBLEM:FIELD VALUES ARE ARBITRARY Valuetype:string,date,integer,… Valueformat:“Norvig,Peter”or“Norvig,P.”or“PeterNorvig”or… Valuerestrictions:onevalueormultiplevalues(howmany?) SOLUTIONS Standards Controlledvocabulary(closelistofterms) Semanticallyrichdescriptionstosupportsearch(RDFSand/orOWL)
  • 45. FRIEND OF AFRIEND (FOAF) GENERAL ONTOLOGY Describepersons,theiractivitiesandtheirrelationstootherpeopleand objects http://www.foaf-project.org BUILDING BLOCKS TO DEFINE STRUCTURED RELATIONS BETWEEN PEOPLE Definename,familyName,givenName,knows,age,nick,etc.
  • 46. EXAMPLE:BOOKSTORE http://...isbn/9780136042594 Artificial Intelligence: A Modern Approach Prentice Hall Russel, Stuart Norvig, Peter dc:title dc:publisher dc:creator dc:creator foaf:http://xmlns.com/foaf/spec dc:http://purl.org/dc/terms foaf:name foaf:name foaf:name
  • 47. http://...isbn/9780136042594 Norvig, Peter dc:creator foaf:name http://...isbn/9780136042594 Norvig, Peter author WHY?
  • 48. RDFSCHEMA
  • 49. RDFSCHEMA SCHEMA DefinitionofthenodesandpredicatesusedinaRDFdocument DOMAIN AND RANGE RDFSdescribespropertiesintermsofclassesofresource towhichtheyapply(froma“domain”toa“range”)
  • 50. EXAMPLE RDFdata http://elite.polito.it/people/derussis teaches http://bit.ly/lingambmult
  • 51. http://elite.polito.it/people/derussis teaches EXAMPLE RDFdata RDFschema http://bit.ly/lingambmult Teacher Person teaches Course domain range subClassOf type type
  • 52. http://...isbn/9780136042594 Norvig, Peter dc:creator foaf:name http://...isbn/9780136042594 Norvig, Peter author BACK TO THE BOOKSTORE EXAMPLE…
  • 53. http://...isbn/9780136042594 Norvig, Peter dc:creator foaf:name http://...isbn/9780136042594 Norvig, Peter author BACK TO THE BOOKSTORE EXAMPLE… dc:creatorhasrangeAgent,i.e.,aclass(resource),notaliteral: weuseananonymousclassforthisscope. Finally,foaf:Namehasrangerdfs:Literal. anonymous class
  • 54. RDFSEXPRESSIVITY SIMPLE RELATIONSHIP BETWEEN THINGS RDFSprovidesavocabularytoexpressrelationshipbetweenthings (e.g.,subClassOfortype) AVOID COMPLEX RELATIONSHIP RDFScannotdescribedataintermsofsetofoperations(e.g., unionOf), equivalence(e.g.,sameAs)orcardinality(e.g.,allValueFrom)
  • 55. OWL
  • 56. WEB ONTOLOGY LANGUAGE WHAT? OWL(version2):aknowledgerepresentationlanguage Designedtoformulate,exchangeandreasonwithknowledgeabouta domainofinterest
  • 57. WEB ONTOLOGY LANGUAGE INDIVIDUALS,CLASSES AND PROPERTIES “PolitecnicodiTorinoisauniversity” “PolitecnicodiTorinohasaprofessornamedElioPiccolo” “PolitecnicodiTorino”isanobject:anindividualinOWL2 “university”isacategory:aclassinOWL2 “hasaprofessor”isarelation:apropertyinOWL2 “ElioPiccolo”isanindividual,too
  • 58. WEB ONTOLOGY LANGUAGE EXPRESSIVITY Designedtorepresentrichandcomplexknowledgeaboutthings,group ofthings,andtheirrelations LOGIC-BASED KnowledgeexpressedinOWLcanbereasonedwithacomputerprogram toverifyitsconsistencyortomakeimplicitknowledgeexplicit
  • 59. WEB ONTOLOGY LANGUAGE LINKED OntologiesinOWLcanbepublishedontheWebandmay refertoorbe referredfromotherOWLontologies CHOOSE THE SYNTAX YOU LIKE VarioussyntaxesavailableforOWL,fordifferentpurposes (RDF/XML,Turtle,Manchester,etc.)
  • 60. EXAMPLE:BOOKSTORE Intelligenza Artificiale. Un approccio moderno Prentice Hall dc:title dc:publisher Artificial Intelligence: A Modern Approach Prentice Hall dc:title dc:publisher Libro Book rdfs:type rdf:type http://...isbn/9788871925936 http://...isbn/9780136042594
  • 61. EXAMPLE:BOOKSTORE Intelligenza Artificiale. Un approccio moderno Prentice Hall dc:title dc:publisher Artificial Intelligence: A Modern Approach Prentice Hall dc:title dc:publisher Libro Book rdfs:type rdf:type owl:sameAs http://...isbn/9788871925936 http://...isbn/9780136042594
  • 62. HANDS ON OWL
  • 63. EXAMPLE:BOOKSTORE Itistimetosellthebookswemodeled. Usersmusthavethepossibilitytosearchinourbookcatalog. Weneedtodescribeourstore andaddsomeotherinformationaboutthebooks. GoodRelationshelpsinrealizingsuchanexample: http://www.heppnetz.de/projects/goodrelations/
  • 64. EXAMPLE:BOOKSTORE BUILD THE MODEL 1. Describethebusinessentity 2. Describetheoffereditems 3. Describetheoffer 4. Linktheoffertothebusinessentity SEARCH IN THE MODEL
  • 65. DESCRIBE THE BUSINESS ENTITY default:BookStore_1 agr:BusinessEntity; gr:legalName“bookstore.comLtd.”^^xsd:string. Bookstore_1
  • 66. DESCRIBE THE OFFERED ITEMS default:AIBook_en aitem:Book,gr:ActualProductOrServiceInstance ; item:hasTotalPagesdefault:QuantitativeValueInteger_1. AIBook_en default:QuantitativeValueInteger_1 agr:QuantitativeValueInteger; gr:hasValue“1132”^^xsd:integer. QuantitativeValue Integer_1
  • 67. Bookstore_1 AIBook_en item:BookQuantitativeValue Integer_1 1132 gr:ActualProductOrServiceInstance gr:ProductOrService rdf:type rdfs:subClassOf rdf:type item:hasTotalPages gr:hasValue
  • 68. DESCRIBE THE OFFER default:Offering_1 agr:Offering ; gr:hasBusinessFunctiongr:Sell; gr:hasPriceSpecificationdefault:UnityPriceSpecification_1; gr:includeObjectdefault:TypeAndQuantityNode_1. Offering_1
  • 69. Bookstore_1 Offering_1 TypeAndQuantity Node_1UnitPriceSpecification_1 AIBook_en item:BookQuantitativeValue Integer_1 gr:Sell 1.0 1132 gr:ActualProductOrServiceInstance gr:ProductOrService gr:includeObject gr:hasBusinessFunction gr:hasPriceSpecification gr:amountOfThisGood rdf:type rdfs:subClassOf rdf:type item:hasTotalPages gr:hasValue gr:Offering rdf:type
  • 70. DESCRIBE THE OFFER default:TypeAndQuantityNode_1 agr:TypeAndQuantityNode ; gr:amountOfThisGood“1.0”^^xsd:float; gr:typeOfGooddefault:AIBook_en. default:UnitPriceSpecification_1 agr:UnitPriceSpecification; gr:hasCurrency“EUR”^^xsd:string; gr:hasCurrencyValue “120.0”^^xsd:float. TypeAndQuantity Node_1 UnitPriceSpecification_1
  • 71. Bookstore_1 Offering_1 TypeAndQuantity Node_1UnitPriceSpecification_1 AIBook_en item:BookQuantitativeValue Integer_1 gr:Sell 120.0 “EUR” 1.0 1132 gr:ActualProductOrServiceInstance gr:ProductOrService gr:includeObject gr:hasBusinessFunction gr:hasPriceSpecification gr:hasCurrency gr:hasCurrencyValue gr:amountOfThisGood gr:typeOfGood rdf:type rdfs:subClassOf rdf:type item:hasTotalPages gr:hasValue gr:Offering rdf:type
  • 72. default:BookStore_1gr:offersdefault:Offering_1 LINK THE OFFER TO THE BUSINESS ENTITY
  • 73. Bookstore_1 Offering_1 TypeAndQuantity Node_1UnitPriceSpecification_1 AIBook_en item:BookQuantitativeValue Integer_1 gr:Sell 120.0 “EUR” 1.0 1132 gr:ActualProductOrServiceInstance gr:ProductOrService gr:offers gr:includeObject gr:hasBusinessFunction gr:hasPriceSpecification gr:hasCurrency gr:hasCurrencyValue gr:amountOfThisGood gr:typeOfGood rdf:type rdfs:subClassOf rdf:type item:hasTotalPages gr:hasValue gr:Offering rdf:type
  • 74. QUERY THE WHOLE! PREFIXgr:<http://purl.org/goodrelations/v1#> PREFIXitem:<http://www.elite.polito.it/ontologies/example/item#> SELECT?offering WHERE{?offeringrdf:typegr:Offering. ?offeringgr:includesObject?object. ?objectgr:typeOfGood?item. ?itemrdf:typeitem:Book. } Howtogetalltheavailableofferforthebook? SPARQL
  • 75. QUERY THE WHOLE! ?itemrdf:typeitem:Book. SPARQL ?item item:Book rdf:type
  • 76. QUERY THE WHOLE! ?objectgr:typeOfGood?item. SPARQL ?object AIBook_en item:Book gr:typeOfGood rdf:type
  • 77. QUERY THE WHOLE! ?offeringgr:includesObject?object. SPARQL ?offering TypeAndQuantity Node_1 AIBook_en item:Book gr:includeObject gr:typeOfGood rdf:type
  • 78. QUERY THE WHOLE! ?offeringrdf:typegr:Offering. SPARQL ?offering TypeAndQuantity Node_1 AIBook_en item:Book gr:includeObject gr:typeOfGood rdf:type gr:Offering rdf:type
  • 79. QUERY THE WHOLE! SELECT?offering SPARQL Offering_1 TypeAndQuantity Node_1 AIBook_en item:Book gr:includeObject gr:typeOfGood rdf:type gr:Offering rdf:type
  • 80. REFERENCES SemanticWebstandards:http://w3c.org/standards/semanticweb SemanticWebWiki:http://semanticweb.org SemanticWebFAQ:http://www.w3c.org/2001/sw/SW-FAQ Book:ASemanticWebPrimer(http://www.semanticwebprimer.org) Book:SemanticWebProgramming(http://semwebprogramming.org) Lastaccess:26May2014
  • 81. THANKS! LuigiDeRussis http://elite.polito.it
  • 82. LICENSE ThisworkislicensedundertheCreativeCommons“Attribution-NonCommercial- ShareAlikeUnported(CCBY-NC-SA3,0)”License. Youarefree: toShare-tocopy,distributeandtransmitthework toRemix-toadaptthework Underthefollowingconditions: Attribution -Youmustattributetheworkinthemannerspecifiedbytheauthoror licensor(but notinanywaythatsuggeststhattheyendorseyouoryouruseofthe work). Noncommercial-Youmaynotusethisworkforcommercialpurposes. ShareAlike-Ifyoualter,transform,orbuilduponthiswork,youmaydistributethe resultingworkonlyunderthesameorsimilarlicensetothisone. Toviewacopyofthislicense,visithttp://creativecommons.org/licenses/by-nc-sa/3.0/