A Contextualized Knowledge Repository for Open Data about Trentino

Preview:

DESCRIPTION

 

Citation preview

A Contextualized Knowledge Repository forOpen Data about Trentino

Loris Bozzato Gaetano Calabrese Luciano Serafini

Data and Knowledge Management Research Unit,Fondazione Bruno Kessler, Trento, Italy

Trento, July 30, 2014

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 1 / 39

Outline

1 Introduction: context in Semantic Web and Linked Open Data

2 Theory of contexts in AI

3 Contextualized Knowledge Repository (CKR)

4 Reasoning in CKR

5 CKR Prototype implementation

6 A CKR for Trentino Open Data

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 2 / 39

Outline

1 Introduction: context in Semantic Web and Linked Open Data

2 Theory of contexts in AI

3 Contextualized Knowledge Repository (CKR)

4 Reasoning in CKR

5 CKR Prototype implementation

6 A CKR for Trentino Open Data

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 3 / 39

Introduction and motivation

Need for context in Semantic WebMost of Semantic Web data holds in specific contextual space(time, location, topic...)

No explicit support for modelling and reasoningwith context sensitive knowledge in SW(Often handcrafted in implementation)

Ô Need for well-defined theory of contexts

Contextualized Knowledge Repository (CKR)DL based framework for representation and reasoning withcontextual knowledge in the Semantic WebContextual theory: based on formal AI theories of context[McCarthy, 1993, Lenat, 1998, Giunchiglia and Ghidini, 2001]

Other DL contextual frameworks:[Bao et al., 2010, Klarman and Gutiérrez-Basulto, 2010].

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 4 / 39

Introduction and motivation

Need for context in Semantic WebMost of Semantic Web data holds in specific contextual space(time, location, topic...)

No explicit support for modelling and reasoningwith context sensitive knowledge in SW(Often handcrafted in implementation)

Ô Need for well-defined theory of contexts

Contextualized Knowledge Repository (CKR)DL based framework for representation and reasoning withcontextual knowledge in the Semantic WebContextual theory: based on formal AI theories of context[McCarthy, 1993, Lenat, 1998, Giunchiglia and Ghidini, 2001]

Other DL contextual frameworks:[Bao et al., 2010, Klarman and Gutiérrez-Basulto, 2010].

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 4 / 39

Contextual modelling needs

A study on typical use of context in SW lead us to the definition ofa set of representation requirements:

RequirementsStatement contextualization: associate context to factsSymbols locality: local meaning for symbolsCross-context TBox statements: knowledge relations across contextsComplex contextualization: more than one contextual values to factsModularity: separation of knowledge in independent modulesUnified reasoning and query: inference and query use context structure. . .

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 5 / 39

Contextual modelling needs

A study on typical use of context in SW lead us to the definition ofa set of representation requirements:

RequirementsStatement contextualization: associate context to factsSymbols locality: local meaning for symbolsCross-context TBox statements: knowledge relations across contextsComplex contextualization: more than one contextual values to factsModularity: separation of knowledge in independent modulesUnified reasoning and query: inference and query use context structure. . .

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 5 / 39

Outline

1 Introduction: context in Semantic Web and Linked Open Data

2 Theory of contexts in AI

3 Contextualized Knowledge Repository (CKR)

4 Reasoning in CKR

5 CKR Prototype implementation

6 A CKR for Trentino Open Data

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 6 / 39

Contextual knowledge representation and reasoning

Every formula is asserted in a context, i.e., there is no absolutetruth:

ist(c1, Winner(Italy))ist(c2, Winner(Spain))

Contexts are first class objects, and the logic provides terms todenote contexts, and formulas to predicate about contexts:

is_about(c1, FifaWorldCup) time(c1, 2006)is_about(c2, FifaWorldCup) time(c2, 2010)is_about(c3, Football) time(c3, 2000− 2010)

disjoint(c1, c2) covers(c3, c1) covers(c3, c2)

knowledge propagates across contexts:

