1 / 25

Semantic Web Basics

Semantic Web Basics. Dominic DiFranzo PhD Student/Research Assistant Rensselaer Polytechnic Institute Tetherless World Constellation. http://tw.rpi.edu/portal/Mashathon. Interwebs?. Internet – graph of computers connected to one another Web – graph of documents hyper-linked to one another

Download Presentation

Semantic Web Basics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Semantic Web Basics Dominic DiFranzo PhD Student/Research Assistant Rensselaer Polytechnic Institute Tetherless World Constellation

  2. http://tw.rpi.edu/portal/Mashathon

  3. Interwebs? Internet – graph of computers connected to one another Web – graph of documents hyper-linked to one another Semantic web – graph of concepts/ideas/data linked together by named relations.

  4. RDF Triple: Subject Predicate Object Use URI for universal naming New York has the postal abbreviation NY <urn:x-states:New%20York> <http://purl.org/dc/terms/alternative> "NY" .

  5. Linked Open Data

  6. serialize in many ways <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dcterms="http://purl.org/dc/terms/"> <rdf:Description rdf:about="urn:x-states:New%20York"> <dcterms:alternative>NY</dcterms:alternative> </rdf:Description> </rdf:RDF>

  7. Linking I found a new dataset and it has the following triple <http://dbpedia.org/page/New_York> <http://dbpedia.org/ontology/Place/otherName> “The Empire State” .

  8. owl:sameAS <urn:x-states:New%20York> <http://www.w3.org/2002/07/owl#sameAs> <http://dbpedia.org/page/New_York> .

  9. Semantic Mashup Workflow Take data (CSV, XSL) Convert it to RDF Load in triple store Query with Sparql Visualize results using standard off-the-shelf visualization tools (Google viz, Exhibit, etc)

  10. Conversion to RDF

  11. Sparql SPARQL is a query language for the Semantic Web.

  12. Sparql SELECT ?node ?title WHERE{  ?node <http://purl.org/dc/elements/1.1/title> ?title . } LIMIT 1

  13. Long! SELECT ?node ?name WHERE{  ?node <http://xmlns.com/foaf/0.1/givenname> ?name .  ?node <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> . } LIMIT 10

  14. Prefix PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT ?node ?name WHERE{  ?node foaf:givenname ?name .  ?node rdf:type foaf:Person . } LIMIT 10

  15. Shortcuts PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT ?node ?name WHERE{  ?node foaf:givenname ?name ; rdf:type foaf:Person . } LIMIT 10

  16. Graphs

  17. Named Graph PREFIX dc: <http://purl.org/dc/elements/1.1/> SELECT ?graph ?node ?title WHERE{ GRAPH ?graph{  ?node dc:title ?title . } } LIMIT 3

  18. Named Graph PREFIX dc: <http://purl.org/dc/elements/1.1/> SELECT  ?node8 ?desc8 ?node401 ?desc401 WHERE{ GRAPH <http://data-gov.tw.rpi.edu/vocab/Dataset_401>{  ?node401 dc:description ?desc401 . } GRAPH <http://data-gov.tw.rpi.edu/vocab/Dataset_8>{  ?node8 dc:description ?desc8 . } } LIMIT 3

  19. Union PREFIX dc: <http://purl.org/dc/elements/1.1/> SELECT  ?node8 ?desc8 ?node401 ?desc401 WHERE{ { GRAPH <http://data-gov.tw.rpi.edu/vocab/Dataset_401>{  ?node401 dc:description ?desc401 . } }UNION{ GRAPH <http://data-gov.tw.rpi.edu/vocab/Dataset_8>{  ?node8 dc:description ?desc8 . } } } LIMIT 3

  20. Optional PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT  ?node ?name ?givenname WHERE{  ?node foaf:name ?name . OPTIONAL{  ?node foaf:givenname ?givenname . } }

  21. Filter PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT  ?node ?name ?givenname WHERE{  ?node foaf:name ?name .  ?node foaf:givenname ?givenname . FILTER regex(?name, "Biden") . }

  22. Try some on your own

  23. Questions?

More Related