<!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>Semantic Data Transformation</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Jo rey de Oliveira</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Hammad Aslam Khan</string-name>
          <email>hammadaslam.khan@engie.com</email>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Olivier Cure</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Philippe Calvez</string-name>
          <email>philippe.calvez1@engie.com</email>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>LIGM Univ Paris Est Marne la Vallee</institution>
          ,
          <addr-line>CNRS, F-77454</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>Data transformation from diverse formats to semantic data is a major challenge that is being addressed by commercial products available in the market to some extent. However, the transformation process still requires considerable e ort from users. Knowledge creation, which is one of the major steps in knowledge graph (KG) maintenance, needs existing data transformation from various formats to RDF (Resource Description Framework) data. Current data transformation approaches are either manual or through mappings. This work presents a semantic data transformation approach for knowledge creation that is semi-automatic requiring minimum possible input from users and does so with machine learning and natural language processing techniques.</p>
      </abstract>
      <kwd-group>
        <kwd>Semantic data</kwd>
        <kwd>knowledge graph</kwd>
        <kwd>RDF</kwd>
        <kwd>machine learning</kwd>
        <kwd>knowledge creation</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        With the emergence of the Semantic Web and Linked Open Data more and more
applications over the past decades have been developed to exploit semantic data.
Nevertheless, the vast majority of content published on the Web is not
represented in RDF and thus requires a transformation before being published. These
data integration issues are very common when working with data sources on the
web. There are several solutions to transform data into semantic data, most of
them being based on mapping solutions which can accurately generate semantic
data by writing scripts. But the writing of these mappings requires considerable
e ort from the share of quali ed users which makes each transformation time
consuming. They often require a speci c mapping language and the de nition of
rules for each data source which makes it time consuming and prone to human
error. Some solutions try to alleviate the expertise part by extending SPARQL
like SPARQL Generate [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], RML [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and R2RML [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. In addition, there is a
multitude of di erent data sources and each new source you want to use, demands
its own transformation. This led to the development of new solutions which
enable to better manage this source diversity. However, these solutions remain
time-consuming on the user side since they usually imply that the user manually
maps each element of their data to some ontologies. The most advanced of these
systems try to make the process semi-automatic by learning from the data and
schema that match their ontologies. [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]
      </p>
      <p>To ease the creation of knowledge graphs from non-semantic data, we propose
an approach combining natural language processing (NLP) and machine learning
to allow for a more automatized transformation of data.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Motivating Example</title>
      <p>Over the past few years, more and more governments have started publishing
their data for use by the public. These Open Data initiatives are done at every
level of governments, from single cities to nationwide programs, and involve many
di erent types of data. One of these is geographical data, often in the form of
addresses and geographical locations of all sorts of places, such as named places,
landmarks, residential buildings, or businesses. This data allows users to develop
a variety of useful applications, with notable examples creating non-proprietary
maps of the world such as OpenStreetMap, MapBox and others.</p>
      <p>
        But currently the vast majority of data being published is not available as
linked data, OpenStreetMap(OSM) created the OSMOnto [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], an ontology close
to OSM's database to integrate more closely with the semantic web. Nevertheless,
linked data from certain regions can remain hard to nd, if it even exists. Thus
the need to translate openly published relational data, into linked data. The
task remains di cult as there is no single world standard describing addresses,
and even when dealing with a single country there is rarely a single database
regrouping all data with a single schema. It isn't unusual to nd a di erent
schema for each city when they publish the data themselves. We will attempt to
explain our approach through examples obtained while transforming this type
of data in Section 2 and evaluating our approach in Section 3.
3
3.1
      </p>
    </sec>
    <sec id="sec-3">
      <title>Approach</title>
      <sec id="sec-3-1">
        <title>Processing overview</title>
        <p>When a user wants to transform tabular data, the application lets her create
entity types by selecting the columns she wants to see in the entity type. Here,
an entity type is a table containing a number of columns that will be matched
with a class from the ontologies known by the application. The columns under
the entity type will be matched to properties associated with the class. That
way when generating the RDF document, each row in the entity type's table
will generate an instance of the class that matched the entity type and the
values in this row's column will be used to generate the properties associated
with that instance. The matching is performed between properties and columns.
The average score for the matching between columns from a table and properties
related to a class is then used as the score for the matching between the class
and the table.
3.3</p>
      </sec>
      <sec id="sec-3-2">
        <title>NLP Module</title>
        <p>
          The NLP module matches properties and columns. It relies on Word2Vec [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ], a
group of deep learning models which makes it possible to represent words in a
vectorial space. We can ask Word2Vec for the cosine similarity of two vectors
which represent two words where the cosine similarity is expressed by a oat.
We assume that the cosine similarity is representative of a semantic proximity
of these two words. When we match a column with a property, we tokenize the
name of the property and the name of the column. We then compare each token
from the column's name with each token from the property's name. The highest
cosine similarity is kept as a score for the matching between this column and
property.
        </p>
        <p>The NLP module is essential to our process as it is the only one of our modules
that can run without data from previous matchings made by the user. This allows
us to make predictions on new data. Figure 2 shows how the NLP module scores
the match between property 'thoroughfare' and a column named 'StreetName'.
In our implementation we chose to use word embeddings trained on Google News
articles3. When working on a speci c domain it may be bene cial to train word
embeddings on domain speci c documents to ensure the recognition of some
words and to prevent the semantics from common parlance from diluting the
meaning of words in the domain.
3.4</p>
      </sec>
      <sec id="sec-3-3">
        <title>String module</title>
        <p>The string module works by using predicates to establish the pro le of the strings
in the name and in the content of attributes, each predicate tests a speci city of
the string. For example does the string have numbers? special characters? less
than X tokens? starts with the pre x X? It is with dozens of such predicates that
we can determine a set of labels to represent a string. Each positive predicate
generates a label. These labels are known by the module who assigns them
weights from the strings that have previously matched each property. Figure 3
shows an example of some predicates that are generated for the shown data.</p>
        <p>During its initialization phase, the module retrieves data from previous
sessions, and measures the prevalence of each label for each property and compares
it to the prevalence of that label in all of the other classes to determine the
weight to give it. In general, the more a label is present in the strings of its
property and the less it is present in the other properties, the greater its weight
will be. A label that would be present in all strings would therefore indicate
nothing and will have a weight of zero. From the best results of these modules</p>
        <sec id="sec-3-3-1">
          <title>3 https://code.google.com/archive/p/word2vec/</title>
          <p>on each attribute of the entity, we determine a degree of certainty for the
correspondence with this class. The class with the best certainty is kept and the
properties which correspond best to its attributes are also preserved. These
results are presented to the user who can change the results by choosing the class
and properties herself if the results do not suit him.
The numeric module uses the same mechanics as the string module but analyses
the content of columns as integers, oats and doubles instead of simple strings.
The predicates built by this module focus on the essential aspects of the numbers
present in the column. For instance, the presence of negative values, oating
values, and the range of values present in the column are signi cant information
that help us make a clear distinction between concepts like a postal code and a
latitude.
The nal score for the matching between a property and a column is calculated by
adding up the scores of the 3 modules. The score of the NLP module is divided by
two in this step. This does not impact its performance in cases with no previous
data as it is the only active module in these cases. This is done because we
think the numeric and string modules make better matchings individually but
the NLP module can still help break ties in ambiguous cases.
4</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Evaluation</title>
      <p>In this section, we present a preliminary evaluation of our solution. We are
comparing our results to a well-established semantic data integration tool.
4.1</p>
      <sec id="sec-4-1">
        <title>Data sets and Ontologies</title>
        <p>In this experimentation, our goal is to create RDF data from textual documents.
We are considering location4and geo5ontologies. We will use these ontologies to
represent addresses using their house street name(locn:thoroughfare), number
(locn:poBox), full address (locn:fullAddress), postal code (locn:postalCode) and
city name (locn:postalName). The geo ontology will be used to represent
geographical points by using their longitude and latitude (geo:long, geo:lat).</p>
        <p>We will translate data from four di erent open data projects from di erent
countries. The "Base Adresse Nationale" (BAN6), a national project from the
French government, and open data projects from Montreal7, Austin8and
London9. We cleaned the data before translating it by separating the geographical
information to form a "Geographical" table and an "Address" table and ignored
data that we would not translate, like ids, keys and metadata from the original
databases. The largest case was BAN, where only 7 of the original 20 columns
were relevant for our ontologies.
4.2</p>
      </sec>
      <sec id="sec-4-2">
        <title>Comparison setting</title>
        <p>
          Karma [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] is a data integration tool allowing users to generate RDF data from a
variety of formats. The tool facilitates the mapping of columns from the source
data to properties and classes in ontologies. When mapping columns, Karma
recommends a number of mappings based on the content of the column and
by learning from matches made by the user in previous sessions. We will be
comparing the quality of the top recommendation from our approach with Karma
by mapping the same data on the same ontologies using both systems.
4.3
        </p>
      </sec>
      <sec id="sec-4-3">
        <title>Data and Results</title>
        <p>Since our objective is to automate the translation process, we measure the
quality of our matching by counting the number of user interactions necessary to
create linked data from a table. We increment the counter of user interactions
when the proposed matching is incorrect. We count matching a property and
a literal as "Assign Property" and matching between a property and a class as
"Assign Relationship". Both Karma and our solution start the evaluation with
no previous matches to learn from and the matchings expected are the same for
both solutions.</p>
        <p>Figure 4 details user interactions that were counted when translating data
from the di erent sources into linked data. We reach an average of 0.45 user
actions per column using our approach, compared to Karma's 0.68. We notice</p>
        <sec id="sec-4-3-1">
          <title>9 https://www.w3.org/ns/locn</title>
          <p>9 https://www.w3.org/2003/01/geo/
9 https://adresse.data.gouv.fr/donnees-nationales
9 https://donnees.montreal.ca/ville-de-montreal
9 https://data.austintexas.gov/Locations-and-Maps/
9 https://opendata.london.ca/
that out of the 7 properties that we were matching with the data, 3 were found
solely based on NLP in the rst dataset.
5</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Related Work</title>
      <p>Most solutions for ontology matching and mapping are either mapping languages
or transformation software. In both cases, they are oriented towards expert users
like ontology experts. Karma stood out as it was trying to be accessible to anyone
with an understanding of their data and their ontology with a semi-automated
approach. We based the core of our approach on predicates inspired from their
approach and expanded it by introducing NLP, the addition of NLP allows us to
suggest mappings on properties and classes that have not been matched before.
This was not possible with Karma as it needed data from previous matchings
made by the user for a property before suggesting it in new matchings. The other
addition we made to karma's process was to split predicates on content between
string based predicates and numerical predicates.
6</p>
    </sec>
    <sec id="sec-6">
      <title>Conclusion and future work</title>
      <p>We have proposed an approach to semi-automatically match non-semantic data
with ontologies by using machine learning and NLP techniques to create
knowledge graphs. We have demonstrated that combining di erent approaches, in
particular NLP and string matching, improve the quality of our matchings. The
quality of our matchings depends directly on the quality of the data we are
matching and the quality of the data from the previous sessions. Data attributes
using real life vocabulary can be directly used to suggest matchings with our
NLP approaches whereas truncated words, acronyms are unusable. The more we
use each ontology, the better the quality of our matchings.</p>
      <p>Even though our process shows good results, it could be improved by
extending its NLP approaches. In our evaluation several sources had their schemas in
di erent languages which complicated the task of our NLP module as Word2vec
must have seen the exact word being matched to give an answer. If we translated
the names in the data's schema in a separate phase or if the NLP module was
capable of doing it automatically, its results should improve signi cantly. The
combination of the di erent modules itself could be improved by adjusting the
weight of the di erent scores based on how accurate their predictions were for
a given property in previous sessions. The model that we train will be made
reusable and able to learn during sessions in future works, this will improve the
quality of our matchings during the sessions themselves. In this paper our focus
was on the quality of the matchings, this focus however came at a cost when
it comes to memory consumption and processing power, work will be needed to
optimize our approaches to handle larger amounts of data. The full integration
of the graphical user interface and the extension of its functionalities will be
essential. We are working towards the development of a full application.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Dimou</surname>
          </string-name>
          , Anastasia &amp; Vander
          <string-name>
            <surname>Sande</surname>
          </string-name>
          , Miel &amp; Colpaert, Pieter &amp; Verborgh, Ruben &amp; Mannens, Erik &amp; Van de Walle, Rik. (
          <year>2014</year>
          ).
          <article-title>RML: A Generic Language for Integrated RDF Mappings of Heterogeneous Data</article-title>
          .
          <source>CEUR Workshop Proceedings. 1184.</source>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Lefrancois</surname>
            , Maxime &amp; Zimmermann, Antoine &amp; Bakerally,
            <given-names>Noorani.</given-names>
          </string-name>
          (
          <year>2017</year>
          ).
          <article-title>Flexible RDF Generation from RDF and Heterogeneous Data Sources with SPARQLGenerate</article-title>
          .
          <fpage>131</fpage>
          -
          <lpage>135</lpage>
          .
          <fpage>10</fpage>
          .1007/978-3-
          <fpage>319</fpage>
          -58694-6
          <fpage>16</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>S.</given-names>
            <surname>Das</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Sundara</surname>
          </string-name>
          , and
          <string-name>
            <given-names>R.</given-names>
            <surname>Cyganiak</surname>
          </string-name>
          .
          <article-title>R2RML: RDB to RDF Mapping Language</article-title>
          .
          <source>W3C Recommendation</source>
          . https://www.w3.org/TR/r2rml/,
          <year>September 2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Knoblock C.</surname>
          </string-name>
          <article-title>A</article-title>
          . et al. (
          <year>2012</year>
          )
          <article-title>Semi-automatically Mapping Structured Sources into the Semantic Web</article-title>
          . In: Simperl E.,
          <string-name>
            <surname>Cimiano</surname>
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Polleres</surname>
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Corcho</surname>
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Presutti</surname>
            <given-names>V</given-names>
          </string-name>
          .
          <article-title>(eds) The Semantic Web: Research and Applications</article-title>
          .
          <source>ESWC 2012. Lecture Notes in Computer Science</source>
          , vol
          <volume>7295</volume>
          . Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-
          <fpage>642</fpage>
          -30284-8 32
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Codescu</surname>
          </string-name>
          , Mihai Horsinka, Gregor Kutz, Oliver Mossakowski, Till Rau, Rafaela. (
          <year>2014</year>
          ).
          <article-title>OSMonto -An Ontology of OpenStreetMap Tags</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>F.</given-names>
            <surname>Cerbah</surname>
          </string-name>
          .
          <article-title>Learning highly structured semantic repositories from relational databases: The RDBToOnto tool</article-title>
          .
          <source>In Proceedings of the 5th European Semantic Web Conference (ESWC</source>
          <year>2008</year>
          ), pages
          <fpage>777</fpage>
          {
          <fpage>781</fpage>
          , Athens, GA, USA,
          <year>2008</year>
          . ISBN 3-540- 68233-3
          <fpage>978</fpage>
          -
          <lpage>3</lpage>
          -
          <fpage>540</fpage>
          -68233-2.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Mikolov</surname>
            , Tomas Corrado,
            <given-names>G.</given-names>
          </string-name>
          <article-title>s Chen, Kai Dean, Je rey</article-title>
          . (
          <year>2013</year>
          ).
          <article-title>E cient Estimation of Word Representations in Vector Space</article-title>
          .
          <fpage>1</fpage>
          -
          <lpage>12</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>