∀x(ist(c1, Winner(x))→ ist(c2.Team(x))

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 7 / 39

Contextual knowledge representation and reasoning

Every formula is asserted in a context, i.e., there is no absolutetruth:

ist(c1, Winner(Italy))ist(c2, Winner(Spain))

Contexts are first class objects, and the logic provides terms todenote contexts, and formulas to predicate about contexts:

is_about(c1, FifaWorldCup) time(c1, 2006)is_about(c2, FifaWorldCup) time(c2, 2010)is_about(c3, Football) time(c3, 2000− 2010)

disjoint(c1, c2) covers(c3, c1) covers(c3, c2)

knowledge propagates across contexts:

∀x(ist(c1, Winner(x))→ ist(c2.Team(x))

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 7 / 39

Contextual knowledge representation and reasoning

Every formula is asserted in a context, i.e., there is no absolutetruth:

ist(c1, Winner(Italy))ist(c2, Winner(Spain))

Contexts are first class objects, and the logic provides terms todenote contexts, and formulas to predicate about contexts:

is_about(c1, FifaWorldCup) time(c1, 2006)is_about(c2, FifaWorldCup) time(c2, 2010)is_about(c3, Football) time(c3, 2000− 2010)

disjoint(c1, c2) covers(c3, c1) covers(c3, c2)

knowledge propagates across contexts:

∀x(ist(c1, Winner(x))→ ist(c2.Team(x))

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 7 / 39

“Context as a box” representation paradigm

a context is a theory—set of sentences in a logical language,closed under logical consequence—associated with a region in acontextual space;

Location

Time

Topic

South africa

FIFA world cup

Spain.Qualified.FirstHolland.Qualified.Second

best_player(Cavani)...

2010

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 8 / 39

Context as a Box

C =

time(C, 2010− 06− 14), location(C, World), topic(C, FIFA_WC_Match_11)

TeamA(Team_Italy)TeamB(Team_Paraguay)Referee(Benito_Archundia)scored(Daniele_Derossi, 63◦)scored(Antolin_Alcaraz, 39◦)match_document(http : //www.fifa.com/mm/document/.../...5fstart.pdf )match_document(http : //www.fifa.com/mm/document/.../...5lineup.pdf )photo(http : //www.fifa.com/mm/pict/.../...xyz.jpg). . .

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 9 / 39

Contextual dimension

From Doug Lenat (CYC)TIME e.g.: 2001, 20/3/2009-20/3/2011,. . .

TYPEOFTIME e.g., NightTime, DuringWorldWarII, . . .

GEOLOCATION e.g. Italy, Spain, London, . . .

TYPEOFPLACE e.g. Country, Office, Town, . . .

CULTURE e.g., Political Culture, Democratic political culture, sport, . . .

SOPHISTICATION/SECURITY who can access knowledge of this context? e.g,physicians, Manager, Human Resources stuff, . . .

TOPIC what is a context about? Values are taken from topic classification systems

GRANULARITY from molecular to cellular to organ to organism to society level

MODALITY beliefs, agreements, expectations, memories, etc.,

ARGUMENT-PREFERENCE What is the (default) set of heuristics used in thiscontext, to resolve pro/con argument clashes?

JUSTIFICATION e.g., definitional, causal, statistical, appeals to intuition, by faith, byassumption, etc.

DOMAIN ASSUMPTIONS . . .

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 10 / 39

Contextual dimension

Requirements from the Semantic WebTIME information on when knowledge holdsPROVENANCE information about the source from which

knowledge comes fromACCESS CONTROL information on access rights on knowledgePROPOSITIONAL ATTITUDES beliefs and modalitiesVERSIONING/EVOLUTION information on how knowledge

evolvesTRUST information about bow reliable is the infomration

contained in a context.

generalizing. . .We develop a general logical framework that supports n dimensions.

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 11 / 39

Outline

1 Introduction: context in Semantic Web and Linked Open Data

2 Theory of contexts in AI

3 Contextualized Knowledge Repository (CKR)

4 Reasoning in CKR

5 CKR Prototype implementation

6 A CKR for Trentino Open Data

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 12 / 39

CKR introduction

The structure of a CKR is composed by 2 layers:

Global contextMetaknowledge: structure of contexts, context classes, relations,modules and attributes(Global) object knowledge:object knowledge shared by all contexts

(Local) contextsObject knowledge with references:local object knowledge with references to value of predicates inother contextsKnowledge distributed across different modules

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 13 / 39

SROIQ-RL

Restriction of SROIQ to the syntax of OWL-RL axioms:Left-side concept C:

C := A | {a} |C1 u C2 |C1 t C2 | ∃R.C1 | ∃R.{a} | ∃R.>

Right-side concept D:

D := A |D1 uD2 | ¬C1 | ∀R.D1 | ∃R.{a} | 6 nR.C1 | 6 nR.>

with n ∈ {0, 1}Both-side concept E:

E := A |E1 u E2 | ∃R.{a}

TBox axioms: C v D, E ≡ EABox axioms: D(a), R(a, b)

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 14 / 39

Metalanguage LΓ

Metavocabulary: Γ = NCΓ ]NRΓ ]NIΓ

N ⊆ NIΓ: context namesM ⊆ NIΓ: module namesC ⊆ NCΓ: context classes, including class CtxR ⊆ NRΓ: contextual relationsA ⊆ NRΓ: contextual attributesFor A ∈ A, a set DA ⊆ NIΓ of attribute values of A

Metalanguage LΓ: SROIQ-RL axioms over context expressions:

C := B | {c} |C1 uC2 |C1 tC2 | ∃R.C1 | ∃R.{c} | ∃R.> | ∃A.{dA} | ∃mod.{m}D := B |D1 uD2 | ¬C1 | ∀R.D1 | ∃R.{c} | ∃A.{dA} | ∃mod.{m} |

6 nR.C1 | 6 nR.>E := B |E1 u E2 | ∃R.{c} | ∃A.{dA} | ∃mod.{m}

Individual variable this: c ∈ N∪ {this}

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 15 / 39

Metalanguage LΓ

Metavocabulary: Γ = NCΓ ]NRΓ ]NIΓ

