<!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>Using Mapping Languages for Building Legal Knowledge Graphs from XML les?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Ademar Crotti Junior</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Fabrizio Orlandi</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Declan O'Sullivan</string-name>
          <email>declan.osullivang@adaptcentre.ie</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Christian Dirschl</string-name>
          <email>christian.dirschl@wolterskluwer.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Quentin Reul</string-name>
          <email>quentin.reul@wolterskluwer.com</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>ADAPT Centre for Digital Content Platform Research, Knowledge &amp; Data Engineering Group, School of Computer Science and Statistics, Trinity College Dublin</institution>
          ,
          <addr-line>Dublin 2</addr-line>
          ,
          <country country="IE">Ireland</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Wolters Kluwer Deutschland</institution>
          ,
          <addr-line>Munchen</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Wolters Kluwer N.V.</institution>
          ,
          <addr-line>Chicago</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>This paper presents our experience on building RDF knowledge graphs for an industrial use case in the legal domain. The information contained in legal information systems are often accessed through simple keyword interfaces and presented as a simple list of hits. In order to improve search accuracy one may avail of knowledge graphs, where the semantics of the data can be made explicit. Signi cant research e ort has been invested in the area of building knowledge graphs from semistructured text documents, such as XML, with the prevailing approach being the use of mapping languages. In this paper, we present a semantic model for representing legal documents together with an industrial use case. We also present a set of use case requirements based on the proposed semantic model, which are used to compare and discuss the use of state-of-the-art mapping languages for building knowledge graphs for legal data.</p>
      </abstract>
      <kwd-group>
        <kwd>Mapping languages</kwd>
        <kwd>Legal Knowledge Graphs</kwd>
        <kwd>Legal se- mantic model</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        The body of law to which citizens and businesses have to adhere is constantly
