Upload
wilfrid-norris
View
220
Download
0
Tags:
Embed Size (px)
Citation preview
The Semantic WebMatt Klubertanz
What is it?
•“The Semantic Web is an extension of the current web in which information is given well-defined meaning, better enabling computers and people to work in cooperation.” (Tim Berners-Lee)
What will be covered
•A little history•Semantic Web growth•The three foundations
▫RDF▫OWL▫SPARQL
•Demo of SPARQL query
History• Late 1989 Tim Berners-Lee proposed the idea of
HyperText Transfer Protocol (HTTP) and is credited with inventing the World Wide Web
• In 1994 Tim Berners-Lee founded the W3C (World Wide Web Consortium)
• In 1999 W3C gains interest in creating a new web. Tim Berners-Lee gives it the name “Semantic Web”
• W3C has been developing standards involved in the Semantic Web since.
Semantic Web Growth
•Over the past few years the Semantic Web has really been picking up momentum
•The amount of data being linked in the Semantic Web has been growing exponentially
Linking Open Data cloud diagram, by Richard Cyganiak and Anja Jentzsch. http://lod-cloud.net/
Linking Open Data cloud diagram, by Richard Cyganiak and Anja Jentzsch. http://lod-cloud.net/
Linking Open Data cloud diagram, by Richard Cyganiak and Anja Jentzsch. http://lod-cloud.net/
Linking Open Data cloud diagram, by Richard Cyganiak and Anja Jentzsch. http://lod-cloud.net/
DBpedia
•Is structured data from Wikipedia•Has become basically the central hub for
the Semantic Web•According to DBpedia it has a knowledge
base that currently describes 4 million things
•They also say that they have about 2.46 billion RDF triples
RDF
•Stands for Resource Description Framework
•Framework for describing data on the Semantic Web
•Uses URI’s (Universal Resource Identifier)▫URL’s are a type of URI▫So an identifier in RDF could use a URL▫Ex.
I could use http://www.somesite.com/people/about/Matt to refer to any data about myself
RDF cont.• RDF is written in XML• RDF uses statements or triples to describe data
▫Subject▫Predicate▫Object
• Simple Example▫ <?xml version="1.0"?>
<RDF> <Description about="http://www.somesite.com/rdf"> <person>Matt Klubertanz</person> <location>Platteville</location> </Description></RDF>
OWL•Stands for Web Ontology Language•Built on top of RDF•Adds the following to RDF according to W3C
▫“Ability to be distributed across many systems”▫“Scalability to Web needs”▫“Compatibility with Web standards for
accessibility and internationalization”▫“Openness and extensibiltiy”
•Basically adds more vocabulary on top of RDF
SPARQL•A language used to perform RDF queries•Used to get data from the Semantic Web•Uses the RDF triples to preform the queries•SPARQL 1.0 was the official
recommendation of the W3C in 2008•Then in March of 2013 the official
recommendation became SPARQL 1.1•SPARQL 1.1 added features like subqueries
and negation as well as expanded the set of functions and operators
SPARQL structure
#prefix declarations of URIsPREFIX prop: http://somesite.com/properties/ ... SELECT ... WHERE { ... }ORDER BY ...
Example of SPARQL
PREFIX type: <http://dbpedia.org/class/yago/>
PREFIX prop: <http://dbpedia.org/property/> SELECT ?country_name ?population WHERE {
?country a type:LandlockedCountries ; rdfs:label ?country_name ; prop:populationEstimate ?population .
FILTER (?population > 15000000 && langMatches(lang(?country_name), "EN")) .
} ORDER BY DESC(?population)
Built in Functions• Logical:
▫ !, &&, ||• Math:
▫ +, -, *, /• Comparison:
▫ =, !=, >, <, IN, NOT IN...• SPARQL tests:
▫ isURI, isBlank, isLiteral, isNumeric, bound• SPARQL accessors:
▫ str, lang, datatype• Other:
▫ sameTerm, langMatches, regex, REPLACE• Conditionals (SPARQL 1.1):
▫ IF, COALESCE, EXISTS, NOT EXISTS• Constructors (SPARQL 1.1):
▫ URI, BNODE, STRDT, STRLANG, UUID, STRUUID
Built in Functions cont.• Strings (SPARQL 1.1):
▫ STRLEN, SUBSTR, UCASE, LCASE, STRSTARTS, STRENDS, CONTAINS, STRBEFORE,STRAFTER, CONCAT, ENCODE_FOR_URI
• More math (SPARQL 1.1): ▫ abs, round, ceil, floor, RAND
• Date/time (SPARQL 1.1): ▫ now, year, month, day, hours, minutes, seconds, timezone, tz
• Hashing (SPARQL 1.1): ▫ MD5, SHA1, SHA256, SHA384, SHA512
Running SPARQL queries
•http://dbpedia.org/sparqlPREFIX type: <http://dbpedia.org/class/yago/> PREFIX prop: <http://dbpedia.org/property/> SELECT ?country_name ?population WHERE { ?country a type:LandlockedCountries ; rdfs:label ?country_name ; prop:populationEstimate ?population . FILTER (?population > 15000000 && langMatches(lang(?country_name), "EN")) . } ORDER BY DESC(?population)
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>PREFIX dbp: <http://dbpedia.org/ontology/>SELECT * WHERE {
?city rdf:type <http://dbpedia.org/class/yago/CitiesInWisconsin> ;
dbp:populationTotal ?popTotal .FILTER (?popTotal > 20000)
}ORDER BY desc(?popTotal)
References• Berners-Lee, Tim. "Tim Berners-Lee: The next Web." Lecture. TED. Mar. 2009. Web.
<http://www.ted.com/talks/tim_berners_lee_on_the_next_web.html>.
• Feigenbaum, Lee, and Eric Prud'hommeaux. "SPARQL by Example - Cambridge Semantics." Cambridge Semantics. N.p., 30 May 2013. Web. 23 Sept. 2013. <http://www.cambridgesemantics.com/semantic-university/sparql-by-example>.
• Hori, Masahiro, Jérôme Euzenat, and Peter F. Patel-Schneider. "OWL XML Syntax: OWL Examples in XML Syntax." W3C. N.p., 11 June 2003. Web. 23 Sept. 2013. <http://www.w3.org/TR/owl-xmlsyntax/apd-example.html>.
• Prud'hommeaux, Eric, and Andy Seaborne. "SPARQL Query Language for RDF." SPARQL Query Language for RDF. N.p., 15 Jan. 2008. Web. 23 Sept. 2013. <http://www.w3.org/TR/rdf-sparql-query/>.
• Wang, Xia, and Wolfgang A. Halang. Discovery and Selection of Semantic Web Services. Heidelberg: Springer, 2013. Print.
• Crowther, Rob. "Planning a Semantic Web Site." Planning a Semantic Web Site. N.p., 10 Apr. 2008. Web. 11 Nov. 2013.
• Cyganiak, Richard and Jentzsch Anja. Linking Open Data cloud diagram. 28 Sept. 2013 http://lod-cloud.net/
Questions?