N ⊆ NIΓ: context namesM ⊆ NIΓ: module namesC ⊆ NCΓ: context classes, including class CtxR ⊆ NRΓ: contextual relationsA ⊆ NRΓ: contextual attributesFor A ∈ A, a set DA ⊆ NIΓ of attribute values of A

Metalanguage LΓ: SROIQ-RL axioms over context expressions:

C := B | {c} |C1 uC2 |C1 tC2 | ∃R.C1 | ∃R.{c} | ∃R.> | ∃A.{dA} | ∃mod.{m}D := B |D1 uD2 | ¬C1 | ∀R.D1 | ∃R.{c} | ∃A.{dA} | ∃mod.{m} |

6 nR.C1 | 6 nR.>E := B |E1 u E2 | ∃R.{c} | ∃A.{dA} | ∃mod.{m}

Individual variable this: c ∈ N∪ {this}

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 15 / 39

Metalanguage LΓ

Metavocabulary: Γ = NCΓ ]NRΓ ]NIΓ

N ⊆ NIΓ: context namesM ⊆ NIΓ: module namesC ⊆ NCΓ: context classes, including class CtxR ⊆ NRΓ: contextual relationsA ⊆ NRΓ: contextual attributesFor A ∈ A, a set DA ⊆ NIΓ of attribute values of A

Metalanguage LΓ: SROIQ-RL axioms over context expressions:

C := B | {c} |C1 uC2 |C1 tC2 | ∃R.C1 | ∃R.{c} | ∃R.> | ∃A.{dA} | ∃mod.{m}D := B |D1 uD2 | ¬C1 | ∀R.D1 | ∃R.{c} | ∃A.{dA} | ∃mod.{m} |

6 nR.C1 | 6 nR.>E := B |E1 u E2 | ∃R.{c} | ∃A.{dA} | ∃mod.{m}

Individual variable this: c ∈ N∪ {this}

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 15 / 39

Object language LΣ

Object vocabulary: any DL vocabulary Σ = NCΣ ]NRΣ ]NIΣ

Eval expressionGiven X an object expression in Σ and C a context expression in Γ

eval(X, C)

“The interpretation of X in all the contexts of type C”

Left-side only: “imports” meaning of X from all of the contexts in C

Object language LΣ: SROIQ-RL axioms over object expressions

Object language with references LeΣ: extension with eval expressions

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 16 / 39

Contextualized Knowledge Repository

Contextualized Knowledge Repository:

K = 〈G, {Km}m∈M〉

G is a KB over Γ ∪ Σ, containing metalanguage axioms in LΓ orglobal object axioms in LΣ

