Using RDF Datatypes Deduction beyond syllogism Graham Klyne
Using RDF Datatypes (Deduction beyond syllogism) Graham Klyne http: //www. ninebynine. org/ 27 Feb 2004 Using RDF Datatypes 1
RDF Datatypes (recap) xsd: integer Denotes (Datatype) Datatype URI ICEXT (class extension) “ 1” “ 2” : “ 99” : Lexical space 27 Feb 2004 <“ 1”, 1> <“ 2”, 2> : <“ 99”, 99> : Lexical-to-value Mapping Using RDF Datatypes 1 2 : 99 : Value space 2
Sketch of Datatype Extension • A number of named n-ary relations – e. g. xsd_integer: add: { <a, b, c> | a=b+c } – e. g. xsd_integer: divrem: { <a, b, c, d> | a=c div d, b=c rem d } • Functions to compute relations – e. g. for xsd_integer: add: <4, ? , 2> <4, 2, 2> 27 Feb 2004 Datatype divrem <0, 0, 0, 0> <0, 1, 0, 1> : <2, 1, 5, 2> <2, 1, 7, 3> : Using RDF Datatypes add <0, 0, 0> <1, 0, 1> : <4, 2, 2> <4, 3, 1> : 3
Using RDF Datatypes • Two approaches, implemented in Swish – Swish is a framework, implemented in Haskell, for experimenting with RDF inference, and other stuff – http: //www. ninebynine. org/RDFNotes/Swish/Intro. html • Others are possible – e. g. CWM / Euler – Survey: http: //www. ninebynine. org/RDFNotes/ RDF-Datatype-inference. html 27 Feb 2004 Using RDF Datatypes 4
Motivating Example • Class of passenger vehicles • Properties for vehicle passenger capacity: – – Seated Standing Total where: Total = Seated + Standing 27 Feb 2004 Using RDF Datatypes 5
Some Criteria to Consider • Ease of definition? • Use RDF syntax? • Direction of inference – “Forward” vs “backward” deduction – Variation of available information • ? =2+3 <5, 2, 3> • 5=? +3 <5, 2, 3> • 5=2+? <5, 2, 3> • Separate domain knowledge from generic • Formal model for RDF datatypes? 27 Feb 2004 Using RDF Datatypes 6
1 st Approach: Rule with Variable Binding Modifier ex: Rule 01 Ant : { ? pv a : Passenger. Vehicle ; : seated. Capacity ? c 1 ; : standing. Capacity ? c 2. } ex: Rule 01 Con : { ? pv : total. Capacity ? ct. } @rule ex: Rule 1 : ( ex: Rule 01 Ant ) => ex: Rule 01 Con | ( xsd_integer: sum ? ct ? c 1 ? c 2 ) 27 Feb 2004 Using RDF Datatypes 7
2 nd Approach: Generalized Class Restriction ex: Vehicle. Rule 2 : { : Passenger. Vehicle a rdfd: General. Restriction ; rdfd: on. Properties (: total. Capacity : seated. Capacity : standing. Capacity) ; rdfd: constraint xsd_integer: sum ; rdfd: max. Cardinality "1"^^xsd: non. Negative. Integer. } 27 Feb 2004 Using RDF Datatypes 8
Observations • Both approaches: – support forward and some backward chaining – based on similar extension of RDF datatype • Variable binding modifier: – is easier for writing more complex rules – can combine query and calculation in a single rule – requires fewer intermediate steps (transient subgraphs) • General restriction: – can be implemented with standard RDF parser – handles backward chaining more flexibly (but slowly) – does not handle query/selection of RDF data 27 Feb 2004 Using RDF Datatypes 9
Datatype Extension Comments • Formalism of adding named relations seems to have some practical value as a way to capture datatype idiosyncrasies • Completeness of datatype inference cannot, in general, be guaranteed • No approach for multiple-datatype inferences is worked out yet 27 Feb 2004 Using RDF Datatypes 10
Demonstration… • Preview script – file: Vehicle. Capacity. ss • Run Swish – file: Swish. Main. hs 27 Feb 2004 Using RDF Datatypes 11
- Slides: 11