Upload
steffen-staab
View
402
Download
0
Embed Size (px)
Citation preview
Steffen Staab Programmatic Access to Semantic Data 1Institute for Web Science and Technologies · University of Koblenz-Landau, GermanyWeb and Internet Science Group · ECS · University of Southampton, UK &
Semantic Technologies and Programmatic Access to Semantic Data
Steffen Staab
University of Southampton &
Universität Koblenz-Landau
Steffen Staab Programmatic Access to Semantic Data 2
Traditional Information System
Business Logics
Structured DataUnstructured
Data
Presentation and Interaction
Charakteristics:• Processes known• Data structures
known• Meaning of data in
schema and implicit in code
Steffen Staab Programmatic Access to Semantic Data 3
Information ecosystems nowadaysExamples• Open Data• 1000s
DBs/company• Ad-hoc data
Characteristics• Some structure• Late structure• Social context• Meaning of data
most important
Steffen Staab Programmatic Access to Semantic Data 4
How does data receive meaning?Explicit:• Formal schema/ontology
– By someone else?
Implicit:• Names are just used for
describing
Social:• Communities converge
– By discussion– By emergence
Meaning?
Steffen Staab Programmatic Access to Semantic Data 5
Talking many languages...
Sub languages• For consumer
– title,...• Global retailers
– barcode• US food industry
– serving size, calories,...• Producer
– batch number...
https://www.youtube.com/watch?v=ga1aSJXCFe0
Depending on who you are – you encounter the (un)expected, the (un)known, the (un)understandable,...
Steffen Staab Programmatic Access to Semantic Data 6
The Unknown
https://www.flickr.com/photos/wrobel/8175902444/
Steffen Staab Programmatic Access to Semantic Data 7
We know a bit.... 1. URIs as identifiers
2. http lookup
3. RDF (triples)
4. relations, also to other locations
Steffen Staab Programmatic Access to Semantic Data 8
What is/should Linked Data good for?• Data integration is (relatively) easy
– Migrating different data sources to linked data is (relatively) easy
• Late schema is easy– Just add some more fields
• Ignoring data is easy– Think of crisps
• Serendipitous use– Discover new information &
new sources by following links
• Data repurposing / pointing– Use what others have done at both schema
and data level
Dealing w
ith the unknown
data and data schema
Steffen Staab Programmatic Access to Semantic Data 9
Issue: From Data Publishing to Understanding
?
De-contextualization Re-contextualization
Publishing data the structure of which you know is easier than understanding what you do not know
Steffen Staab Programmatic Access to Semantic Data 10
Example scenario: JamendoData about license free music• ~ 1 Million triples• classes and predicates
from 18 different ontologies– FOAF, Tag ontology,
music ontology, …
Simple programming task:• List for every music artist,
all the records they made
Steffen Staab Programmatic Access to Semantic Data 11
Software Development Process Overview
data model design
revised data model design
data model prototype
data queries
final data model
Creation of initial data
model
Exploration of the data
source
Creation of model in
code
Query design / implementation
Mapping of query results
Steffen Staab Programmatic Access to Semantic Data 12
Accessing Artists Using Apache Jena
Steffen Staab Programmatic Access to Semantic Data 13
From artists to songs
Observations• SPARQL queries are strings• Results are strings• Requires good understanding of the data source
No semantics, just syntax
Steffen Staab Programmatic Access to Semantic Data 14
Programming Language Support for RDF Access
Static Typing Errors detected before
execution Misspelling discovered by
compiler! Anectode: 2nd place
because of misspelt code Static types are form of
documentation Less knowledge about
data source required Better IDE integration /
autocompletion
Code generation• Sommer• Winter• OntoMDEDynamic Typing E.g. ActiveRDF
(Oren et al 2007)) “convention over
configuration” dynamic
metaprogramming allows for slick code
Steffen Staab Programmatic Access to Semantic Data 15
Programming with Linked Data
Steffen Staab Programmatic Access to Semantic Data 16
c1
Programming with Linked Data
Tasks of the Programmer 1 Schema exploration
2 Programming code types
3 Programming queries
4 Programming procedures for
• creating, • manipulating,• persisting
objects
Steffen Staab Programmatic Access to Semantic Data 17
Node Path Query Language Using AutocompletionExploration of classes
Steffen Staab Programmatic Access to Semantic Data 18
Node Path Query Language Using AutocompletionExploration of classes
Exploration of relations
Steffen Staab Programmatic Access to Semantic Data 19
Node Path Query Language: Query FormulationExploration of classesExploration of relationsQuerying for instances
Type set of mo:MusicArtist
No definition or declaration needed
Steffen Staab Programmatic Access to Semantic Data 20
Node Path Query Language for Code DevelopmentExploration of classesExploration of relationsQuerying for instancesDeveloping code with queries
All translated into SPARQL queries at• Development time• Type inference at compile time
(but also as part of IDE)• Querying again at run time
One language to bind them all
Steffen Staab Programmatic Access to Semantic Data 21
Node Path Query Language for Code DevelopmentExploration of classesExploration of relationsQuerying for instancesDeveloping code with queriesDeveloping code with new classes
All translated into SPARQL queries at• Development time• Run time update• Persistence!
Steffen Staab Programmatic Access to Semantic Data 22
NPQLNPQL (Node Path Query Language)• Intensional Queries Describing RDF classes and properties for reuse in IDE and in host language metaprogramming
• Extensional Queries Class instances and property instances
• Compilation to SPARQL for reuse of existing endpoints
Ongoing discussion about details of NPQL
Steffen Staab Programmatic Access to Semantic Data 23
LITEQNPQL (Node Path Query Language)• Intensional Queries• Extensional Queries• Compilation to SPARQL
LITEQ (Language Integrated Types, Extensions and Queries) • Implementation of NPQL as F# Type Provider in Visual Studio• Autocompletion using NPQL queries• Automatic typing
of extensional query resultsby intensional queries
Steffen Staab Programmatic Access to Semantic Data 24
Outlook: Programming with Linked Data• More expressive query languages
– Derived data types in tractable description logics!
• More precise combined type inference– (derived) type from data source– type inference in programming language
• Programming across data sources– Federated queries– Linktraversal-based queries (the unknown sources)
• Integration of schema induction – Low quality of schema/ontologies
• Improved autocompletion
Steffen Staab Programmatic Access to Semantic Data 25
Conclusion
Steffen Staab Programmatic Access to Semantic Data 26
Issue: From Data Publishing to Unknown Data Understanding
CognitionStorytellingPragmatics
Ontology PatternsConceptual Modeling
Metamodels...
QuantityPertinenceManner
Steffen Staab Programmatic Access to Semantic Data 27
What is missing?...a lot...
• Indexing• Search• Data and schema quality• Pragmatics• ...
Steffen Staab Programmatic Access to Semantic Data 28
Semantic Web
Social Web & Web Retrieval
Interactive Web & Human Computing
Web & Economy
Software & Services
Computational Social Science
Thank You!