<!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>CSV2KG: Transforming Tabular Data into Semantic Knowledge</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Bram Steenwinckel?</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Gilles Vandewiele?</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Filip De Turck</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Femke Ongenae</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>IDLab, Ghent University</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Introduction &amp; Challenge Description</institution>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>imec</institution>
          ,
          <addr-line>Technologiepark-Zwijnaarde 126, Ghent</addr-line>
          ,
          <country country="BE">Belgium</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>A large portion of structured data does not yet reap the bene ts of the Semantic Web, or Web 2.0, as it is not semantically annotated. In this paper, we propose a system to generates semantic knowledge, available on DBPedia, from common CSV les. The \Tabular Data to Knowledge Graph Matching" competition, consisting of three di erent subchallenges, was used to evaluate the proposed methodology.</p>
      </abstract>
      <kwd-group>
        <kwd>Tabular Data Semantic Annotation Type Recognition Property Recognition</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>? Both authors contributed equally to this work
of the les contained a corresponding ground truth of annotations, allowing only
for unsupervised learning approaches to be applied.</p>
      <p>1946 Roussillon Grand Prix Maserati 4CL</p>
      <p>CPA
1946 Nice Grand Prix Alfa Romeo 308
1946 Marseille Grand Prix</p>
      <p>Maserati
1937 San Remo Grand Prix Maserati in motorsport
1935 Italian Grand Prix</p>
      <p>Alfa romeo in motorsport
CEA</p>
      <p>France
France
France
Italy
Italy</p>
      <p>H. Louveau
R. Sommer
E. Platé
P. Dusio
R. Dreyfus</p>
      <p>CTA
We designed a system to solve these three challenges directly. Our system consists
of six phases as visualised in Figure 2. First, crude annotations are made for
each cell in the table by generating multiple candidates and disambiguating
them by using string similarities on the cell values and the rdf:label of each
candidate. Afterwards, the column types and properties between columns are
inferred using these cell annotations. In a fourth step, the inferred column types
and properties are used to create more accurate head cell annotations (the cells
in the rst column of a table). Phase ve uses the new head cells to correct the
other cells in the table, using the property annotations. Finally, in phase six, new
column types were inferred using all the available corrected cells. The code for
this system is written in Python and is made available online1. In the following
section, detailed information of each phase is provided.
The pipeline used to annotate single cells, during an initial phase, is depicted in
Figure 3. For each of the cell values, we rst clean them by retaining only the
part that comes before a `(' or `[' and by removing all `%', `"', and `n' characters
1 https://github.com/IBCNServices/CSV2KG
(clean cell). Then, we check whether http://dbpedia.org/resource/&lt;X&gt;
exists where &lt;X&gt; is simply the cleaned cell value with spaces replaced by
underscores (try url). Parallel with this, the cell value is provided to the DBPedia
lookup API to generate more candidates (DBPedia lookup). As no column type
annotations are available yet during this initial phase, we do not provide this
additional information. If both the DBPedia lookup and the try url step did
not result in any candidates, the DBPedia Spotlight API is applied. In the end, a
large pool of possible candidates remain. On this pool, we apply disambiguation
by selecting the candidate of which its rdf:label has the lowest Levenshtein
distance to the actual cell value.
After annotating the di erent cells, we can query the di erent types for each of
these annotations in the same column and count these. Based on these counts,
the goal is to nd now the most speci c class that matches the entities in the
cell. It is important to note that the entities on DBPedia are not guaranteed
to be complete or are annotated correctly (e.g. Barack Obama, and not Donald
Trump, is still the president of the U.S.A according to DBPedia at the time of
writing in August 20192) and Shaquille O'Neal his musical endeavours, such as
being a rapper and DJ, are not entirely in there3). This makes the inference step
far from trivial. Merely taking the type with the highest count, where ties are
2 http://dbpedia.org/page/President_of_the_United_States
3 http://dbpedia.org/page/Shaquille_O'Neal
broken by the type that has the highest depth in the hierarchy, would mostly
result in a very generic annotation such as Thing.</p>
      <p>Since the classes of the DBPedia ontology form a hierarchy, they can be
represented in a tree. We can now traverse this tree and apply majority voting (i.e.
taking the child with the highest count) on each level of this tree. We continue
recursively until the entropy of the two highest counts of its children is lower
than a speci ed threshold. The entropy is thus de ned as:</p>
      <p>
        H(t) = H(sort(fcount(c) j c 2 children(t)g)[ 2 :])
(
        <xref ref-type="bibr" rid="ref1">1</xref>
        )
With t the type of which we want to calculate its entropy, H(:) the Shannon
entropy, count(:) a function to get the number of remaining cell annotations
of a certain type, sort(:) a function to sort a collection in an ascending fashion
and children(:) a function to obtain the subclasses of a type in the DBPedia
ontology. The reason for only looking at the two highest counts of its children
is that else it can be susceptible to outliers (i.e. types with very low counts),
which can cause the entropy to decrease quickly. This approach is exempli ed
in Figure 4.
      </p>
      <p>As the maximum score that could be achieved per target column was not bounded
