The Semantic Web Web Science Systems Development Spring 2015

Preview:

Citation preview

The Semantic Web

Web Science Systems DevelopmentSpring 2015

AgendaHistory / Background

Linked Data

RDF

SPARQL

OWL

Applications

Current state of the Semantic Web

The WebCore Principles

Standard for identifying resources

Standard for representing resources

Standard for exchanging resources

The WebCore Principles

Standard for identifying resources

Standard for representing resources

Standard for exchanging resources

Standards:

URIs (URLs): Uniform Resource Identifier (Locator)

HTML: Hypertext Markup Language

HTTP: Hypertext Transfer Protocol

URI Identifies one resource

A resource could be anything

URIs are persistent

URLs also locate and are

aligned with protocols URLs are dereferenceable

URLs

mailto:joe@example.org

ftp://example.org/aDirectory/aFile

ldap://ldap.example.org/c=GB?objectClass?one

HTML It is not the resource

Serialization of information

A resource can have multiple

representations

Manifestation of the resource as

a digital document Retrievable resources:

Encode data and information Link to other resources (creating the “Web”)

HTTPProtocol for information exchange on the web

Protocol is specified in the URL

Used for client-server communication (request-response protocol)

Structured text (header, body,…)

Currently at http/1.1 (since 1999), http/2 in draft form

One Web

Principles of a healthy webIdentify resources using URIs

Use HTTP in URIs so that people can look up resources

When someone looks up a resource, return useful information (using standard representation e.g. HTML)

Link to other URIs

LinkingAsserts relevance/quality of page

Allows discovery

Creates the “Web” effect

The Semantic WebWhat is it?

Semantics, knowledge representation, ontologies and agents.

Linked DataFrom the web of documents to the web of data

Documents VS. Data

Web of documents

HTML Data

HTML Data

HTML Data

HTMLData

HTMLData

Web of data

Data

Data

Data

Data

Data

Data

One Web

RDFResource Description Framework

Semantic Web Stack

RDF: Resource Description Framework

The triple

Subject ObjectPredicate

RDF: Resource Description Framework

The triple

Subject ObjectPredicate

“WebSci” “Ahmed”“hasTA”

RDF Triple

Subject Predicate Object

IRI Literal

Resource

denotes

denotes denotes

Blank Node

representedBy representedB

y

representedBy

RDF triple

“article”“James

Hendler”

“hasCreator”

http://dx.doi.org//10.1109/MC.2009.30

http://dbpedia.org/resource/

James_Hendler

http://purl.org/dc/elements/1.1/creator

RDFA triple is true if the relationship holds between the

subject and the object

ResourceCan be ‘anything’, including documents, people,

physical objects, and abstract concepts

IRI: Internationalized Resource Identifier IRIs conform to Universal Character Set, not just

ASCII IRIs are global, dereferenceable and persistent

Blank nodes are anonymous resources

RDFGraph-based Data Model

Visualized as diagram of nodes and directed-arcs

Nodes represent ‘entities’ and are resourcesArcs represent relationships between the

nodes and are also resources

RDF Graph consists of a set of triples

RDF Graph

Raw RDF

RDF Serializations (representations)Multiple serializations

RDF/XML

JSON-LD Turtle family

Turtle

N3 Trig

RDF/XML

JSON-LD

N3

RDFa

Querying RDFHow to retrieve linked data?

How and where to query RDF graphs?

SPARQLSPARQL Protocol and RDF Query Language

Semantic Web Stack

SPARQLLanguage for querying RDF

Triplestores and endpoints

Queries consist of triple patterns, conjunctions, disjunctions and optional patterns

SPARQL is a protocol that defines how an endpoint responds to a query

SPARQL query (basic)PREFIX geo: <http://www.opengis.net/ont/geosparql#>PREFIX geof: <http://www.opengis.net/def/function/geosparql/>PREFIX sf: <http://www.opengis.net/ont/sf#>PREFIX vocab: <http://localhost:2020/resource/vocab/>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>PREFIX rpi: <http://openmap.rpi.edu#>

SELECT DISTINCT ?professor ?course ?buildingWHERE {

?prof a rpi:Professor. ?course rpi:instructedBy ?professor. ?course rpi:courseTitle ?title.

?course rpi:hostedInBuilding ?building. ?building rdfs:label ?label.

FILTER regex(?title,"WEB") }

