<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Towards a more human-friendly knowledge graph generation &amp; publication?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Dylan Van Assche</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Thomas Delva</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Pieter Heyvaert</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ben De Meester</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Anastasia Dimou</string-name>
          <email>anastasia.dimoug@ugent.be</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>IDLab, Department of Electronics and Information Systems, Ghent University</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>imec Technologiepark-Zwijnaarde 122</institution>
          ,
          <addr-line>9052 Ghent</addr-line>
          ,
          <country country="BE">Belgium</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Human-friendly representations of mapping languages, e.g., YARRRML or ShExML, allow seamlessly integrating heterogeneous data into knowledge graphs. However, they do not describe how a generated knowledge graph should be exported or published, leaving the knowledge graph generation and publication disconnected. To address this, we recently introduced the Logical Target in RML, but an alignment with the human-friendly representations of mapping languages is still pending. In this demo paper, we (i) align RML's Logical Target with YARRRML to provide a more human-friendly syntax for knowledge graph's generation and publication and (ii) demonstrate our approach in YARRRML's editor Matey. YARRRML users are now able to describe how their generated knowledge graphs are exported to one or multiple targets, paving the path towards a more reproducible and human-friendly work ow for generating and publishing knowledge graphs. Demo: https://w3id.org/yarrrml/matey Screencast: https://w3id.org/yarrrml/matey/screencast-target Repository: https://w3id.org/yarrrml/matey/repository</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Human-friendly representations of mapping languages, such as YARRRML [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ],
or ShExML [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], abstract mapping languages' machine-readable syntax e.g. W3C
Recommendation R2RML [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] for generating knowledge graphs (KG) from
relational databases represented in the Resource Description Framework (RDF) [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ],
or the RDF Mapping Language (RML) [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] which broadens the scope of R2RML
to heterogeneous data sources. These human-friendly representations facilitate
the integration of heterogeneous data sources into a knowledge graph in a
humanfriendly way. Other mapping languages, such as SPARQL-Generate [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], claim to
be less complex by using other Semantic Web recommendations as their basis,
e.g., SPARQL [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] for SPARQL-Generate.
? Copyright © 2021 for this paper by its authors. Use permitted under Creative
      </p>
      <p>Commons License Attribution 4.0 International (CC BY 4.0).</p>
      <p>
        These human-friendly representations need to follow the evolution of