increasing in volume and complexity [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. The information contained in such a
body of law is usually provided by unstructured text within legal documents,
for which a number of systems have been developed. The information made
available by such legal information systems, however, is often accessed with
simple, keyword-based search interfaces and presented as a simple list of hits [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
This makes the process of information retrieval time consuming and ine cient,
? Copyright c 2019 for this paper by its authors. Use permitted under Creative
Commons License Attribution 4.0 International (CC BY 4.0).
especially when dealing with large amounts of information [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]. Moreover, the
usefulness of such information varies widely and depends on its structure and its
representation. In this context, although the information may be available, users
and legal professionals may nd the exploration of legal information problematic
when interested in speci c circumstances or investigating a particular case [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ].
Such issues have led to a need for improving ways to search and structure large
amounts of legal information.
      </p>
      <p>
        This work presents ongoing e orts related to building RDF knowledge graphs
for representing legal documents. The key focus of building such knowledge
graphs is to improve search accuracy by understanding its intent and context.
The RDF (Resource Description Framework) [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] data model is used here as it
is a W3C Recommendation which allows one to describe resources and their
relationships by the means of vocabularies and ontologies in a way that
computerized agents are able to process. Ontologies, in this context, are seen as formal,
explicit speci cations of conceptualizations [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. The structure and semantics
provided by ontologies allows one to formulate complex questions such as "What
are the documents in which a relation to a particular law concept, or a more
speci c one, exists?".
      </p>
      <p>In this paper, we present a semantic model for legal documents, which is then
being used in a real-world use case. This use case comes from an ongoing project
with Wolters Kluwer Germany, where legal documents must be transformed to
RDF knowledge graphs. These documents are stored as XML les and follow
a speci c schema. Considering the semantic model and the legal document's
schema we have de ned a set of requirements, which are used to compare and
discuss the use of di erent state-of-the-art mappings engines. Finally, we present
an evaluation comparing the performance of a mapping approach and an ad hoc
custom parser.</p>
      <p>The remainder of this paper is organised as follows: Section 2 describes our
use case and the XML document schema. Section 3 presents a semantic model
for representing legal documents that has been developed. Section 4 describes
the semantic uplift of legal documents to RDF knowledge graphs through the
use of mapping languages. Section 5 presents a comparison evaluation between
mapping engines. Section 6 discusses related work. Section 7 concludes the paper
and discusses future work.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Use case</title>
      <p>This section presents our industrial use case, which comes from an ongoing
project with Wolters Kluwer Germany (WKD). WKD is a leading knowledge
and information service provider in the domains of law, companies, and tax,
which o ers high quality business information for professionals. Wolters Kluwer
is based in more than 40 countries and serves customers in more than 180
countries worldwide.</p>
      <p>WKD's use case contains millions of documents in the German language
containing legal information together with links to taxonomy concepts. As
mentioned, the documents are stored as XML les. Each document consists of the
key parts: document keywords, document taxonomy concepts, and fragments.
Each fragment has a type, such as main claim (tenor ), court facts (tatbestand ),
amongst others, which are represented by di erent XML element tags. Just like
documents, fragments may be annotated with taxonomy concepts. The use of
taxonomy concepts de nes the speci c legal matters and processes contained in a
document. In this sense, the shared use of such concepts across documents re ect
the relations between the legal information contained in those documents. This
characteristic, however, is not made explicit, since each document is represented
by a single di erent XML le. One possible way of making such information
explicit is through the use of knowledge graphs, as will be discussed in Section
3. An example of an XML document is shown in Figure 1.</p>
      <p>The taxonomy concepts used to annotate documents and its fragments come
from WKD's taxonomy ontology. This ontology contains information about
legal concepts, which are supplemented by technical terms of neighboring areas
such as economics, sociology or politics. The Simple Knowledge Organization
System 4 (SKOS) vocabulary is used to describe concepts and their relations in
this taxonomy. SKOS is a W3C Recommendation designed to support the use
of knowledge organization systems. In WKD's use case, each legal concept is
represented as a skos:Concept, with the main relationships being expressed
through the properties skos:narrower and skos:broader. A major legal
subdomain of WKD's taxonomy is available for download and accessible via a
SPARQL endpoint5.</p>
      <sec id="sec-2-1">
        <title>4 https://www.w3.org/TR/skos-reference/ 5 http://taxonomy.wolterskluwer.de/</title>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>A Semantic Model for Legal Documents</title>
      <p>As stated in Section 2, our use case shares taxonomy concepts within and across
legal documents, which are not made explicit through the XML data format.
This section presents a semantic model designed for the representation of those
legal documents, with the aim of making such relationships explicit.</p>
      <p>
        The proposed semantic model draws inspiration and extends an existing one
presented in [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. Our semantic model is also leveraged by WKD's taxonomy
concepts, which are used to link entire documents and fragments to the legal
concepts de ned in the taxonomy. Figure 2 shows the proposed semantic model
used to represent the legal information contained in our use case (Section 2).
      </p>
      <p>The vocabularies being used in the semantic model are the Platform
Content Interface (PCI), which leverages the Functional Requirements for
Bibliographic Records (FRBR), the Simple Knowledge Organization System (SKOS)
and the Dublin Core (DC) terms ontologies. The PCI ontology is a proprietary
vocabulary describing legal documents and metadata. The FRBR6 ontology
provides a vocabulary for concepts and relations in bibliographic databases de ned
by the International Federation of Library Associations7 initiative. Finally, the
DC terms8 ontology provides a vocabulary describing all metadata terms
maintained by the Dublin Core Metadata Initiative9. The PCI ontology was also
extended in order to represent the content of fragments within a document
with the datatype property pcicore:hasContent, and with the object
property pcicore:isFragmentOf, which is also de ned as an inverse property</p>
      <sec id="sec-3-1">
        <title>6 http://purl.org/vocab/frbr/core 7 https://www.ifla.org/ 8 http://purl.org/dc/terms/ 9 http://dublincore.org/</title>
        <p>of pcicore:hasFragment. The latter two properties allow one to reference
documents to its fragments, and vice-versa.</p>
        <p>Each document is represented as a frbr:Manifestation. The keywords of
the document are described with the datatype property pcicore:hasKeyword,
and the related taxonomy concepts with the property dcterms:subject. Each
fragment is represented as a pcicore:Fragment, and includes a reference to
the document it belongs to through the property pcicore:isFragmentOf.
The content of fragments are represented with pcicore:hasContent.
Fragments have a type represented with the class pcicore:FragmentType. Each
fragment may also have keywords (pcicore:hasKeyword), and be annotated
with taxonomy concepts (dcterms:subject). The legal taxonomy concepts,
which are described as instances of the class skos:Concept, provide linkable
anchors both to entire documents and to smaller fragments. In this context,
concepts are used to connect legal documents and textual pieces of supporting
evidence within and across di erent documents.</p>
        <p>As discussed in Section 1, the representation of legal information through
knowledge graphs allows one to formulate complex questions. An example, which
was stated in Section 1, is the question: "What are the documents in which
a relation to a particular law concept, or a more speci c one, exists?". This
question can be answered with the SPARQL query presented in Listing 1.1.
Note that this query returns documents related to a speci c concept (in this
case wkd-law:10046) at either the document or fragment level, and that the
property skos:narrower is used to refer to more speci c concepts from the
taxonomy ontology.</p>
        <p>Listing 1.1. Example of SPARQL query
PREFIX pcicore: &lt;http://onto.wolterskluwer.com/pci/core/&gt;
PREFIX skos: &lt;http://www.w3.org/2004/02/skos/core#&gt;
PREFIX wkd-law: &lt;http://taxonomy.wolterskluwer.de/law/&gt;
PREFIX dcterms: &lt;http://purl.org/dc/terms/&gt;
SELECT distinct ?document
WHERE { BIND (wkd-law:10046 as ?concept)
?fragment a pcicore:Fragment; pcicore:isFragmentOf ?document.
{ ?fragment dcterms:subject ?concept . }
UNION { ?fragment dcterms:subject ?narrower . ?concept skos:narrower ?narrower . }
UNION { ?document dcterms:subject ?concept . }</p>
        <p>UNION { ?document dcterms:subject ?narrower . ?concept skos:narrower ?narrower . }
}
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Semantic Uplift</title>
      <p>This section presents our use case requirements, which are de ned based on
the XML documents schema and the proposed semantic model, together with a
comparison between state-of-the-art semantic uplift engines applied to our use
case.</p>
      <p>
        Several approaches have been developed in the area of semantic uplift through
mapping languages. Mapping languages can be described as declarative
languages used to express customized mappings de ning how non-RDF data should
be represented in RDF [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. An engine is usually associated with a mapping
language, being a software processor that uses a mapping le and the input data
to generate RDF datasets. A mapping le contains one or more mapping
definitions, which state how the RDF terms are generated, considering the input
data, the vocabularies being used, and how these are associated to each other.
4.1
      </p>
      <sec id="sec-4-1">
        <title>Use Case Requirements</title>
        <p>In our case, the following requirements must be met by the semantic uplift engine
in order to transform the XML les (Section 2) into the semantic data model
(Section 3)10.</p>
        <p>{ R1. Data format. This requirement is related to legal documents in our
use case being stored as XML les, being also a common data format used
in many applications.
{ R2. Data selection. This requirement is related to selecting speci c XML
elements and attributes during the mapping process. We note that this
includes the mapping of elements which contain other nested XML elements.
{ R3. Vocabulary independent. This requirement allows the mapping to
be de ned using existing ontologies and vocabularies.
{ R4. Transformation functions. This requirement allows for values to
be manipulated during the mapping process. For instance, in our use case,
some elements in the XML documents contain string values that must be
normalized in order to be represented in RDF.
{ R5. Multi-attribute mapping. This requirement is related to the XML
les in our use case having a collection of value nodes that are mapped to
one property in the RDF representation.
{ R6. Literal values to IRI. This requirement is related to IRIs being stored
as literals in the XML documents, which are required to be transformed into
valid IRIs in the RDF representation.
4.2</p>
      </sec>
      <sec id="sec-4-2">
        <title>Semantic Uplift Engines</title>
        <p>The following semantic uplift engines were compared when considering our use
case. The rationale for selecting these being that, according to their speci cation,
they would have support for our use case requirements.</p>
        <p>
          XSPARQL. XSPARQL [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] is a query language combining XQuery and
SPARQL for transformations between RDF and XML (lifting) and back
(lowering). For the former, XSPARQL uses a combination of XQuery expressions
and SPARQL CONSTRUCT queries. The XQuery expressions are used to
access XML data, and the SPARQL CONSTRUCT queries are used to convert
the accessed XML data to RDF. For the later, XSPARQL uses a combination
10 These requirements express both generic requirements for building knowledge graphs
as well as speci c ones for our use case, such as being capable to select and transform
XML attributes to RDF resources.
of SPARQL and XQuery clauses. The SPARQL clauses are used to access RDF
data, and the XQuery clauses are used to format the results in XML syntax. This
combination of languages allows one to bene t from the facilities of SPARQL
for retrieving RDF data, and the use of a TURTLE like syntax for constructing
RDF graphs, while still having access to XQuery features for XML processing.
Transformation functions in XSPARQL are supported through native functions
found in SPARQL, XQuery, XPath and XSLT.
        </p>
        <p>
          SPARQL-Generate. SPARQL-Generate [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ] extends SPARQL with
speci c target constructs which enable the generation of RDF from heterogeneous
sources. SPARQL-Generate supports the generation of RDF from any RDF
dataset, and from any set of documents in arbitrary formats, such as XML, CSV
and so on. SPARQL-Generate has been designed as an extension of SPARQL
1.1, which means that it can be implemented on top of any existing SPARQL
engine by leveraging the SPARQL extension mechanism to deal with an open
set of formats. In order to do so, SPARQL-Generate introduced three clauses
to their SPARQL extension. The source clause is used to reference the input
source data. The iterator clause allows for the extraction of data attributes from
a given source data. These attributes are then bound to SPARQL variables.
Finally, the generate clause replaces and extends the SPARQL CONSTRUCT
clause with SPARQL-Generate queries. The bounded variables which refer to
data attributes are used here to form the RDF triples. SPARQL-Generate
supports data transformation functions through native SPARQL 1.1 functions.
        </p>
        <p>
          RML-Mapper. R2RML11 is the W3C standardized mapping language for
de ning mappings of data in relational databases to the RDF data model. The
RML [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] extension of R2RML broadens its scope by also covering the (semi-)
structured formats CSV, XML and JSON. RML documents contain rules de
ning how the input data will be represented in RDF. The main building blocks of
R2RML and RML mapping documents are Triples Maps. A Triples Map de nes
how the RDF triples of the form (subject, predicate, object) will be generated.
A Triples Map consists of one Logical Source, one Subject Map and zero or
more Predicate-Object Maps. The Subject Map de nes how identi ers (IRIs)
are generated for the mapped resources, which are used as the subject of the
RDF triples. A Predicate-Object Map consists of Predicate Maps, which de ne
how to generate the triples predicate and Object Maps or Referencing Object
Maps, which de ne how the triple's object is generated. The Subject Map, the
Predicate Map and the Object Map may be called Term Maps. Term Maps
express how an RDF term which may be an IRI, a blank node or a literal is
generated. A Term Map can be a constant-valued term map which is always
generating the same RDF term, a reference-valued term map that is the data value
of a referenced attribute from a given Logical Source, or a template-valued term
map that is a valid string template that may contain referenced attributes from
a given Logical Source. The engine RML-Mapper supports data transformation
functions through the Function Ontology [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ].
11 https://www.w3.org/TR/r2rml/
        </p>
        <p>CARML. CARML12 is an engine which implements the RML mapping
language, just like the described RML-Mapper. In this sense, CARML also supports
the generation of RDF datasets from heterogeneous data formats.
Transformation functions are also supported through the Function Ontology.
4.3</p>
      </sec>
      <sec id="sec-4-3">
        <title>Discussion</title>
        <p>In order to compare these engines, a mapping expressing the transformations
needed to convert the XML les, as described in Section 2, to the RDF semantic
model described in Section 3 was created for each of these mapping engines. In
order words, this comparison assesses if and how well such engines support the
our use case requirements.</p>
        <p>Table 1 shows the mapping engines being evaluated in our use case, their
licenses, and the version used. A discussion on the support for each use case
requirement is presented next.</p>
        <p>R1. Data format. All the mapping engines presented have support for the
conversion of XML les to RDF. XSPARQL uses XQuery, XPath and XSLT in
order to access the information contained in XML les. The SPARQL-Generate,
RML-Mapper and CARML engines rely on XPath expressions in order to access
the data contained in XML les.</p>
        <p>R2. Data selection. All of the mapping engines have support for selecting
XML attributes. In order to select XML elements in XSPARQL one may use the
XPath function text() or string(). The function text() returns a set of
individual nodes contained in an XML element. For instance, if an XML element
contains one nested XML element, then this function returns two nodes. The
function string() returns the string value, or the string representation, of an
XML element. In other words, an element with a nested element would return one
string value containing the whole string within that XML element. The mapping
engines SPARQL-Generate and RML-Mapper only allow for the selection of
XML elements using the text() function, which means that instead of one
string representation of an XML element the engine produces a set of literals
for an ontology property. In our use case, this is problematic when mapping
the content of fragments - represented in the XML les by an element, often
containing nested elements { to the property pcicore:hasContent. CARML,
on the other hand, allows for the selection of elements using both text() and
12 https://github.com/carml/carml
string() functions. Thus, only XSPARQL and CARML fully support this
requirement.</p>
        <p>R3. Vocabulary independent. All the engines have support for this
requirement, being expressive enough for the de nition of customized mappings.
XSPARQL and SPARQL-Generate have a similar syntax based on SPARQL
CONSTRUCT queries to de ne how the RDF triples are generated from XML
les. The RML-Mapper and CARML engines rely on Triples Maps, which as
stated previously, allows one to de ne how subjects, predicates and objects are
generated from non-RDF source data.</p>
        <p>R4. Transformation functions. XSPARQL partially supports data
transformation functions, being limited to the expressiveness of SPARQL, XQuery,
XPath and XSLT. SPARQL-Generate also partially supports data
transformation functions, being limited to the ones supported in SPARQL 1.1. The
RMLMapper and CARML approaches, as previously stated, fully support data
transformation functions through the Function Ontology. In our use case, data
transformation functions are required when mapping string values to literals where
such values must be normalized and validated.</p>
        <p>R5. Multi-attribute mapping. All of the engines support this
requirement. The XSPARQL engine, however, has the word uri as part of its grammar.
This word is also the name of an attribute in the XML les in our use case,
which results in an error in the execution of the mapping.</p>
        <p>R6. String values to IRI. All of the engines support this requirement.
XSPARQL allows one to de ne an IRI from a string value by enclosing the variable
representing the IRI with less (&lt;) and greater (&gt;) than symbols.
SPARQLGenerate allows the same transformation through the SPARQL function URI.
The RML-Mapper and CARML approaches allows such transformation by de
ning an IRI term type to Term Maps.</p>
        <p>Table 2 presents the support for each requirement by the mapping engines.
CARML is the only engine with full support for all use case requirements (Section
2)13.</p>
        <p>Mapping Engine R1 R2 R3 R4 R5 R6
XSPARQL ( ) ( )
SPARQL-Generate ( ) ( )
RML-Mapper ( )
CARML</p>
        <p>Table 2. Mapping engines comparison.
5</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Evaluation</title>
      <p>This section presents an evaluation comparing the performance of two approaches
applied to the semantic uplift of XML les. One approach utilizes RML
mappings through the CARML engine, which, as discussed, is the only one with full
means full support, while a (</p>
      <p>) means partial support.
support for our use case requirements. The second approach is an ad hoc custom
parser developed to generate the same RDF representation from XML les.</p>
      <p>The experiment was executed on a MacBook Pro 13" (3.1 GHz, i7, 16GB
RAM), where both approaches would transform the same input into the same
RDF representation. Each approach was executed 10 times considering 3
different datasets containing 1000 (1k), 10000 (10k) and 50000 (50k) documents.
These datasets have been created by randomly selecting les from our use case
which contains over 1 million documents. These were selected randomly in order
to provide sets of documents with di erent characteristics (e.g. size). Table 3
presents the results of this experiment.</p>
      <p>Performance 1k 10k 50k
Comparison AVG STD AVG STD AVG STD
Ad hoc custom parser 4.09 0.47 38.7 3.95 212.8 30.01
CARML 4.85 1.33 43.3 3.9 242.5 30.9</p>
      <p>Table 3. Time performance results for 10 runs (in seconds).</p>
      <p>These results show that the use of mappings, namely RML with the CARML
engine, does impact performance. In order to assess whether these di erences are
statistically signi cant we performed the Welch Two Sample T-Test with a
signi cance level of 0.05. The results suggest no statistical signi cance between
using an ad hoc custom parser and CARML for 1k documents (p-value of 0.12).
However, for 10k and 50k documents the di erence in performance is
statistically signi cant (p-values of 0.04 and 0.01, respectively). We do note that,
even though the use of mapping languages impact performance, this is still the
preferred approach for our use case. The reason being that mapping languages
separate mapping de nitions from the implementations that execute them,
allowing the process to be reused and shared. Furthermore, the maintenance of
mappings is facilitated by the same reason when compared to an ad hoc parser.
For instance, any changes in the semantic model or in the input data would
require the mapping to be updated accordingly, without the need to change the
engine responsible for the execution of the mapping. An ad hoc parser, on the
other hand, would require the implementation, which is speci c to a certain use
case, to be modi ed. Finally, implementations may be improved with
optimizations and other choices of software libraries, which could be tailored to di erent
use cases and thus positively impact performance.
6</p>
    </sec>
    <sec id="sec-6">
      <title>Related work</title>
      <p>The representation of legal information through ontologies have been the focus
of several studies.</p>
      <p>
        Ebenhoch [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] has proposed the representation of legal information through
RDF, where a key point to make such data more accessible is the process of
enriching it with metadata. Winkels et al. [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] describe the need of semantics in
a legal context from the practical point of view of the Dutch Tax and Customs
Administration, who have to deal with legal information from various sources
and formats. JURION [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] was a legal information platform which merges and
interlinks over one million documents of content and data from diverse sources,
such as national and European legislation and court judgments, amongst others.
The approaches presented in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] and [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] used ad hoc parsers for the creation of
knowledge graphs from source data, while JURION's extraction process relies
on XSLT scripts in order to convert the data stored as XML les to RDF. This
paper, in contrast, has investigated the use of mapping languages for building
knowledge graphs to represent legal documents.
      </p>
      <p>
        Other studies have focused on investigating ontology design patterns in the
legal domain which are described together with examples [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. A summary of
existing legal ontologies is provided in [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. This work describes and classi es 23 legal
ontologies in distinct categories such in which type of application the ontology
has been used, how the ontology was constructed, its language, and so on.
Semantic Web technologies are also being used to describe particular subdomains
of law, such as licenses, and more recently the General Data Protection
Regulation [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]. As stated previously, a semantic model for legal documents has been
presented in [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], which was used as the base for our semantic model (Section
2).
7
      </p>
    </sec>
    <sec id="sec-7">
      <title>Conclusions and future work</title>
      <p>In this paper, we have presented a semantic model for legal documents applied
to an industrial use case. This use case comes from Wolters Kluwer Germany's
company, where their legal information is stored as XML les. By taking into
account the proposed semantic model and the XML's document schema we have
de ned a set of requirements which should be met by the mapping engine in
order for it to be able to produce the required RDF knowledge graph. We have
also compared and discussed the use of four di erent state-of-the-art mapping
engines based on our set of requirements. CARML, which implements the RML
mapping language, was found to be the only one supporting all our use case
requirements. Finally, we have also compared and discuss the use of CARML to
developing ad hoc parsers for the process of transforming XML les to RDF.</p>
      <p>In future work, we will further investigate the use of mapping languages in
terms of its performance when considering large documents. Future work will
also investigate the performance of the RDF knowledge graph based on queries,
which may result in improvements on the semantic model, and in changes in the
mapping.</p>
    </sec>
    <sec id="sec-8">
      <title>Acknowledgments</title>
      <p>This paper was supported by the Science Foundation Ireland (Grant 13/RC/2106)
as part of the ADAPT Centre for Digital Content Technology (http://www.
adaptcentre.ie/) at Trinity College Dublin.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Bischof</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Decker</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Krennwallner</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lopes</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Polleres</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Mapping between rdf and xml with xsparql</article-title>
          .
          <source>Journal on Data Semantics</source>
          <volume>1</volume>
          (
          <issue>3</issue>
          ) (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Boella</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Caro</surname>
            ,
            <given-names>L.D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Humphreys</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Robaldo</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rossi</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>vander Torre</surname>
          </string-name>
          , L.:
          <article-title>Eunomos, a legal document and knowledge management system for the web to provide relevant, reliable and up-to-date information on the law</article-title>
          .
          <source>Arti cial Intelligence and Law</source>
          <volume>24</volume>
          (
          <issue>3</issue>
          ) (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Breuker</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Casanovas</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Klein</surname>
            ,
            <given-names>M.C.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Francesconi</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          :
          <article-title>The ood, the channels and the dykes: Managing legal information in a globalized and digital world</article-title>
          .
          <source>In: Proceedings of the 2009 Conference on Law</source>
          ,
          <article-title>Ontologies and the Semantic Web</article-title>
          . IOS Press (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <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>
          ,
          <string-name>
            <surname>Klyne</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Carroll</surname>
            ,
            <given-names>J.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>McBride</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Rdf 1.1 concepts and abstract syntax</article-title>
          .
          <source>W3C recommendation 25(02)</source>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <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 LDoW Workshop</source>
          at WWW (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Ebenhoch</surname>
            ,
            <given-names>M.P.</given-names>
          </string-name>
          :
          <article-title>Legal knowledge representation using the resource description framework (rdf)</article-title>
          .
          <source>In: 12th International Workshop on Database and Expert Systems Applications. IEEE</source>
          (
          <year>2001</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Filtz</surname>
          </string-name>
          , E.:
          <article-title>Building and processing a knowledge-graph for legal data</article-title>
          .
          <source>In: The Semantic Web</source>
          . Springer (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8. Gri o,
          <string-name>
            <given-names>C.</given-names>
            ,
            <surname>Almeida</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.P.A.</given-names>
            ,
            <surname>Guizzardi</surname>
          </string-name>
          , G.:
          <article-title>A pattern for the representation of legal relations in a legal core ontology</article-title>
          .
          <source>In: JURIX</source>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Gruber</surname>
            ,
            <given-names>T.R.</given-names>
          </string-name>
          :
          <article-title>Toward principles for the design of ontologies used for knowledge sharing? International journal of human-computer studies 43(5-6</article-title>
          ) (
          <year>1995</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Junior</surname>
            ,
            <given-names>A.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Debruyne</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brennan</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>O</given-names>
            <surname>'Sullivan</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.:</surname>
          </string-name>
          <article-title>An evaluation of uplift mapping languages</article-title>
          .
          <source>IJWIS</source>
          <volume>13</volume>
          (
          <issue>4</issue>
          ) (
          <year>2017</year>
          ), https://doi.org/10.1108/ IJWIS-04-2017-0036.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Kontokostas</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mader</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dirschl</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Eck</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Leuthold</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lehmann</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hellmann</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Semantically enhanced quality assurance in the jurion business use case</article-title>
          . In: Sack,
          <string-name>
            <given-names>H.</given-names>
            ,
            <surname>Blomqvist</surname>
          </string-name>
          , E.,
          <string-name>
            <surname>d'Aquin</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ghidini</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ponzetto</surname>
            ,
            <given-names>S.P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lange</surname>
          </string-name>
          , C. (eds.)
          <article-title>The Semantic Web</article-title>
          .
          <source>Latest Advances and New Domains</source>
          . Springer (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kim</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Seo</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kim</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lee</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jung</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dirschl</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <article-title>: Multi-faceted navigation of legal documents</article-title>
          .
          <source>In: International Conference on IoT and 4th International Conference on Cyber, Physical and Social Computing</source>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <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 Proceedings</source>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Meester</surname>
            ,
            <given-names>B.D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dimou</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Verborgh</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mannens</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          :
          <article-title>An ontology to semantically declare and describe functions</article-title>
          .
          <source>In: The Semantic Web-ESWC 2016 Satellite Events, Revised Selected Papers</source>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Pandit</surname>
            ,
            <given-names>H.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fatema</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>O'Sullivan</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lewis</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Gdprtext - GDPR as a linked data resource</article-title>
          .
          <source>In: The Semantic Web - 15th International Conference, ESWC</source>
          <year>2018</year>
          , Heraklion, Crete, Greece, June 3-7,
          <year>2018</year>
          , Proceedings. pp.
          <volume>481</volume>
          {
          <issue>495</issue>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Schweighofer</surname>
          </string-name>
          , E.: Semantic Indexing of Legal Documents. Springer (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Winkels</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Boer</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>de Maat</surname>
            , E., van Engers,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Breebaart</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Melger</surname>
          </string-name>
          , H.:
          <article-title>Constructing a semantic network for legal content</article-title>
          .
          <source>In: Proceedings of the 10th International Conference on Arti cial Intelligence and Law</source>
          .
          <source>ICAIL'05</source>
          ,
          <string-name>
            <surname>ACM</surname>
          </string-name>
          (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>