<!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>LODGrefine - LOD-enabled Google Refine in Action</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Mateja Verlic</string-name>
          <email>mateja.verlic@zemanta.com</email>
        </contrib>
      </contrib-group>
      <pub-date>
        <year>2012</year>
      </pub-date>
      <fpage>31</fpage>
      <lpage>37</lpage>
      <abstract>
        <p>As a part of LOD2 project we developed several extensions for Google Refine - a simple, yet very powerful open-source tool for working with messy data, to make LOD a first-class citizen in this tool, which is currently tightly coupled with Freebase and has no support for DBpedia. LODGrefine is a version of Google Refine with integrated extensions developed by Zemanta and DERI, adding support for reconciliation with DBpedia, export to RDF, augmentation of data with columns from DBpedia and extraction of entities from full text. Use of LODGrefine will be demonstrated in three use cases.</p>
      </abstract>
      <kwd-group>
        <kwd>Semantic Web</kwd>
        <kwd>data cleaning tools</kwd>
        <kwd>Google Refine</kwd>
        <kwd>LOD</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Data cleansing and linking are very important steps in the life cycle of linked
data [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. They are even more important in the process of creating new linked
data. Data comes from different sources and it is published in many formats,
either as XML, CSV, HTML, as a dump from relational databases, or in
custom formats like JSON, obtained from different web services. By linking these
different bits of data from various sources we can extract information otherwise
hidden and in some cases even gain new knowledge.
      </p>
      <p>
        Unfortunately, these steps are not always trivial for an average user, e.g.
a statistician working with statistical government data; on the contrary, they
pose a problem even for more skilled researchers working in the field of
semantic web. If data is available online this doesn’t necessary mean it is ready to be
used in semantic applications. In most cases such assumptions are wrong; it is
very likely that data has to be cleaned, because everyone can publish data on
the Web. Taking care of quality of Web data is still one of the main challenges
for Semantic Web applications [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Data cleansing, especially if done manually,
is a very tedious and time consuming task, mostly due to the lack of good tools.
Commercial products such as PoolParty [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] provide a wide range of
functionalities (thesaurus management, text mining, data integration), but they may
not be the best solution when dealing with smaller datasets (in comparison to
huge datasets in big companies) and by less proficient users trying to convert
data stored in Excel files or flat files.
      </p>
      <p>
        A good and publicly available cleansing/linking tool should at least be able
to: assist user in detecting inconsistent data, quickly perform transformations
on a relatively large amount of data, export cleansed data into different formats,
be relatively simple to use, and be available for different operating systems.
Fortunately, there is one open-source (BSD licensed) solution available, which
meets all the criteria mentioned above and even more. It was created especially
for dealing with messy data, it is modular based and extendable, it works on
all three major operating systems and it already provides functionalities to
reconcile data against Freebase. This tool is Google Refine (GR) [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>GR provides means to reconcile and extend data with data from Freebase,
but not from DBpedia. By providing a LOD-friendy version of this tool
(LODGrefine) supporting DBpedia we’ve made an important step towards making
LOD a first-class citizen in this powerful, yet easy to use tool. LODGrefine has
preserved all of the GR’s cleansing and reconciliation functionalities and added
new ones to make it even more useful for Semantic Web community.
2</p>
    </sec>
    <sec id="sec-2">
      <title>From</title>
    </sec>
    <sec id="sec-3">
      <title>Google Refine to LODGrefine</title>
      <p>GR is currently one of most powerful and user-friendly open-source tools for
cleansing and linking data with Freebase. Support for faceted browsing and
good filtering possibilities are its main assets, it works fast even when dealing
with large amounts of data and it has a built-in support for Google Refine
Expression Language (GREL), a special scripting language, which is easy to
learn and use to transform data. The most important features of GR are the
reconciling and extending data.</p>
      <p>It is a server-client web application intended to run locally by one user.
Instead of using a database to store imported data, it uses memory data-store,
which is built up-front and optimized for GR operations. Its data cleansing and
reconciliation abilities are tightly integrated with Freebase (Fig. 1) and making
it support a different triplestore offering a SPARQL endpoint, e.g DBpedia,
was not possible without implementation.
2.1</p>
      <sec id="sec-3-1">
        <title>LOD extensions</title>
        <p>
          Due to the modular nature of GR architecture it was not required to change
the code of GR itself to make it LOD-enabled. We implemented extensions
with additional functionalities. Maali and Cyganiak, researchers at Digital
Enterprise Research Institute already developed RDF Refine extension [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] for GR,
which can be used to reconcile data against any SPARQL endpoint or RDF
dump and to export data as RDF based on a user-defined RDF schema.
        </p>
        <p>
          Extensions (dbpedia-extension) developed by Zemanta complements
functionalities of RDF Refine with ability to extend reconciled data with new
columns based on data from DBpedia. It also supports extraction of entities
from unstructured text using Zemanta API [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ]. For example, if we extend
reconciled data with description or biography property from DBpedia, we can
extract different types of entities from this text and add in new columns to use
it in RDF schema, which maps data in columns to nodes in linked graph.
        </p>
        <p>
          Both extensions are free to use, their code is shared under the BSD License
on Github (RDF Refine1 [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ], dbpedia-extension2 [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ]) and binary versions can
be obtained from their home pages.
2.2
        </p>
      </sec>
      <sec id="sec-3-2">
        <title>LODGrefine</title>
        <p>To simplify the process of obtaining and installing LOD extensions we decided
to integrate them into the latest version of GR ( 2.5-r2407) and name the
LODenabled version LODGrefine. Although GR itself does not need any special
installation, it is enough to unpack it and run it, the location of extensions
depends on the operating system and it is more convenient, especially for first
time users, if extensions are already integrated in the tool. Furthermore, we
created a Debian package for LODGrefine, which will be integrated into LOD2
Stack, a stack of tools for managing the life-cycle of Lined Data.</p>
        <sec id="sec-3-2-1">
          <title>1 https://github.com/fadmaa/grefine-rdf-extension</title>
        </sec>
        <sec id="sec-3-2-2">
          <title>2 https://github.com/sparkica/dbpedia-extension</title>
          <p>
            LODGrefine is available under Apache License 2.0 and can be freely
downloaded either in binary format or as source code [
            <xref ref-type="bibr" rid="ref8">8</xref>
            ].
3
          </p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>LODGrefine in action - use cases</title>
      <p>For demonstration we prepared three use cases – examples of how LODGrefine
can be used to clean data from different sources and domains and how to
transform it into Linked Data.
3.1</p>
      <p>100 best novels
In first example we will demonstrate how to convert data from a website first
to a LODGrefine project, reconcile it, augment it additional columns from
DBpedia and then export it as Linked Data.</p>
      <p>In this example we will transform a list of 100 best novels from Modern
library web page3. The list contains two rows for each novel - first row contains
the title and the second one the author, but we need data in columns - one
column for title and one for author. Fortunately, LODGrefine has an option
to import line based text files and it can read text from clipboard. With some
minor changes of default settings our data is imported in columns in few seconds
instead of minutes or even hours. With GREL functions we convert titles from
uppercase to titlecase and remove ’by ’ preceding authors names.</p>
      <p>Next step is reconciling author names with DBpedia using RDF extension
to entity type dbo:Person4. After reconciliation data is ready to be extended
with has abstract property from DBpedia using Zemanta extension (Fig. 2).</p>
      <p>The last step of converting online list of novels into Linked Data is
configuring RDF schema alignment skeleton, with which we specify how RDF data will
be generated (Fig. 3). At any time we can preview the Turtle representation
of generated RDF data to see whether schema we defined produced expected
results. After the schema has been configured, data can be exported into one
of the RDF representations supported by LODGrefine - RDF/XML or Turtle
(fig. 4).</p>
      <p>In this example we demonstrated how easy it can be to transform data from
a website into Linked Data using LODGrefine. We also demonstrated its most
important functionalities.
The Comprehensive Knowledge Archive Network (CKAN) is well known system
for storage and distribution of data. It is widely used for storing government
data and national registers as well as Data Hub, the community-run catalogue
of useful sets of data on the Internet 5. CKAN data is especially interesting
for Linked Open Data community, but currently not all CKAN datasets in the
Data Hub are provided as RDF (either SPARQL endpoint or RDF dump). A lot
of datasets are provided as files with comma separated values (CSV), as Excel
files or XML. Our goal is to show how it can be relatively easy transformed into
triplets using LODGrefine in a similar way as described in previous example
with novels.</p>
      <sec id="sec-4-1">
        <title>4 http://dbpedia.org/ontology/Person</title>
      </sec>
      <sec id="sec-4-2">
        <title>5 http://thedatahub.org/about</title>
        <sec id="sec-4-2-1">
          <title>Looking for entities in extracted links</title>
          <p>In the last example we will demonstrate the full power of LODGrefine by using
it to clean and filter links extracted from blog posts to obtain links, that could
be considered as descriptions for entities.</p>
          <p>Many times bloggers include links into their blog posts to point the reader
to Wikipedia or any other web page, that can be considered as information
resource (e.g. Google Maps, Crunchbase6 - free database of technology
companies, Amazon). Ideally, links that could be considered as entity candidates, have
non-empty anchor text (entity surface form) and href attribute set to external
URL, which directs to a page containing a description of concept/person/object
(disambiguation page) mentioned in anchor text.</p>
          <p>Unfortunately, blog posts also contain even more links that can be
considered as noise or even spam, e.g. links with anchor text without semantic value
(e.g. here, this, Read more). We used LODGrefine faceted browsing and
filtering abilities to quickly identify patterns of occurring anchor texts or target
links, which could be considered either as entity candidates or noise. We used
GREL7 expressions to simply extract features from columns containing anchor
texts and target URL, e.g. number of words in anchor texts, flag whether first
word in anchor text is capitalized or not, domain part of the target URL, path
level of the target URL and more.</p>
          <p>When applying faceted browsing on a large number of rows it is not always
possible to display all unique values. LODGrefine offers the ability to display all</p>
        </sec>
      </sec>
      <sec id="sec-4-3">
        <title>6 www.crunchbase.com</title>
      </sec>
      <sec id="sec-4-4">
        <title>7 GREL - Google Refine Expression Language: http://code.google.com/p/google</title>
        <p>refine/wiki/GRELFunctions
different values by choice count, which can be further used in mathematical
expressions. For example, if only a few anchor texts appear 100x more frequently
than the rest of the anchor texts, it is difficult to filter out anchor texts with
occurrences between 20 and 35. In this case it is better to use logarithmic scale.
It is worth mentioning, that filtering in LODGrefine works really fast even for
100 000 rows, where some other tools might start having problems.</p>
        <p>After filtering we reconciled entity candidates against DBpedia and/or
Freebase to link them to existing entities and then exported entity candidates in
Turtle representation.
4</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Conclusions</title>
      <p>LOD-enabled version of Google Refine is one of the best open-source tools for
cleaning and linking. With the examples we demonstrated its versatility and
powerfulness for transforming tabular data to Linked Data for different problem
domains.
5</p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgments</title>
      <p>This work was supported by a grant from European Union’s 7th Framework
Programme (2007-2013) provided for the project LOD2 (GA no. 257943).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>S.</given-names>
            <surname>Auer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Lehmann</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.-C. N.</given-names>
            <surname>Ngomo</surname>
          </string-name>
          .
          <article-title>Introduction to linked data and its lifecycle on the web</article-title>
          .
          <source>In Reasoning Web</source>
          , pages
          <fpage>1</fpage>
          -
          <lpage>75</lpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>C.</given-names>
            <surname>Bizer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Boncz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. L.</given-names>
            <surname>Brodie</surname>
          </string-name>
          , and
          <string-name>
            <surname>O. Erling.</surname>
          </string-name>
          <article-title>The meaningful use of big data: four perspectives - four challenges</article-title>
          .
          <source>SIGMOD Rec</source>
          .,
          <volume>40</volume>
          (
          <issue>4</issue>
          ):
          <fpage>56</fpage>
          -
          <lpage>60</lpage>
          , Jan.
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>R.</given-names>
            <surname>Cyganiak</surname>
          </string-name>
          and
          <string-name>
            <given-names>A.</given-names>
            <surname>Jentzsch</surname>
          </string-name>
          .
          <article-title>Linking open data cloud diagram</article-title>
          . http://lodcloud.net/.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>G.</given-names>
            <surname>Inc</surname>
          </string-name>
          .
          <article-title>Google refine homepage</article-title>
          . http://code.google.com/p/google-refine/.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>F.</given-names>
            <surname>Maali</surname>
          </string-name>
          and
          <string-name>
            <given-names>R.</given-names>
            <surname>Cyganiak</surname>
          </string-name>
          .
          <article-title>RDF Refine homepage</article-title>
          . http://refine.deri.ie/.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>F.</given-names>
            <surname>Maali</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Cyganiak</surname>
          </string-name>
          , and
          <string-name>
            <given-names>V.</given-names>
            <surname>Peristeras</surname>
          </string-name>
          .
          <article-title>Re-using cool uris:entity reconciliation against lod hubs</article-title>
          .
          <source>In Linked Data on the Web</source>
          , volume
          <volume>813</volume>
          .
          <string-name>
            <surname>CEUR-WS</surname>
          </string-name>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>T.</given-names>
            <surname>Schandl</surname>
          </string-name>
          and
          <string-name>
            <given-names>A.</given-names>
            <surname>Blumauer</surname>
          </string-name>
          . Poolparty:
          <article-title>Skos thesaurus management utilizing linked data</article-title>
          . In L. Aroyo,
          <string-name>
            <given-names>G.</given-names>
            <surname>Antoniou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Hyvnen</surname>
          </string-name>
          , A. ten Teije,
          <string-name>
            <given-names>H.</given-names>
            <surname>Stuckenschmidt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Cabral</surname>
          </string-name>
          , and T. Tudorache, editors,
          <source>The Semantic Web: Research and Applications</source>
          , volume
          <volume>6089</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>421</fpage>
          -
          <lpage>425</lpage>
          . Springer,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>M.</given-names>
            <surname>Verlic</surname>
          </string-name>
          .
          <article-title>LodGrefine homepage</article-title>
          . http://code.zemanta.com/sparkica/lodgrefine/.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Zemanta</surname>
          </string-name>
          .
          <article-title>Zemanta developers page</article-title>
          . http://developer.zemanta.com/.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>