by one, we boosted our score by adding all parents in the hierarchy to each
column annotation, excluding Thing and Agent. Moreover, classes that were
equivalent according to the DBPedia ontology (e.g. Location and Place) were added
to the collection of annotations per target as well. Column type information can
in uence the DBPedia cell lookup as visualised in Figure 3. Therefore, the initial
cell lookup was executed again with newly available column information.
2.3</p>
    </sec>
    <sec id="sec-2">
      <title>Column Property Annotation (infer props)</title>
      <p>The cell annotations are used to annotate the properties or relations between
pairs of columns. To do this, we iterate over cell pairs from two target columns
between which we want to infer the relation. Then, for each of these cell pairs
(s; o), we query for all predicates p from the DBPedia ontology that exists
between these two entities: fp j (s; p; o) 2 DBP ediag. Finally, the predicate that
can be found the most between the cell pairs is chosen. To break possible ties,
the domain and range of all inferred column types were taken into account from
the using a simple query:
SELECT ?domain ?range WHERE {
&lt;pred&gt; rdfs:domain ?domain .</p>
      <p>&lt;pred&gt; rdfs:range ?range .
with &lt;pred&gt; a possible predicate between the two target columns. So in the
case of relationships with equal highest counts, we check the range and domain
using the column types. When the range and domain of multiple relationships
are valid possibilities, we take the relationships with the most speci c range and
domain column type (using depth(domain) + depth(range)).
2.4</p>
    </sec>
    <sec id="sec-3">
      <title>Cell Annotation for the rst columns (head annotation)</title>
      <p>After obtaining the column type and property annotations, we can create more
accurate cell annotations. All properties giving information about the head cells
(the cell in the rst column of a table) are updated by using the following query:</p>
      <sec id="sec-3-1">
        <title>SELECT ?s WHERE { ?s &lt;pred&gt; &lt;value&gt; . }</title>
        <p>with &lt;pred&gt; the predicates found in Section 2.3 between the head and
nonhead columns and &lt;value&gt; the cell value of the non-head column as inferred in
Section 2.1. For each row in our table, these queries will result in several possible
head annotations, and the annotation with the highest count was returned. In
the case of an ex aequo, the Levenshtein distance on the rdf:label was used.
2.5</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Non-head Cell Annotations (infer other cells)</title>
      <p>With the corrected head cell annotations, a similar query can be used to correct
all the other cells in the table row by row:</p>
      <sec id="sec-4-1">
        <title>SELECT ?o WHERE { &lt;head&gt; &lt;pred&gt; ?o . }</title>
        <p>with &lt;pred&gt; the predicates found in Section 2.3 between the head and non-head
columns and &lt;head&gt; the cell value of the head column as inferred in Section 2.4.
Multiple answers are possible when more than one values are annotated with a
corresponding property. Levenshtein distances between the rdf:label and raw
cell value were used to disambiguate the results.
2.6</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Final column types (infer columns)</title>
      <p>The method from section 2.2 was executed again, but with all new information
of the cells.
3</p>
      <sec id="sec-5-1">
        <title>Additional remarks</title>
        <p>Some additional elements were provided to boost both the execution and
accuracy of our annotation system:
{ When names such as G. Vandewiele, B. Steenwinckel were detected, DBPedia
lookup was performed given the Person class type, and only the last name
was given to the API as a search key. Code was used to check the distance
between the cell value and the candidate persons.
{ The CTA challenge score was not bounded to 1, so all the parent column
annotations were added as well.
{ Reasoning was used to nd equivalent classes, and these were also added as
possible results for the column types.
{ Some tales were very similar, and majority voting was used on possible
similar tables to correct some of the column types.
{ Each phase of the pipeline in gure 2 was parallelized, making it possible to
evaluate large amounts of CSV les in a limited amount of time.
4</p>
      </sec>
      <sec id="sec-5-2">
        <title>Evaluation results</title>
        <p>In total, four di erent metrics were used to evaluate the system. On the one
hand, we had the F1-score, which is a harmonic mean of the precision and recall
of our system:
precision =
recall =
During the second round, a new metric was introduced for the CTA challenge. An
annotation was regarded as perfect if it was the most speci c class to which all the
cells in the column complied to. An annotation was okay if it was an ancestor
of the actual perfect annotations in the DBPedia hierarchy of classes. Based
on these two concepts, the primary average hierarchical (AH) and secondary
average perfect (AP ) score were de ned:</p>
        <p>AH =
AP =
#perfect + 0:5 #okay</p>
        <p>
          jtarget cellsj
#perfect
#annotations
#wrong
(
          <xref ref-type="bibr" rid="ref3">3</xref>
          )
The results of our approach are summarized in Table 1, 2, 3, 4 respectively.
It should be noted that we mostly focused on the CTA challenge during the
rst round. No submissions were made for the CPA challenge, and we did not
annotate all cells for the CEA challenge. Our leaderboard position is, therefore,
rather low in comparison to our ranking during the other rounds.
5
        </p>
      </sec>
      <sec id="sec-5-3">
        <title>Conclusion &amp; Future Work</title>
        <p>In this paper, a system to convert a CSV le of raw, structured data to semantic
knowledge. The system consists of six phases: three initial annotation phases
for all target cells, the types of columns and the properties between columns.
A fourth and fth phase over the target cells utilises the newly inferred
properties to create more accurate annotations and a sixth phase which uses all new
cell information to improve the column types. The proposed system is rather
straight-forward while already achieving promising results. As future work, we
would like to improve the system by taking additional resources into account,
such as other data sources or embedded values of the occurring triples.
Moreover, machine learning systems could be interesting as well but would require a
ground truth.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1. Soren Auer, Christian Bizer, Georgi Kobilarov, Jens Lehmann, Richard Cyganiak, and
          <string-name>
            <given-names>Zachary</given-names>
            <surname>Ives</surname>
          </string-name>
          .
          <article-title>Dbpedia: A nucleus for a web of open data</article-title>
          .
          <source>In The semantic web</source>
          , pages
          <volume>722</volume>
          {
          <fpage>735</fpage>
          . Springer,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Chandra</given-names>
            <surname>Sekhar</surname>
          </string-name>
          <string-name>
            <surname>Bhagavatula</surname>
          </string-name>
          , Thanapon Noraset, and
          <string-name>
            <given-names>Doug</given-names>
            <surname>Downey</surname>
          </string-name>
          .
          <article-title>Tabel: entity linking in web tables</article-title>
          .
          <source>In International Semantic Web Conference</source>
          , pages
          <volume>425</volume>
          {
          <fpage>441</fpage>
          . Springer,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>Jiaoyan</given-names>
            <surname>Chen</surname>
          </string-name>
          , Ernesto Jimenez-Ruiz,
          <string-name>
            <given-names>Ian</given-names>
            <surname>Horrocks</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Charles</given-names>
            <surname>Sutton</surname>
          </string-name>
          .
          <article-title>Colnet: Embedding the semantics of web tables for column type prediction</article-title>
          .
          <source>AAAI</source>
          ,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Anastasia</given-names>
            <surname>Dimou</surname>
          </string-name>
          , Miel Vander Sande, Pieter Colpaert, Ruben Verborgh, Erik Mannens, and Rik Van de Walle.
          <article-title>Rml: A generic language for integrated rdf mappings of heterogeneous data</article-title>
          .
          <source>Ldow</source>
          ,
          <volume>1184</volume>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>Vasilis</given-names>
            <surname>Efthymiou</surname>
          </string-name>
          , Oktie Hassanzadeh, Mariano Rodriguez-Muro, and
          <string-name>
            <given-names>Vassilis</given-names>
            <surname>Christophides</surname>
          </string-name>
          .
          <article-title>Matching web tables with knowledge base entities: from entity lookups to entity embeddings</article-title>
          .
          <source>In International Semantic Web Conference</source>
          , pages
          <volume>260</volume>
          {
          <fpage>277</fpage>
          . Springer,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>Jiaoyan</given-names>
            <surname>Chen Ernesto Jimenez-Ruiz Oktie</surname>
          </string-name>
          <string-name>
            <surname>Hassanzadeh</surname>
          </string-name>
          , Vasilis Efthymiou and
          <string-name>
            <given-names>Kavitha</given-names>
            <surname>Srinivas</surname>
          </string-name>
          . Semtab2019:
          <article-title>Semantic web challenge on tabular data to knowledge graph matching - 2019 data sets</article-title>
          .
          <source>Zenodo. Version</source>
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>Dominique</given-names>
            <surname>Ritze</surname>
          </string-name>
          , Oliver Lehmberg, and
          <string-name>
            <given-names>Christian</given-names>
            <surname>Bizer</surname>
          </string-name>
          .
          <article-title>Matching html tables to dbpedia</article-title>
          .
          <source>In Proceedings of the 5th International Conference on Web Intelligence, Mining and Semantics, page 10. ACM</source>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>Ziqi</given-names>
            <surname>Zhang</surname>
          </string-name>
          .
          <article-title>E ective and e cient semantic table interpretation using tableminer+</article-title>
          .
          <source>Semantic Web</source>
          ,
          <volume>8</volume>
          (
          <issue>6</issue>
          ):
          <volume>921</volume>
          {
          <fpage>957</fpage>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>Stefan</given-names>
            <surname>Zwicklbauer</surname>
          </string-name>
          , Christoph Einsiedler,
          <string-name>
            <given-names>Michael</given-names>
            <surname>Granitzer</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Christin</given-names>
            <surname>Seifert</surname>
          </string-name>
          .
          <article-title>Towards disambiguating web tables</article-title>
          .
          <source>In International Semantic Web Conference (Posters &amp; Demos)</source>
          , pages
          <fpage>205</fpage>
          {
          <fpage>208</fpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>