Namespaces

Patterns to match

Filter

Variables

SPARQL query result

SPARQL query (complex)Federated query + GeoSPARQL

PREFIX geo: <http://www.opengis.net/ont/geosparql#>

PREFIX geof: <http://www.opengis.net/def/function/geosparql/>

PREFIX sf: <http://www.opengis.net/ont/sf#>

PREFIX vocab: <http://localhost:2020/resource/vocab/>

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

PREFIX rpi: <http://openmap.rpi.edu#>

SELECT DISTINCT ?professor ?course ?building

WHERE {

?course vocab:rpi_class_schedule_all_building_id ?building.

SERVICE <http://localhost:8080/parliament/sparql> {

?professor a rpi:Professor.

?course rpi:instructedBy ?professor.

?building rdfs:label ?label.

?building geo:hasGeometry ?geo.

?geo geo:asWKT ?xy

FILTER(geof:sfIntersects(?xy,"POINT(-73.681948 42.730076)" ^^<http://www.opengis.net/ont/sf#wktLiteral>))

}}

‘Remote’ Endpoint

GeoSPARQL Function

SPARQL query (complex) result

SPARQL query (inference)PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

PREFIX rpi: <http://openmap.rpi.edu#>

PREFIX foaf: <http://xmlns.com/foaf/0.1/>

SELECT ?s

WHERE {

?s a rpi:Person.

?s foaf:knows <http://openmap.rpi.edu#Ahmed_Eleish>

}

Superclass

SPARQL query (inference) result

OWLWeb Ontology Language

Semantic Web Stack

Web Ontology Language Provides semantics/structure to RDF

Computational logic-based language, allows reasoning by computer programs to:Verify consistency of knowledgeMake implicit knowledge explicit

Enables inference of new triples from existing ones

Used to build ontologies/vocabularies

Rules that constrain relationships between entities in a domain

OWL basic notionsAxioms

Entities

Expressions

OWL componentsClass hierarchies

Object properties

Property hierarchies

Domain & range restrictions

Datatypes

RPI Campus Ontology

Ontology Engineering

Expressivity

Implementation

Maintenance

Query Rules

Infer

Applications of Linked Data

Linking related dataWebsites with related data on different platforms

Linking related dataWebsites with related data on different platforms

RDBWebsite

A

Website B

Triplstore

Mapping File

RDF

SPARQL-to-SQL

Direct Mapping

XML

XSLT

RPI campus map applicationMap of the RPI campus with clickable features

(buildings, emergency callboxes,…etc.)

Geolocation data in KML for projection and in RDF for GeoSPARQL queries

Class schedule scraped off SIS in RDBMS

Mapping of schedule to RDF for SPARQL queries

Campus map KML

Campus map RDF

Class schedule

RPI campus map applicationHTML/JavaScript front-end

PHP back-end

OpenLayers 3 mapping API

OpenStreetMap tiles

Class schedule csv loaded into MySQL

D2RQ server mapping MySQL to RDF

Map data RDF loaded into Parliament triplestore

RPI Campus Map

Current state of the Semantic Web

Evolution of the web

Linked Open Data (2007)

Linked Open Data (2008)

Linked Open Data (2009)

Linked Open Data (now)

Open linked data

References Tim Berners Lee’s proposal - http://info.cern.ch/Proposal.html

W3C web architecture - http://www.w3.org/TR/webarch/

W3C Technology Stack - http://www.w3.org/Consortium/techstack-desc.html

Google PageRank - http://en.wikipedia.org/wiki/PageRank

Scientific American – The Semantic Web -http://www.cs.umd.edu/~golbeck/LBSC690/SemanticWeb.html

RDF – Resource Description Framework - http://www.w3.org/TR/rdf11-concepts/

SPARQL – SPARQL Protocol & RDF Query Language - http://www.w3.org/TR/sparql11-protocol/

OpenStreetMap - http://www.openstreetmap.org/

Parliament Triplestore - http://parliament.semwebcentral.org/

D2R Server - http://d2rq.org/

Linked Open Data - http://lod-cloud.net/

Recommended