for every module name m ∈ M,Km is a KB over Σ, containing object axioms with references in Le

Σ

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 17 / 39

A CKR for representing provenance, access-control,and trust metadata (PlanetData EU Project

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 18 / 39

Tourism example: introduction

Tourism example:Idea: Tourism recommendation for events in TrentinoStructure of contexts represent events and tourists information

Ô Task: find interesting events on the base of tourists’ preferences

We model this domain in a CKR Ktour = 〈G, {Km}m∈M〉

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 19 / 39

Tourism example: CKR structure

Event

CulturalEvent SportEvent

VolleyMatch VolleyA1

Competition Concert

Tourist

SportiveTourist CulturalTourist

campionato_A1_2012-13 trento_cuneo_120922

volley_fan_01

trento_latina_130203 modena_trento_130112

G

hasParentEvent

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 20 / 39

Tourism example: CKR structure

Event

CulturalEvent SportEvent

VolleyMatch VolleyA1

Competition Concert

Tourist

SportiveTourist CulturalTourist

campionato_A1_2012-13 trento_cuneo_120922

volley_fan_01

trento_latina_130203 modena_trento_130112

G

m_sport_ev

m_event

m_v_match

m_match1 m_match2 m_match3

m_tourist

m_sp_tourist

m_tourist01

hasParentEvent

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 20 / 39

Tourism example: CKR structure

Event

CulturalEvent SportEvent

VolleyMatch VolleyA1

Competition Concert

Tourist

SportiveTourist CulturalTourist

campionato_A1_2012-13 trento_cuneo_120922

volley_fan_01

trento_latina_130203 modena_trento_130112

G

Kevent

m_sport_ev

m_event

m_v_match

m_match1 m_match2 m_match3

m_tourist

m_sp_tourist

m_tourist01

Ksport_ev Kv_match Kmatch1 ... Ktourist01

hasParentEvent

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 20 / 39

Tourism example: some modules contents

In Kv_match: HomeTeam v Team HostTeam v TeamWinner v Team Loser v Team

In Kmatch2: HomeTeam(casa_modena_volley) HostTeam(itas_trentino_volley)Winner(casa_modena_volley) Loser(itas_trentino_volley)

...In Ksport_ev: “Winners of major volley matches are top teams”

eval(Winner, VolleyMatch u∃hasParentEvent.VolleyA1Competition) v TopTeam

In Ksp_tourist: “Top teams are preferred teams”

eval(TopTeam, SportEvent) v PreferredTeam

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 21 / 39

Tourism example: some modules contents

In Kv_match: HomeTeam v Team HostTeam v TeamWinner v Team Loser v Team

In Kmatch2: HomeTeam(casa_modena_volley) HostTeam(itas_trentino_volley)Winner(casa_modena_volley) Loser(itas_trentino_volley)

...In Ksport_ev: “Winners of major volley matches are top teams”

eval(Winner, VolleyMatch u∃hasParentEvent.VolleyA1Competition) v TopTeam

In Ksp_tourist: “Top teams are preferred teams”

eval(TopTeam, SportEvent) v PreferredTeam

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 21 / 39

Outline

1 Introduction: context in Semantic Web and Linked Open Data

2 Theory of contexts in AI

3 Contextualized Knowledge Repository (CKR)

4 Reasoning in CKR

5 CKR Prototype implementation

6 A CKR for Trentino Open Data

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 22 / 39

Materialization calculus Kic

Materialization calculus Kic:Calculus for instance checking in SROIQ-RL CKRExtension to the CKR structure of materialization calculus forSROEL of [Krötzsch, 2010]

Formalizes the operation of forward closure in implementation

IdeaComposed by 3 sets of rules:

Input rules I: translation of DL axioms to Datalog atomsDeduction rules P: forward inference rulesOutput rules O: translation for DL proved axiom

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 23 / 39

Translation and deduction rules

EL translation rules Iel(S, c)C(a) 7→ {inst(a, C, c)} R(a, b) 7→ {triple(a, R, b, c)}

{a} v C 7→ {inst(a, C, c)} A v C 7→ {subClass(A, C, c)}Au B v C 7→ {subConj(A, B, C, c)} ∃R.A v C 7→ {subEx(R, A, C, c)}

R v T 7→ {subRole(R, T, c)} R◦S v T 7→ {subRChain(R, S, T, c)}

EL deduction rules Pel

subClass(y, z, c),inst(x, y, c) → inst(x, z, c)subConj(y1, y2, z, c),inst(x, y1, c),inst(x, y2, c) → inst(x, z, c)subEx(v, y, z, c),triple(x, v, x′, c),inst(x′, y, c) → inst(x, z, c)

subRole(v, w, c),triple(x, v, x′, c) → triple(x, w, x′, c)subRChain(u, v, w, c),triple(x, u, y, c),triple(y, v, z, c) → triple(x, w, z, c)

Output translation O(α, c)C(a) 7→ {inst(a, C, c)} R(a, b) 7→ {triple(a, R, b, c)}

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 24 / 39

Translation and deduction rules

Global rules Iglob(G) and Pglob

C v ∃mod.{m} 7→ {hasMod(C, m, gm)} C ∈ C 7→ {subClass(C, Ctx, gm)}C v ∃A.{d} 7→ {hasAtt(C, A, d, gm)} c ∈ N 7→ {inst(c, Ctx, gm)}

{c} v ∃mod.{m} 7→ {triple(c, mod, m, gm)}{c} v ∃A.{d} 7→ {triple(c, A, d, gm)}

hasMod(c, m, gm),inst(x, c, gm)→ triple(x, mod, m, gm)hasAtt(c, a, d, gm),inst(x, c, gm)→ triple(x, a, d, gm)

Local rules Iloc(S, c) and Ploc

eval(A, C) v B 7→ {subEval(A, C, B, c)}eval(R, C) v T 7→ {subEvalR(R, C, T, c)}

subEval(a, c1, b, c),inst(c′, c1, gm),inst(x, a, c′)→ inst(x, b, c)subEvalR(r, c1, t, c),inst(c′, c1, gm),triple(x, r, y, c′)→ triple(x, t, y, c)

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 25 / 39

Outline

1 Introduction: context in Semantic Web and Linked Open Data

2 Theory of contexts in AI

3 Contextualized Knowledge Repository (CKR)

4 Reasoning in CKR

5 CKR Prototype implementation

6 A CKR for Trentino Open Data

L. Serafini et al. (DKM - FBK) A CKR for TOD Trento, July 30, 2014 26 / 39

CKR Prototype: introduction

The prototype extends the Sesame Javaframework with three modules:

CKR core – CKR implementation ontop of a Sesame RDF store

knowledge addition/removalclosure materializationSPARQL 1.1 queriestransactions

CKR server – extension of SesameServer & Workbench

exposes CKR primitivesincludes a SPARQL endpointincludes an admin UI

CKR client – library to access aCKR from a remote Java application

CKR client

CKR core

RDF store

(Sesame native, memory, OWLIM, Bigdata)

Client application

Client JVM

Server JVM

SPARQL client

CKR server

persistent storage

may embed in Java apps.

CKR API

SAIL API

CKR API

Sesame HTTP API

SPARQL endpoint

Admin interface

Web browser

Francesco Corcoglioniti (DKM - FBK) A CKR for TOD Trento, July 30, 2014 27 / 39

SPRINGLES

CKR Core is implemented on top of SPRINGLES: SParql-based RuleInference over Named Graphs Layer Extending Sesame

SPRINGLES

RDF store

CKR implementation

SAIL API

SAIL API

CKR API

CKR rules

CKR Core

add triple to context

add triple to graph

add triple; eval. rules and add inferences

SPRINGLES features:transparent/on-demand closurematerialization based on rulesrules encoded as SPARQL queriesaddressing Named Graphs (NG)customizable rule evaluation strategy

Why SPRINGLES:no inference over NGs in RDF stores

Why SPARQL:exploits optimized query enginescan scale to large KBs (cf. RETE)

Francesco Corcoglioniti (DKM - FBK) A CKR for TOD Trento, July 30, 2014 28 / 39

CKR calculus in SPRINGLES: rule example

:pel-c-subc a spr:Rule ;spr:head """ GRAPH ?mx { ?x rdf:type ?z } """ ;spr:body """ GRAPH ?m1 { ?y rdfs:subClassOf ?z }

GRAPH ?m2 { ?x rdf:type ?y }GRAPH sys:dep { ?mx sys:derivedFrom ?m1,?m2 }FILTER NOT EXISTS {

GRAPH ?m0 { ?x rdf:type ?z }GRAPH sys:dep { ?mx sys:derivedFrom ?m0 }

} """ .

?y rdfs:subClassOf ?z ?x rdf:type ?y

Context C

. . .

ckr:hasModule ckr:hasModule

Module ?m1 Module ?m2

triples in ckr:global

Francesco Corcoglioniti (DKM - FBK) A CKR for TOD Trento, July 30, 2014 29 / 39

CKR calculus in SPRINGLES: rule example

:pel-c-subc a spr:Rule ;spr:head """ GRAPH ?mx { ?x rdf:type ?z } """ ;spr:body """ GRAPH ?m1 { ?y rdfs:subClassOf ?z }

GRAPH ?m2 { ?x rdf:type ?y }GRAPH sys:dep { ?mx sys:derivedFrom ?m1,?m2 }FILTER NOT EXISTS {

GRAPH ?m0 { ?x rdf:type ?z }GRAPH sys:dep { ?mx sys:derivedFrom ?m0 }

} """ .

?y rdfs:subClassOf ?z ?x rdf:type ?y

Context C

. . .

sys:closureOf

ckr:hasModule ckr:hasModule ckr:hasModule

sys:derivedFrom

sys:derivedFrom

Module ?m1 Module ?m2 Module ?mx

triples in ckr:global

triples in sys:dep

Francesco Corcoglioniti (DKM - FBK) A CKR for TOD Trento, July 30, 2014 29 / 39

CKR calculus in SPRINGLES: rule example

:pel-c-subc a spr:Rule ;spr:head """ GRAPH ?mx { ?x rdf:type ?z } """ ;spr:body """ GRAPH ?m1 { ?y rdfs:subClassOf ?z }

GRAPH ?m2 { ?x rdf:type ?y }GRAPH sys:dep { ?mx sys:derivedFrom ?m1,?m2 }FILTER NOT EXISTS {

GRAPH ?m0 { ?x rdf:type ?z }GRAPH sys:dep { ?mx sys:derivedFrom ?m0 }

} """ .

?y rdfs:subClassOf ?z ?x rdf:type ?y ?x rdf:type ?z

Context C

. . .

sys:closureOf

ckr:hasModule ckr:hasModule ckr:hasModule

sys:derivedFrom

sys:derivedFrom

Module ?m1 Module ?m2 Module ?mx

triples in ckr:global

triples in sys:dep

inference

Francesco Corcoglioniti (DKM - FBK) A CKR for TOD Trento, July 30, 2014 29 / 39

CKR calculus in SPRINGLES: evaluation strategy

Composition of SPRINGLES primitives: parallel rule evaluation,sequence, fixpoint, repeat (not used by CKR)

:closure-strategyspr:sequenceOf ( :task_add_axioms :task_global_closure

:task_link_modules :task_ctx_closure ) .:task_add_axioms

spr:evalOf (:dep-glob :prp-ap :cls-thing :cls-nothing :dt-type ) .

:task_global_closurespr:bind "?g_inf = ckr:global-inf" ;spr:fixPointOf [ spr:evalOf (:pel-c-subc ... :pel-r-subrc :pgl-c-addmod:pgl-i-addmod :pgl-c-submodc :pgl-c-subattc ) ] .

:task_link_modulesspr:evalOf ( :dep-local-i :dep-local-c ) .

:task_ctx_closurespr:fixPointOf [ spr:evalOf (:pel-c-subc ... :pel-r-subrc:plc-c-subevalat :plc-c-subexeval ) ] .

Francesco Corcoglioniti (DKM - FBK) A CKR for TOD Trento, July 30, 2014 30 / 39

Outline

1 Introduction: context in Semantic Web and Linked Open Data

2 Theory of contexts in AI

3 Contextualized Knowledge Repository (CKR)

4 Reasoning in CKR

5 CKR Prototype implementation

6 A CKR for Trentino Open Data

Francesco Corcoglioniti (DKM - FBK) A CKR for TOD Trento, July 30, 2014 31 / 39

Import in RDF Store

OpenDataTN

Data

Package

page

Datasets

Download

Francesco Corcoglioniti (DKM - FBK) A CKR for TOD Trento, July 30, 2014 32 / 39

Import in RDF Store

OpenDataTN

Data

Package

page

Package

Metadata

RDF CSV JSON XML

Datasets

Download

Francesco Corcoglioniti (DKM - FBK) A CKR for TOD Trento, July 30, 2014 32 / 39

Import in RDF Store

OpenDataTN

Data

Package

page

Package

Metadata

RDF CSV JSON XML

Datasets

Download

Local

storage

Francesco Corcoglioniti (DKM - FBK) A CKR for TOD Trento, July 30, 2014 32 / 39

Import in RDF Store

OpenDataTN

Data

Package

page

Package

Metadata

Mapping +

RDF conversion

RDF

RDF CSV JSON XML

Datasets

Download

Local

storage

Francesco Corcoglioniti (DKM - FBK) A CKR for TOD Trento, July 30, 2014 32 / 39

Import in RDF Store

OpenDataTN

Data

Package

page

Package

Metadata

Mapping +

RDF conversion

RDF

Import

RDF Store

RDF CSV JSON XML

Datasets

Download

Local

storage

Francesco Corcoglioniti (DKM - FBK) A CKR for TOD Trento, July 30, 2014 32 / 39

Francesco Corcoglioniti (DKM - FBK) A CKR for TOD Trento, July 30, 2014 33 / 39

Francesco Corcoglioniti (DKM - FBK) A CKR for TOD Trento, July 30, 2014 34 / 39

Metalevel structure

hasMember

Package

p_biblioteche Dataset

d_biblioteche

07/08/14

hasCreationDate

"libri" hasTag

Francesco Corcoglioniti (DKM - FBK) A CKR for TOD Trento, July 30, 2014 35 / 39

Metalevel structure

hasMember

Package

p_biblioteche Dataset

d_biblioteche Mapping

Activity

d_biblioteche_ma

SourceFile MappingFile

d_biblioteche_json d_biblioteche_map

usedFile usedMap

wasGeneratedByMapping

07/08/14

hasCreationDate

"libri" hasTag

Francesco Corcoglioniti (DKM - FBK) A CKR for TOD Trento, July 30, 2014 35 / 39

RDF store measures

RDF Store measures:Total of imported datasets: 2078

RDF: 157JSON: 799CSV: 1122

Number of asserted and inferred triples: 21,201,011

Francesco Corcoglioniti (DKM - FBK) A CKR for TOD Trento, July 30, 2014 36 / 39

Query interface

MetaReasons

Server

REST interface

RDF Store

Query interface

SPARQL 1.1

REST GET request

Francesco Corcoglioniti (DKM - FBK) A CKR for TOD Trento, July 30, 2014 37 / 39

Thank you for listening

OpenData Trentino Repository

Loris Bozzato, Gaetano Calabrese, Luciano Serafini

https://dkm.fbk.eu/

DKM - Data and Knowledge Management Research Unit,FBK-Irst, Fondazione Bruno Kessler - Trento, Italy

Francesco Corcoglioniti (DKM - FBK) A CKR for TOD Trento, July 30, 2014 38 / 39

References I

Bao, J., Tao, J., and McGuinness, D. (2010).Context representation for the semantic web.In Procs. of WebSci10.

Giunchiglia, F. and Ghidini, C. (2001).Local Models Semantics, or Contextual Reasoning = Locality + Compatibility.Artificial Intelligence, 127:2001.

Klarman, S. and Gutiérrez-Basulto, V. (2010).ALCALC : a context description logic.In JELIA.

Krötzsch, M. (2010).Efficient Inferencing for OWL EL.In JELIA 2010, volume 6341 of Lecture Notes in Computer Science, pages 234–246. Springer.

Lenat, D. (1998).The Dimensions of Context Space.Technical report, CYCorp.Published online http://www.cyc.com/doc/context-space.pdf (accessed June 21, 2009).

McCarthy, J. (1993).Notes on formalizing context.In IJCAI.

Francesco Corcoglioniti (DKM - FBK) A CKR for TOD Trento, July 30, 2014 39 / 39