Semantic web

Post on 27-Jan-2015

91 views 0 download

description

 

Transcript of Semantic web

SPARQL: Query Language for RDF

研究⽣生 鍾聖彥 指導⽼老師 許慶⽣生 教授

Sir Tim Berners-Lee• Born 8 June 1955

• British computer scientist.

• The inventor of the World Wide Web.(WWW)

• The concept of the Semantic Web is the brainchild of the original creator of the World- Wide Web.(1998)

• Web 3.0.

This NeXT Computer was used by Berners-Lee at CERN and became the world's first web server

Semantic WebAn extension of the World Wide Web that allows computers to intelligently search, combine, and process Web content based on the meaning that this content has to humans.(Pascal Hitzler, Markus Krotzsch, and Sebastian Rudolph 2010). !

The idea behind the Semantic Web is 'to weave a Web that not only links documents to each other but also recognises the meaning of the information in those documents.' (Frauenfelder 2001);

—Tim Berners-Lee, 2006

–Tim Berners-Lee, 2006

「…….,Web 2.0 and access to a semantic Web integrated across a huge space of data, you'll have access to an unbelievable data resource

…」(Web 3.0)

Semantic Meaning

RDF (Resource Description Framework)• Formal language for describing structured information.

• The goal of RDF is to enable applications to exchange data on the Web while still preserving their original meaning.

• RDF consequently is often viewed as the basic representation format for developing the Semantic Web.

• Based on a very simple graph-oriented data schema.

• A first official specification was published in 1999 by the W3c.

描述的事物 A 描述事物的具體屬性(property) B 描述的作為該屬性的值的事物 C

「A有⼀一個B是C來表⽰示」

語法

RDF Description of a person named Eric Miller

Whose name is Eric Miller, whose email address is em@w3.org, and whose title is Dr.

Therefore, the following "subject, predicate, object" RDF triples can be expressed: http://www.w3.org/People/EM/contact#me, http://www.w3.org/2000/10/swap/pim/contact#fullName, "Eric Miller" http://www.w3.org/People/EM/contact#me, http://www.w3.org/2000/10/swap/pim/contact#mailbox, em@w3.org http://www.w3.org/People/EM/contact#me, http://www.w3.org/2000/10/swap/pim/contact#personalTitle, "Dr." http://www.w3.org/People/EM/contact#me, http://www.w3.org/1999/02/22-rdf-syntax-ns#type, http://www.w3.org/2000/10/swap/pim/contact#Person

RDF graph

The XML Serialization of RDF

What is SPARQL?• pronounced as sparkle

• RDF query and inference languages

• SQL-like language

• Accordingly simple RDF graphs are used as fundamental query patterns.

• One of the key technologies of the semantic web.!

• Represented using Turtle (Terse RDF Triple Language)

• SPARQL allows for a query to consist of triple patterns, conjunctions, disjunctions, and optional patterns

Data Descriptions

Result Descriptions

Like…

SPARQL可以讓使⽤用者寫出廣域上不含糊的詢問。 舉例來說,以下的詢問可以取得世界上所有⼈人的姓名與Email:

What are all the country capitals in Africa?

Writing a Simple QueryNTriple寫法

Multiple Matches

The result of a query is a solution sequence, corresponding to the ways in which the query's graph pattern matches the data.

Multiple Matches

Multiple Matches

This is a basic graph pattern match; all the variables used in the query pattern must be bound in every solution.

Matching RDF Literals Matching Literals with

Numeric Types

Language Tags

Arbitrary Datatypes

Matching Literals with Language Tags

Matching Literals with Numeric Types

Integers in a SPARQL query indicate an RDF typed literal with the datatype xsd:integer.

For example: 42 is a shortened form of "42"^^<http://www.w3.org/2001/XMLSchema#integer>.

!

Matching Literals with Arbitrary Datatypes

Building RDF Graphs

The SELECT query form returns variable bindings.

The CONSTRUCT query form returns an RDF graph.

The graph is built based on a template which is used to generate RDF triples based on the results of matching the graph pattern of the query.

RDF Term ConstraintsRestricting the Values of Strings

SPARQL FILTER functions like regex can test RDF literals. regex matches only plain literals with no language tag. regex can be used to match the lexical forms of other literals by using the str function.

RDF Term Constraints Restricting Numeric Values

Other Term Constraints

ReferencePascal Hitzler, Markus Krotzsch, and Sebastian Rudolph (2010). Foundations of Semantic Web Technologies. Taylor and Francis Group, ISBN-10: 142009050X, ISBN-13: 978-1420090505. !http://semwebtw.openfoundry.org/2010/Talks/0319-semweb-kennyluck/ !http://www.linkeddatatools.com/downloads !http://viziquer.lumii.lv/ !https://wiki.base22.com/display/btg/SPARQL+Query+Examples !http://en.wikipedia.org/wiki/GeoSPARQL !http://www.w3.org/DesignIssues/Semantic.html !http://openisdm.iis.sinica.edu.tw/index.php/resource-repository/general-data-processing/documents/17-rdf !http://www.w3.org/TR/rdf-sparql-query/#sparqlSyntax

End