mapping languages to make all their features available. For instance, we recently
extended RML with the Logical Target to describe how a KG should be exported
to one or multiple targets [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. Such new features may be more easily adopted if
these human-friendly representations support such changes, since most users rely
on such human-friendly representations to de ne how KGs should be generated.
      </p>
      <p>In the case of Logical Target, neither YARRRML nor ShExML, the two
most common human-friendly representations of RML, were not extended yet
to de ne how and where to export a KG. Consequently, their users still resort to
hard-coded scripts to bridge this gap, leaving the KG generation and publication
disconnected, even though it is addressed by the underlying mapping language.</p>
      <p>
        In this demo paper, we (i) introduce a YARRRML syntax for RML's Logical
Target1 and (ii) demonstrate our approach in Matey, an editor for YARRRML [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]:
http://w3id.org/yarrrml/matey. Thanks to our approach, not only mapping
languages, but also users of their human-friendly representations, can specify how
their generated KG should be exported and published to one or multiple targets.
2
      </p>
      <p>
        Logical Target alignment with YARRRML
We extend YARRRML's syntax to de ne how and to where a KG, represented in
the RDF [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], should be exported. We added a targets map to specify Logical
Targets in YARRRML with a similar description as a sources map (Listing 1.1).
This approach is straightforward because Logical Target uses a similar
description as Logical Source in RML [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. We integrated this YARRRML extension
with RML's Logical Target in the YARRRML speci cation: http://w3id.org/
yarrrml/spec.
      </p>
      <p>Targets can be de ned in the same way as sources, both describe how a
source or target is accessed (Listing 1.1). YARRRML mappings may refer to
targets in subjects, predicates, objects, or graphs maps to describe where
RDF triples of the generated KG are exported.</p>
      <p>Each target contains at least an access description and type to specify how
the target should be accessed (Listing 1.1: lines 5-6, 9). The serialization format
and compression are optional (Listing 1.1: lines 7-8). By default, the serialization
format is N-Quads and no compression is applied, following the DataIO speci
cation2. In Listing 1.1, we de ne: (i) a local le3 to which the triples are dumped
with Turtle as serialization format and GZip compression, and (ii) a SPARQL
endpoint to which part of the KG is exported to using SPARQL UPDATE.
1 RML's Logical Target alignment is integrated in the YARRRML speci cation:
http://w3id.org/yarrrml/spec
2 DataIO speci cation: http://rml.io/specs/dataio
3 VoID Dataset: http://www.w3.org/TR/void
Listing 1.1. Targets follow a similar syntax as sources. The SPARQL endpoint
target is written in YARRRML's shortcut syntax.
1 sources :
2 people - source : ["/ data / people . json jsonpath ", "$ .[*]"]
3 targets :
4 file - target :
5 access : / data / file . ttl . gz
6 type : void
7 serialization : turtle
8 compression : gzip
9 sparql - target : [" https :// example . org / sparql sparql "]</p>
      <p>Each YARRRML mapping may contain a targets map with one or multiple
targets to describe where each RDF triple of the generated KG is exported to.</p>
      <p>
        Triples are exported to the targets as speci ed in the mappings (Listing 1.2:
lines 6, 10). If no targets are speci ed for a certain triple, the triple is exported to
the mapping language processor's default target. When multiple targets are
speci ed for the same triple, it is exported to all its targets. This approach allows ne
grained control over where each triple is exported to, following RML's Logical
Target extension [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. In Listing 1.2, the local le target is referred to in subjects
map of the people mappings (Listing 1.2: line 6), all triples containing these
subjects will be exported to that local le. The SPARQL endpoint target is only
speci ed in predicates map of the people mapping, only the triples
containing the predicate foaf:name (Listing 1.2: line 10) are exported to the SPARQL
endpoint.
      </p>
      <p>Listing 1.2. Triples generated by a mapping matching multiple targets are
exported to all targets. Triples without a target are exported to the default target.
1 mappings :
2 people :
3 sources : people - source
4 subjects :
5 - value : " http :// example . org / person /$( id )"
6 targets : file - target
7 predicateobjects :
8 - predicates :
9 - value : foaf : name
10 targets : sparql - target
11 objects : "$( name )"
12 - predicates : foaf : age
13 objects : "$( age )"
3</p>
      <p>Matey: Human-friendly KG generation &amp; publication
We extended YARRRML's editor Matey to demonstrate how a KG is exported
to multiple targets such as local les or SPARQL endpoints. We added
support for (i) RML's Logical Target extension in YARRRML and (ii) multiple
outputs (Figure 1). Each target is shown in Matey in the output tab, the
drop-down menu provides the user the possibility to show di erent targets.
Matey is available at http://w3id.org/yarrrml/matey and a demo screencast at
http://w3id.org/yarrrml/matey/screencast-target which shows how targets are
de ned and how this a ects the KG publication. Our extensions to Matey are
available under the MIT license: http://w3id.org/yarrrml/matey/repository.
Through RML's Logical Target alignment with YARRRML, users of these
humanfriendly representations of mapping languages do not need to resort to
hardcoded scripts anymore to export their KG to various targets, but they can
specify how their generated KG should be exported. Currently, we implemented a
few targets such as local les or SPARQL endpoints, but our implementation
can be extended to support more targets. Future research is needed to make sure
that these human-friendly representations follow the evolution of the languages
they represent. In the future, our approach can inspire adjustments to other
human-friendly representations of mapping languages, such as ShExML.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Cyganiak</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wood</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lanthaler</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>RDF 1.1 Concepts and Abstract Syntax</article-title>
          . Recommendation,
          <source>World Wide Web Consortium (W3C)</source>
          (
          <year>2014</year>
          ), http://www.w3. org/TR/rdf11-concepts/
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Das</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sundara</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cyganiak</surname>
            ,
            <given-names>R.:</given-names>
          </string-name>
          <article-title>R2RML: RDB to RDF Mapping Language</article-title>
          . Working group recommendation,
          <source>World Wide Web Consortium (W3C)</source>
          (
          <year>2012</year>
          ), http: //www.w3.org/TR/r2rml/
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Dimou</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vander</surname>
            <given-names>Sande</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Colpaert</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            ,
            <surname>Verborgh</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            ,
            <surname>Mannens</surname>
          </string-name>
          , E., Van de Walle, R.:
          <article-title>RML: A Generic Language for Integrated RDF Mappings of Heterogeneous Data</article-title>
          .
          <source>In: Proceedings of the 7th Workshop on Linked Data on the Web. CEUR Workshop Proceedings</source>
          , vol.
          <volume>1184</volume>
          .
          <string-name>
            <surname>CEUR-WS.org</surname>
          </string-name>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Garc</surname>
            a-Gonzalez,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Boneva</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Staworko</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Labra-Gayo</surname>
            ,
            <given-names>J.E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lovelle</surname>
            ,
            <given-names>J.M.C.</given-names>
          </string-name>
          :
          <article-title>ShExML: improving the usability of heterogeneous data mapping languages for rst-time users</article-title>
          .
          <source>PeerJ Computer Science</source>
          <volume>6</volume>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Heyvaert</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>De Meester</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dimou</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Verborgh</surname>
          </string-name>
          , R.:
          <article-title>Declarative Rules for Linked Data Generation at your Fingertips! In: The Semantic Web: ESWC 2018 Satellite Events</article-title>
          .
          <source>Lecture Notes in Computer Science</source>
          , vol.
          <volume>11155</volume>
          . Springer, Cham (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Lefrancois</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zimmermann</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bakerally</surname>
          </string-name>
          , N.:
          <article-title>A SPARQL extension for generating RDF from heterogeneous formats</article-title>
          .
          <source>In: The Semantic Web 14th International Conference, ESWC</source>
          <year>2017</year>
          , Portoroz, Slovenia, May 28 { June 1,
          <year>2017</year>
          , Proceedings. Springer International Publishing (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>Van</given-names>
            <surname>Assche</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            ,
            <surname>Haesendonck</surname>
          </string-name>
          ,
          <string-name>
            <surname>G.</surname>
          </string-name>
          , De Mulder,
          <string-name>
            <given-names>G.</given-names>
            ,
            <surname>Delva</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            ,
            <surname>Heyvaert</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            ,
            <surname>De Meester</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            ,
            <surname>Dimou</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.</surname>
          </string-name>
          :
          <article-title>Leveraging Web of Things W3C Recommendations for Knowledge Graphs Generation</article-title>
          .
          <source>In: Web Engineering. Lecture Notes in Computer Science</source>
          , vol.
          <volume>12706</volume>
          . Springer (
          <year>2021</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>