250 likes | 265 Views
Reasoning and Querying for the Web http://urq.deri.ie. Dr. Axel Polleres. Problem: The Web is not(!) a database. Dynamics: historical data changes, trends. <RDF>. Sensors: limited resources distribution incomplete data. <XML>. RDBMS. Social Interactions: Aggregated view vs.
E N D
Reasoning and Querying for the Webhttp://urq.deri.ie Dr. Axel Polleres
Problem: The Web is not(!) a database • Dynamics: • historical data • changes, trends <RDF> • Sensors: • limited resources • distribution • incomplete data <XML> RDBMS • Social Interactions: • Aggregated view vs. • privacy concerns <HTML> • Heterogeneity: • Health records • Digital Libraries, CMS, blogs… … and btw. WWW, 10 billion+ pages going up • "If HTML and the Web made all the online documents look like one huge book, RDF, schema and inference languages will make all the data in the world look like one huge database„ Tim Berners-Lee, Weaving the Web, 1999 • Database? Not quite! Still, we want an integrated view! CMS <www> RDBMS
For Today – Let’s stick with mainly the first box: 0) Where is the data? 1) Formal languages & how they interplay 2) Reasoning with Web data 3) Querying Web data
0) Prerequisite – Good news! • Thanks to UDI2, UIMR, USCS, UNLP, USM etc. we may assume to already have loads of RDF/OWL data available: • Crawled from the Web, Linked Data Cloud • From Semantic Desktop • Mined/aggregated from Sensors • Extracted by shallow NLP techniques from text • Etc. • Cool, now how shall we aggregate it?
1) Languages & how they interplay • Challenges: • Querying XML & RDF: XQuery & SPARQL • Ontologies & Rules: OWL2 & RIF • Querying Ontologies & Rules: SPARQL/OWL+RIF
XSPARQL: Bringing XML and RDF closer! • What if I want to translate all my RDF and OWL data back to XML? • E.g. Display FOAF data on a KML map. • What to use? Custom Script? XSLT? SPARQL?
XSPARQL: Close the gap in the Web of Data: XSLT/XQuery HTML RSS <XML/> XSPARQL SOAP/WSDL SPARQL
Example: Generate KML from FOAF+Geo: • XSPARQL+FOAF and GEO data enables KML map data: <kml xmlns="http://www.opengis.net/kml/2.2"> { for $person $name $long $lat from <http://www.deri.ie/Stefan_Decker> where { $person a foaf:Person; foaf:name $name; foaf:based_near [ geo:long $long; geo:lat $lat ] } return <Placemark> <name>{fn:concat("Location of ", $name)}</name> <Point> <coordinates>{fn:concat($long, ",", $lat, ",0")}</coordinates> </Point> </Placemark> } </kml> http://www.deri.ie/Stefan_Decker#me 53.272900 foaf:name foaf:locatedIn geo:lat “Stefan Decker” http://dbpedia.org/Galway geo:lat -9.041800 More: http://xsparql.deri.org/spec/xsparql-use-cases.html
XSPARQL “crew” • Nuno Lopes • Stefan Bischof • Alumni: • Waseem Akhtar • Thomas Krennwallner
Reasoning needed! http://www.deri.ie/Stefan_Decker#me • SELECT ?N WHERE {?P foaf:Name ?N } Returns: “Stefan Decker” foaf:name “Stefan Decker”
Reasoning needed! http://www.deri.ie/Stefan_Decker#me • SELECT ?N WHERE {?P a foaf:Person; foaf:Name ?N } Returns: nothing Why? RDFS reasoning needed! Together with: foaf:knows rdfs:domain foaf:Person We could infer that Stefan is a person… Too bad, standard SPARQL (and XSPARQL) engines don’t do this! You may think this is easy… just add the inferred triples, but… foaf:name “Stefan Decker” foaf:knows axel
Reasoning and SPARQL is tricky! http://www.deri.ie/Stefan_Decker#me • Let’s assume we know: • Every Person who is known has a name • Cool, we can write this in OWL! • Cool, let’s do SPARQL over it! Let’s ask for names of all known Persons? SELECT ?N { [] foaf:knows ?P. ?P foaf:name ?N } • Shouldn’t have an answer, or should it? foaf:name “Stefan Decker” foaf:knows axel
Reasoning and SPARQL is tricky! http://www.deri.ie/Stefan_Decker#me • Let’s assume we know: • Every Person who is known is has a name • Cool, we can write this in OWL! • Now how about this one: Is there a known person with a name? ASK?N { [] foaf:knows ?P. ?P foaf:name ?N } • Hmmm, should have an answer, or shouldn’t it? foaf:name “Stefan Decker” foaf:knows axel
RDF & OWL don’t solve heterogeneity • Example assumed we had Stefan’s data in FOAF, • but in my desktop application, I might have e.g. vCard instead: • Needs more than OWL! Rules, Alignments! • E.g.: { ?P foaf:name ?N } :- { ?P vCard:Given ?G; vCard:Family ?F ?N = fn:concat(?G, “ “, ?F) } http://www.deri.ie/Stefan_Decker#me foaf:name “Stefan Decker” http://exa,org/myAddrbook/Stefan_Decker vCard:Given “Stefan” vCard:Family “Decker”
Reasoning needed! • W3C SPARQL Working Group • W3C OWL2 WG • W3C Rule Interchange Format Working groups work on new standards to solve these issues … and more! • DERI members involved: • SPARQL: Alex Passant & myself (co-chair) • OWL2: Antoine Zimmermann • RIF: myself
2) Reasoning with Web Data • Challenges • Authoritativeness • Scale • Completeness, Consistency
Who can say what & where on the Web?? • Authoritative Reasoning : Who gets to say what • FOAF spec authoritative for foaf:Person✓ • MY spec not authoritative for foaf:Person✘ • Only allow extension in authoritative documents • my:Person rdfs:subClassOf foaf:Person . (MY spec) ✓ • BUT: Reduce obscure memberships • foaf:Person rdfs:subClassOf my:Person . (MY spec) ✘ • ALSO: Protect specifications • foaf:mbox rdf:type owl:SymmetricProperty . (MY spec) ✘ • Linear scale for most rules • 1.1bn in => 1.1+1.9bn out • <10 hours Check our ASWC paper! Tech Report! Journal version to come at IJSWIS! Ontology Hijacking
Reasoning with Web Data • Aidan Hogan • SAOR/SWSE (planned work): • extend SAOR to support OWL2 • datatype support • develop SPARQL(2) on top of SWSE • Validation of Web data • Alumni: Andreas Harth • Antoine Zimmermann • Reasoning with Alignments • Gergely Lukacsy • Complete DL Reasoning (OWL2) at large scale
3) Querying Web Data • Challenges: • Finding/Querying Distributed SPARQL endpoints • More ideas we currently work on: • Query distributed SPARQL endpoints • Querying Temporal data on the Web (e.g. Wikis, ontologies)
Help the end user • Challenges: • End users don’t want to write RDF • End users don’t speak OWL • End users don’t care about SW! • How can we change this? • Help users to find the right ontologies to use • How to avoid the publication of messy Web data in first place
Help the end user: Semantic Drupal: Enable data mining, text-analysis, reasoning, aggregation, trend detection over different platforms
Semantic Drupal: Populate the Web of Data Reasonably • Check prototype at: http://drupal.org/project/rdfcck • Main developer: Stéphane Corlosquet • Also check our TR! • Explains Reasoning in the background • Next Steps: • Not only export RDF from Drupal, but also allow Drupal Sites to consume Linked Data and act as SPARQL endpoints • Ontology Term Search Engine (powered by SWSE&Sindice, Antoine, Aidan & Renaud) for easier vocab linkage • Stéphane to conclude his MSc thesis
What I didn’t talk about: • Projects, Collaborations • Upcoming visitors • (Prof. George Vouros, Prof. Piero Bonatti) • Things cooking • Reasoning/Querying over heterogeneous data from DERI HCLS Domain (Ratnesh Sahay & Antoine Zimmermann) • Temporal SPARQL • GiaBATA Rules and Ontology aware SPARQL engine • …
Outlook • That was some, but not ALL of the things happening in our research Unit. • Formal languages & how they interplay • Reasoning with Web data • Querying Web data • If you have questions on SW standards! • If you have questions about Reasoning& Querying techniques on RDF/OWL/RIF You are welcome to ask us! Let’s deploy the Semantic Web reasonably!