Download presentation
Presentation is loading. Please wait.
Published byMatthew Henderson Modified over 9 years ago
1
Semantic Web Basics Dominic DiFranzo PhD Student/Research Assistant Rensselaer Polytechnic Institute Tetherless World Constellation
2
http://tw.rpi.edu/portal/Ma shathon
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 "NY".http://purl.org/dc/terms/alternative
5
Linked Open Data
6
serialize in many ways <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"http://www.w3.org/1999/02/22-rdf-syntax-ns# xmlns:dcterms="http://purl.org/dc/terms/">http://purl.org/dc/terms/ n rdf:about="urn:x-states NY
7
Linking I found a new dataset and it has the following triple “The Empire State”.http://dbpedia.org/page/New_Yorkhttp://dbpedia.org/ontology/Place/other Name
8
owl:sameAS.http://www.w3.org/2002/07/owl#same Ashttp://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)
11
Conversion to RDF
12
Sparql SPARQL is a query language for the Semantic Web.
13
Sparql SELECT ?node ?title WHERE{ ?node ?title.http://purl.org/dc/elements/1.1/title } LIMIT 1
14
Long! SELECT ?node ?name WHERE{ ?node ?name.http://xmlns.com/foaf/0.1/givenname ?node.ntax-ns#type> <http://xmlns.com/foaf/0.1/Person } LIMIT 10
15
Prefix PREFIX foaf: http://xmlns.com/foaf/0.1/ PREFIX rdf: 22-rdf- syntax-ns#> SELECT ?node ?name WHE WHERE{ ?node foaf:givenname ?name. ?node rdf:type foaf:Person. } LIMIT 10
16
Shortcuts PREFIX foaf: http://xmlns.com/foaf/0.1/ PREFIX rdf: 22-rdf- syntax-ns#> SELECT ?node ?name WHE WHERE{ ?node foaf:givenname ?name ; rdf:type foaf:Person. } LIMIT 10
17
Graphs
18
Named Graph PREFIX dc: http://purl.org/dc/elements/1.1/ SELECT ?graph ?node ?title WHERE{ GRAPH ?graph{ ?node dc:title ?title. } LIMIT 3
19
Named Graph PREFIX dc: http://purl.org/dc/elements/1.1/ SELECT ?node8 ?desc8 ?node401 ?desc401 WHERE{ GRAPH {/Dataset_401>{ ?node401 dc:description ?node401 dc:description ?desc401. } GRAPH { ?node8 dc:description ?desc8.c8. } LIMIT 3
20
Union PREFIX dc: http://purl.org/dc/elements/1.1/ SELECT ?node8 ?desc8 ?node401 ?desc401 WHERE{ { GRAPH {/Dataset_401>{ ?node401 dc:descriptio ?node401 dc:description ?desc401. } }UNION{ GRAPH { ?node8 dc:description ?desc8.esc8. } LIMIT 3
21
Optional PREFIX foaf: http://xmlns.com/foaf/0.1/ SELECT ?node ?name ?givenname WHERE{ ?node foaf:name ?name. OPTIONAL{ ?node foaf:givenname ?givenname. }
22
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"). }
23
Try some on your own
25
Questions?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.