In this blog post, we respond to the paper Mapping Diverse Data to RDF in Practice by Alexandros Chortaras and Giorgos Stamou, presented at ISWC2018, as this paper presents certain inaccuracies.
The paper missed from its related work three main track papers from SEMANTICS2015 ([RML-SEMANTICS2015]), ESWC2017 ([RML+FnO-ESWC2017]), and ISWC2017 ([FnO+DBpedia-ISWC2017]). This leads to misinforming its readers about our work with RML. The paper claims that existing work does not support certain aspects which they present as their novel contributions. However, we did support everything they claim that we do not based on the 3 aforementioned papers. This blog post provides a detailed analysis to show how each one of their motivating examples which are used also as their evaluation are addressed with our work.
On high level:
In details:
Below, we describe how each one of the motivating examples is addressed by RML
Data transformations are covered as per [RML+FnO-ESWC2017]. An exemplary mapping snippet is shown below, a full mapping file can be found here.
<#events>
a rr:predicateObjectMap [
rr:predicate kvoc-t:text;
rr:objectMap [
fnml:functionValue [
rr:predicateObjectMap [
rr:predicate fno:executes ;
rr:objectMap [ rr:constant ex:extractKeywordFunction ] ] ;
rr:predicateObjectMap [
rr:predicate ex:input ;
rr:objectMap [ rr:reference "keywords" ] ]
]
]
]
This is in fact a covered as per the original RML paper ([RML-LDOW2014]). A mapping in YARRRML is shown below, a full mapping file as RML can be found here.
prefixes:
ex: "http://example.com/"
exr: "http://example.com/r/"
mappings:
person:
sources:
- ['persons.json~jsonpath', '$.periodCollections.*']
s: http://example.com/$(id)
po:
- [a, foaf:Person]
def:
sources:
- ['persons.json~jsonpath', '$.periodCollections.*.definitions.*']
s: http://example.com/r/$(id)
po:
- [a, foaf:Document]
- p: ex:inSchema
o:
- mapping: person
condition:
function: equal
parameters:
- [str1, $(id)]
- [str2, $(definitions.*.id)]
All data files as presented by D2RML paper are available at following links: adminCodes.txt, GR.txt, and alternatenames/GR.txt.
In the paper, performance is discussed, not whether you can write the rules or not to get the required result. So actually the discussion here should be about: should the execution/implementation of a language be considered? Considering that the rules are declarative and hence a different implementation can be chosen, e.g., one that can handle the mentioned problems. Bind conditions can be used to get the correct XX.txt file, as it was introduced at [RML-SEMANTICS2015], see also the detailed page about bind conditions . For the use of the join tables, we could use a an rml:JoinCondition.
An exemplary mapping snippet is shown below, a full mapping file can be found here.
<#GR>
a rr:predicateObjectMap [
rr:predicate gn:parentADM1;
rr:objectMap [
rr:parentTriplesMap <#GR>;
rml:joinCondition [
fnml:functionValue [
rr:predicateObjectMap [
rr:predicate fno:executes ;
rr:objectMap [ rr:constant idlab-fn:equal ]
] ;
rr:predicateObjectMap [
rr:predicate grel:valueParameter ;
rr:objectMap [
rml:parentTermMap [
rml:reference “geonameid”
]
]
] ;
rr:predicateObjectMap [
rr:predicate grel:valueParameter2 ;
rr:objectMap [
fnml:functionValue [
rml:logicalSource [
//refer to admin1Codes.txt
];
rr:predicateObjectMap [
rr:predicate fno:executes ;
rr:objectMap [ rr:constant ex:getValueFromClmnIfMatch ] ] ;
...
By describing functions recursively, this problem can be covered. An exemplary mapping snippet is shown below, a full mapping file can be found here.
<#T>
a rr:predicateObjectMap [
rr:predicate kvoc-ont:period;
rr:objectMap [
fnml:functionValue [
rr:predicateObjectMap [
rr:predicate fno:executes ;
rr:objectMap [ rr:constant ex:find-period ]
] ;
rr:predicateObjectMap [
rr:predicate grel:valueParameter ;
rr:objectMap [
fnml:functionValue [
rr:predicateObjectMap [
rr:predicate fno:executes ;
rr:objectMap [ rr:constant ex:find-location ] ] ;
rr:predicateObjectMap [
rr:predicate grel:valueParameter ;
rr:objectMap [ rml:reference "geo" ] ]
]
]
] ;
...
Ben De Meester, Anastasia Dimou, Pieter Heyvaert, Ruben Verborgh
Feel free to refer to this work:
Dimou et al. D2RML Comparison: Response to "Mapping Diverse Data to RDF in Practice", 2018. https://rml.io/blog/2018/d2rml-comparison